diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 17893dc..5ab4a67 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -17,6 +17,7 @@ jobs: name: Build wheels on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: os: [ubuntu-latest, windows-latest] @@ -74,12 +75,12 @@ jobs: shell: pwsh - name: Build wheels - uses: pypa/cibuildwheel@v2.22.0 + uses: pypa/cibuildwheel@v3.3.1 env: CIBW_ENVIRONMENT_WINDOWS: 'OpenCV_DIR="D:/a/magsac/magsac/opencv/build" Eigen3_DIR="C:/eigen3" gflags_DIR=D:/a/magsac/magsac/gflags/build_' CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair -w {dest_dir} {wheel} --add-path D:/a/magsac/magsac/opencv/build/bin" - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v6 with: name: pymagsac-wheels-${{ runner.os }} path: ./wheelhouse/*.whl @@ -88,21 +89,26 @@ jobs: name: Build source distribution runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: submodules: 'recursive' - - name: Build + - name: Setup Python + uses: actions/setup-python@v6 + with: + python-version: '3.14' + + - name: Build source distribution run: | - rm -rf build # remove conflicting directory - pipx run build --sdist + pip install build + python -m build --sdist - name: Validate run: | pip install twine - twine check dist/* + python -m twine check dist/* - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v6 with: name: pygcransac-sdist path: dist/*.tar.gz @@ -116,7 +122,7 @@ jobs: id-token: write # this permission is mandatory for trusted publishing contents: write # required for creating releases steps: - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v7 - name: Flatten directory structure run: | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 95597ff..c1fc737 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: # Validate github workflow files - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.29.4 + rev: 0.36.1 hooks: - id: check-github-workflows diff --git a/pyproject.toml b/pyproject.toml index cfb80c9..43c5b4a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,9 +13,9 @@ testpaths = 'tests' [tool.cibuildwheel] archs = ["auto64"] # 64-bit only -build = "cp39-* cp310-* cp311-* cp312-* cp313-*" # Only build Python 3.9-3.13 wheels +build = "cp310-* cp311-* cp312-* cp313-* cp314-*" # Only build Python 3.10-3.14 wheels skip = ["pp*", "*musllinux*"] # disable PyPy and musl-based wheels -manylinux-x86_64-image = "ghcr.io/akaszynski/manylinux2014-centos7-opencv/manylinux2014_x86_64_opencv3:v3.4.5.2" +manylinux-x86_64-image = "ghcr.io/akaszynski/manylinux2014-centos7-opencv/manylinux2014_x86_64_opencv3:v3.4.5.4" test-requires = "pytest" test-command = "pytest {project}/tests" diff --git a/setup.py b/setup.py index 6fd6c5d..9b3368a 100644 --- a/setup.py +++ b/setup.py @@ -1,34 +1,38 @@ """Setup for pymagsac.""" + import sys from setuptools import setup, find_packages -from setuptools.command.test import test as TestCommand try: from skbuild import setup except ImportError: - print("Please update pip to pip 10 or greater, or a manually install the PEP 518 requirements in pyproject.toml", file=sys.stderr) + print( + "Please update pip to pip 10 or greater, or a manually install the PEP 518 requirements in pyproject.toml", + file=sys.stderr, + ) raise cmake_args = [] debug = False -cfg = 'Debug' if debug else 'Release' -cmake_args += ['-DCMAKE_BUILD_TYPE=' + cfg] -cmake_args += ['-DCREATE_SAMPLE_PROJECT=OFF'] # <-- Disable the sample project - +cfg = "Debug" if debug else "Release" +cmake_args += ["-DCMAKE_BUILD_TYPE=" + cfg] +cmake_args += ["-DCREATE_SAMPLE_PROJECT=OFF"] # <-- Disable the sample project + setup( - name='pymagsac', - version='0.3.dev0', - author='Daniel Barath, Dmytro Mishkin', - author_email='barath.daniel@sztaki.hu', - description='MAGSAC and MAGSAC++', + name="pymagsac", + version="0.3.dev0", + author="Daniel Barath, Dmytro Mishkin", + author_email="barath.daniel@sztaki.hu", + description="MAGSAC and MAGSAC++", long_description=open("README.md").read(), long_description_content_type="text/markdown", - packages=find_packages('src'), - package_dir={'':'src'}, + packages=find_packages("src"), + license_file="LICENSE", + package_dir={"": "src"}, cmake_args=cmake_args, cmake_install_dir="src/pymagsac", - cmake_install_target='install', + cmake_install_target="install", zip_safe=False, install_requires="numpy", )