Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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: |
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
32 changes: 18 additions & 14 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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",
)
Loading