Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Python 3.12 #45

Merged
merged 6 commits into from
Jan 4, 2024
Merged
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
43 changes: 23 additions & 20 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
os: [ubuntu-latest, windows-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'recursive'

Expand Down Expand Up @@ -62,12 +62,12 @@ jobs:
shell: pwsh

- name: Build wheels
uses: pypa/cibuildwheel@v2.14.1
uses: pypa/cibuildwheel@v2.16.2
env:
CIBW_ENVIRONMENT_WINDOWS: 'OpenCV_DIR="D:/a/graph-cut-ransac/graph-cut-ransac/opencv/build" Eigen3_DIR="C:/eigen3"'
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair -w {dest_dir} {wheel} --add-path D:/a/graph-cut-ransac/graph-cut-ransac/opencv/build/bin"

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: pygcransac-wheels-${{ runner.os }}
path: ./wheelhouse/*.whl
Expand All @@ -76,19 +76,21 @@ jobs:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: Build
run: pipx run build --sdist
run: |
rm -rf build # remove conflicting directory
pipx run build --sdist

- name: Validate
run: |
pip install twine
twine check dist/*

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: pygcransac-sdist
path: dist/*.tar.gz
Expand All @@ -97,26 +99,27 @@ jobs:
name: Release and upload to PyPI
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
# upload to PyPI on every tag
permissions:
id-token: write # this permission is mandatory for trusted publishing
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- uses: actions/download-artifact@v4

# Download all artifacts
- uses: actions/download-artifact@v3
- name: Display structure of downloaded files
run: ls -R

- name: Upload to Public PyPi
- name: Flatten directory structure
run: |
pip install twine
twine upload --skip-existing ./**/*.whl
twine upload --skip-existing ./**/*.tar.gz
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
mkdir -p dist/
find . -name '*.whl' -exec mv {} dist/ \;
find . -name '*.tar.gz' -exec mv {} dist/ \;

- name: Display final structure
run: ls -R

- name: Upload to Public PyPi
uses: pypa/gh-action-pypi-publish@release/v1

- name: Release
uses: softprops/action-gh-release@v1
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.26.3
rev: 0.27.3
hooks:
- id: check-github-workflows
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ testpaths = 'tests'

[tool.cibuildwheel]
archs = ["auto64"] # 64-bit only
build = "cp38-* cp39-* cp310-* cp311-*" # Only build Python 3.8-3.11 wheels
build = "cp38-* cp39-* cp310-* cp311-* cp312-*" # Only build Python 3.8-3.12 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"
test-requires = "pytest opencv-python"
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

setup(
name='pygcransac',
version='0.1.0',
version='0.2.dev0',
author='Daniel Barath, Dmytro Mishkin',
author_email='[email protected]',
description='Graph-Cut RANSAC',
Expand Down
2 changes: 1 addition & 1 deletion src/pygcransac/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
from .pygcransac import *
__version__ = '0.1.0'
__version__ = '0.2.dev0'