Skip to content

Commit

Permalink
update cibuildwheel to v2.19.2 to build python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
Dobatymo committed Jul 11, 2024
1 parent 208b83c commit 2764e93
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 21 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
build_wheels_linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Build wheels
uses: pypa/cibuildwheel@v2.12.3
uses: pypa/cibuildwheel@v2.19.2
env:
CIBW_BEFORE_ALL: sh linux-build.sh
CIBW_BEFORE_BUILD: ls {project}/libjpeg-turbo-build
Expand All @@ -39,11 +39,11 @@ jobs:
build_wheels_macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Build wheels
uses: pypa/cibuildwheel@v2.12.3
uses: pypa/cibuildwheel@v2.19.2
env:
CIBW_BEFORE_ALL: sh macos-build.sh
CIBW_BEFORE_BUILD: ls {project}/libjpeg-turbo-build
Expand All @@ -64,10 +64,10 @@ jobs:
- AMD64
- x86
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'true'
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.8'
- uses: ilammy/msvc-dev-cmd@v1
Expand All @@ -84,15 +84,15 @@ jobs:
nmake
cd ..
- name: Build wheels
uses: pypa/cibuildwheel@v2.12.3
uses: pypa/cibuildwheel@v2.19.2
env:
CIBW_SKIP: cp36-* pp*
CIBW_ARCHS_WINDOWS: ${{ matrix.arch }}
CIBW_BEFORE_BUILD_WINDOWS: python -m pip install delvewheel
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: python -m delvewheel repair -w {dest_dir} {wheel} --add-path libjpeg-turbo-build --no-dll vcruntime140_1.dll;msvcp140.dll
CIBW_BEFORE_TEST: python -m pip install -r requirements-dev.txt && python generate_test_images.py
CIBW_TEST_COMMAND: cd /d {project} && python -m unittest discover -s tests
CIBW_TEST_SKIP: cp38-win32 cp39-win32 cp310-win32 cp311-win32 # cp37-win32 has wheels!
CIBW_TEST_SKIP: cp38-win32 cp39-win32 cp310-win32 cp311-win32 cp312-win32 # cp37-win32 has wheels!
CIBW_TEST_EXTRAS: test
- uses: actions/upload-artifact@v3
with:
Expand Down
26 changes: 18 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
Expand All @@ -18,32 +18,42 @@ repos:
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.10.0
rev: v2.13.0
hooks:
- id: pretty-format-yaml
args: [--autofix]
- repo: https://github.com/tox-dev/pyproject-fmt
rev: 2.1.4
hooks:
- id: pyproject-fmt
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v16.0.6
hooks:
- id: clang-format
- repo: https://github.com/asottile/pyupgrade
rev: v3.10.1
rev: v3.16.0
hooks:
- id: pyupgrade
args: [--py37-plus]
- repo: https://github.com/psf/black
rev: 23.7.0
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.4.2
hooks:
- id: black
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/pycqa/flake8
rev: 6.1.0
rev: 7.1.0
hooks:
- id: flake8
additional_dependencies:
- flake8-annotations
- flake8-bugbear
- flake8-eradicate
- flake8-mutable
- flake8-simplify
- repo: https://github.com/Yelp/detect-secrets
rev: v1.4.0
rev: v1.5.0
hooks:
- id: detect-secrets
12 changes: 9 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
[build-system]
build-backend = "setuptools.build_meta"
requires = [
"setuptools>=42",
"pybind11>=2.10.0",
"pybind11>=2.10",
"setuptools>=42",
]
build-backend = "setuptools.build_meta"

[tool.black]
line-length = 120

[tool.ruff]
line-length = 120

[tool.isort]
profile = "black"
line_length = 120

[tool.bandit]
skips = [ "B101" ]
2 changes: 1 addition & 1 deletion tests/test_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def test_decompress_ssim(self):

def test_decompress_memory(self):
paths = sorted(BASEPATH.glob("*.jpg"))
for i in range(10): # fixme: check mem growth
for _i in range(10): # fixme: check mem growth
for path in paths:
bytes_result = decompress(path.read_bytes())
np.array(bytes_result, copy=False)
Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[flake8]
max-line-length = 120
select = E7, E9, W2, W3, W6, F
select = B, E7, E9, W2, W3, W6, F
ignore = B011, E704
exclude = .git,.github,.hypothesis,.mypy_cache,__pycache__,build,dist

0 comments on commit 2764e93

Please sign in to comment.