Compare commits

..
43 Commits
Author SHA1 Message Date
Joe Rickerby 2c7c2c8fc7 'Bump version: v1.10.1' 2021-05-01 18:23:18 +01:00
Joe Rickerby f0759803a3 fix: occasional nuget error (#653)
* Try some things to debug Travis failures

* Perhaps there is a config file

* Update .travis.yml

* Update .travis.yml

* Add -FallbackSource to nuget invocation

* Update windows.py

* Tidy things up
2021-04-30 17:41:19 -04:00
Joe Rickerby 75af5944f5 Merge pull request #650 from joerick/docs-updates 2021-04-30 12:20:11 +01:00
Joe Rickerby 2737add6e5 Merge remote-tracking branch 'origin/master' into docs-updates 2021-04-30 11:14:13 +01:00
Joe Rickerby e11c9070ce Add a cross-link between the CPP discussion and the FAQ entry. 2021-04-30 11:10:54 +01:00
Henry SchreinerandJoe Rickerby dff3aca4b6 style: second set of updates (#651)
* style: second set of updates

* style: more updates from joerick

Co-authored-by: Joe Rickerby <joerick@mac.com>

Co-authored-by: Joe Rickerby <joerick@mac.com>
2021-04-29 20:21:42 -04:00
Joe Rickerby 07b87ea651 Add Windows 2.7 FAQ entry. 2021-04-27 19:06:33 +01:00
Joe RickerbyandYannick Jadoul 0d08a1c85e Apply suggestions from code review
Co-authored-by: Yannick Jadoul <yannick.jadoul@belgacom.net>
2021-04-27 08:55:39 +01:00
pre-commit-ci[bot] 38ae494c0d [pre-commit.ci] pre-commit autoupdate (#652) 2021-04-26 15:24:46 -04:00
Henry Schreiner 38f52569aa refactor: string and setup.cfg normalization (#593) 2021-04-25 12:38:28 -04:00
Henry Schreiner 2f47e64225 chore: cleanup style in bin (#648)
* chore: cleanup style for bump_version

* chore: cleanup style for other bin items
2021-04-25 03:45:27 -04:00
Henry Schreiner 22d473acc0 fix: drop Python 2.7 on Windows using 2008 compiler 2021-04-25 00:55:16 -04:00
Henry Schreiner f27943608b ci: fix choco usage
Following https://docs.chocolatey.org/en-us/choco/commands/#scripting-integration-best-practices-style-guide
2021-04-25 00:55:16 -04:00
Joe Rickerby d8dd54af11 Update options.md 2021-04-23 15:38:01 +01:00
Joe Rickerby 9975f9c9bb Copy pass over Options page - readability improvements and extra info 2021-04-23 12:43:56 +01:00
Joe Rickerby a50dffd844 Fix formatting of code blocks in admonitions 2021-04-23 12:42:44 +01:00
Joe Rickerby c6ede9b542 Remove some of the backtick token formatting.
Using the backtick too much breaks up the flow of the text and makes it
hard to read. Here, I'm deciding that project names are not backtick'd,
unless they're referring to something the user would type. e.g.

 the `manylinux` project
 the manylinux project

 set `CIBW_MANYLINUX_IMAGE` to manylinux2010
 set `CIBW_MANYLINUX_IMAGE` to `manylinux2010`
2021-04-23 12:11:43 +01:00
Joe Rickerby 04837dd593 Get rid of huge repetitive MANYLINUX_IMAGE header 2021-04-23 11:06:08 +01:00
Joe Rickerby e9df889f56 Typography tweaks 2021-04-23 11:05:27 +01:00
Joe Rickerby 940b48f7e6 add note about 3.6+ 2021-04-23 10:59:07 +01:00
Joe Rickerby 9c797c271b Add delvewheel shoutout
Fix #459
2021-04-23 10:34:01 +01:00
Joe Rickerby e6cab342a8 Merge pull request #640 from joerick/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2021-04-22 15:11:51 +01:00
pre-commit-ci[bot] 4ac219c6f0 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v2.11.0 → v2.12.0](https://github.com/asottile/pyupgrade/compare/v2.11.0...v2.12.0)
- [github.com/PyCQA/flake8: 3.9.0 → 3.9.1](https://github.com/PyCQA/flake8/compare/3.9.0...3.9.1)
2021-04-19 16:41:13 +00:00
Jack Ting 1344fd4bd1 Bug fix: windows does not have 'which' command (#641) 2021-04-14 13:54:54 +02:00
probot-auto-merge[bot] 88e993f452 Merge pull request #636 from joerick/update-dependencies-pr
[Bot] Update dependencies
2021-04-06 07:15:33 +00:00
mayeut 5bc6b02eea Update dependencies 2021-04-06 05:51:46 +00:00
probot-auto-merge[bot] 9f1f5f640d Merge pull request #635 from joerick/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2021-04-05 17:54:53 +00:00
pre-commit-ci[bot] 710a3095f2 [pre-commit.ci] pre-commit autoupdate 2021-04-05 16:44:43 +00:00
github-actions[bot]andmayeut b9099f35a0 Update dependencies (#634)
Co-authored-by: mayeut <mayeut@users.noreply.github.com>
2021-04-05 11:33:28 +02:00
github-actions[bot]andmayeut 076d6b7594 Update dependencies (#631)
Co-authored-by: mayeut <mayeut@users.noreply.github.com>
2021-03-29 11:07:12 +02:00
Joe Rickerby b142b09e22 ci: make GHA pre-commit check a precursor to main test (#624)
* Remove GHA pre-commit check

This check was the same as the check performed by pre-commit.ci, except that the pre-commit.ci is a bit faster and can fix some issues itself, so I'm removing the GHA one in favour of the pre-commit one.

* Add back precommit check and use it as a precursor

This will prevent us wasting CI time on builds that failed precommit
2021-03-26 10:33:55 -04:00
5cbe3e2254 style: apply some cleanups from Sourcery.ai (#626)
* style: apply some fixes from Sorcery

* Apply suggestions from code review

Co-authored-by: Yannick Jadoul <yannick.jadoul@belgacom.net>
Co-authored-by: Joe Rickerby <joerick@mac.com>

Co-authored-by: Yannick Jadoul <yannick.jadoul@belgacom.net>
Co-authored-by: Joe Rickerby <joerick@mac.com>
2021-03-24 23:23:27 +01:00
pre-commit-ci[bot]andpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> 96aa38b56c [pre-commit.ci] pre-commit autoupdate (#622)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-03-22 14:35:46 -04:00
github-actions[bot]andmayeut 4aecdff16a chore: update dependencies (#625)
Co-authored-by: mayeut <mayeut@users.noreply.github.com>
2021-03-22 12:47:58 -04:00
Matti PicusandYannick Jadoul 6b832703a4 docs: mention apt-get for manylinux2_24 (#623)
* mention apt-get for manylinux2_24

* Fix typo

* Undo reflow; pushing to a potentially separate PR

Co-authored-by: Yannick Jadoul <yannick.jadoul@belgacom.net>
2021-03-18 15:03:04 -04:00
github-actions[bot] d223db13d8 Update dependencies (#617) 2021-03-08 09:24:28 -05:00
github-actions[bot]andhenryiii c9451facbd Update dependencies (#610)
Co-authored-by: henryiii <henryiii@users.noreply.github.com>
2021-03-04 08:56:13 -05:00
Joe Rickerby 38d713fef6 Minor docs updates (#609) 2021-03-04 08:55:19 -05:00
Henry Schreiner 4b5e9d8e88 docs: add PyPI field and a few more projects (#606)
* docs: add PyPI field and a few more projects

* chore: run ./bin/projects.py
2021-03-04 08:54:42 -05:00
Matti Picus 07447ff66c add search plugin (#616) 2021-03-04 12:17:30 +01:00
Henry Schreiner 845bfda599 fix: macos11 universal naming corrected (#614) 2021-03-03 13:50:14 -05:00
Arnav JindalandYannick Jadoul bc93615baa docs: add polaroid to docs/data/projects.yml (#613)
* Update projects.yml

* Update docs/data/projects.yml

Co-authored-by: Yannick Jadoul <yannick.jadoul@belgacom.net>

* Update README.md through bin/project.py

Co-authored-by: Yannick Jadoul <yannick.jadoul@belgacom.net>
2021-03-03 10:54:22 -05:00
Joe Rickerby 86b00da754 Minor docs updates 2021-02-26 16:36:35 +00:00
57 changed files with 533 additions and 388 deletions
+2 -5
View File
@@ -21,6 +21,7 @@ jobs:
test:
name: Test cibuildwheel on ${{ matrix.os }}
needs: pre-commit
runs-on: ${{ matrix.os }}
strategy:
matrix:
@@ -38,11 +39,6 @@ jobs:
run: |
python -m pip install -e ".[dev]"
- name: Install Visual C++ for Python 2.7
if: runner.os == 'Windows'
run: |
choco install vcpython27 -f -y
- name: Get PR labels
id: pr-labels
uses: joerick/pr-labels-action@v1.0.6
@@ -70,6 +66,7 @@ jobs:
test-emulated:
name: Test emulated cibuildwheel using qemu
needs: pre-commit
runs-on: ubuntu-latest
timeout-minutes: 180
steps:
+19 -7
View File
@@ -6,22 +6,30 @@ repos:
- id: check-case-conflict
- id: check-merge-conflict
- id: check-yaml
- id: check-toml
- id: debug-statements
- id: end-of-file-fixer
exclude: (cibuildwheel/resources/pinned_docker_images.cfg)|(.svg$)
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/PyCQA/isort
rev: 5.7.0
rev: 5.8.0
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 20.8b1
rev: 21.4b1
hooks:
- id: black
files: ^bin/update_pythons.py|setup.py$
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v1.17.0
hooks:
- id: setup-cfg-fmt
stages: [manual]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.812
hooks:
@@ -36,20 +44,24 @@ repos:
args: ["--python-version=3.7", "--ignore-missing-imports", "--scripts-are-modules"]
- repo: https://github.com/asottile/pyupgrade
rev: v2.10.0
rev: v2.13.0
hooks:
- id: pyupgrade
name: PyUpgrade 3.6+
args: ["--py36-plus"]
exclude: ^bin/
- id: pyupgrade
name: PyUpgrade 3.7+ on bin
exclude: ^(cibuildwheel|unit_test|test)/
args: ["--py37-plus"]
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
- repo: https://github.com/PyCQA/flake8
rev: 3.9.1
hooks:
- id: flake8
exclude: cibuildwheel/resources/
additional_dependencies: [flake8-bugbear]
# The original pybind11 checks for a few C++ style items
- repo: local
hooks:
- id: disallow-caps
+3 -3
View File
@@ -36,9 +36,9 @@ jobs:
os: windows
language: shell
before_install:
- choco install python3 --version 3.6.8 --no-progress -y
# Update root certificates to fix SSL error; see http://www.chawn.com/RootCerts.htm
- powershell "md C:\temp\certs; CertUtil -generateSSTFromWU C:\temp\certs\RootStore.sst; Get-ChildItem -Path C:\\temp\certs\Rootstore.sst | Import-Certificate -CertStoreLocation Cert:\\LocalMachine\\Root\\ | out-null"
- choco upgrade python3 -y --version 3.6.8 --limit-output
# Update root certificates to fix SSL error; see http://www.chawn.com/RootCerts.htm
- powershell "md C:\temp\certs; CertUtil -generateSSTFromWU C:\temp\certs\RootStore.sst; Get-ChildItem -Path C:\\temp\certs\Rootstore.sst | Import-Certificate -CertStoreLocation Cert:\\LocalMachine\\Root\\ | out-null"
env:
- PYTHON=C:\\Python36\\python
+70 -51
View File
@@ -34,7 +34,7 @@ What does it do?
| PyPy 3.6 v7.3.3 | ✅ | | | ✅ | ✅ | | | | |
| PyPy 3.7 (beta) v7.3.3 | ✅ | | | ✅ | ✅ | | | | |
<sup>¹ Not supported on Travis</sup><br>
<sup>¹ Only using a workaround with a newer compiler; Microsoft removed the 2008 compiler for Python 2.7 in April 2021.</sup><br>
- Builds manylinux, macOS 10.9+, and Windows wheels for CPython and PyPy
- Works on GitHub Actions, Azure Pipelines, Travis CI, AppVeyor, CircleCI, and GitLab CI
@@ -86,7 +86,7 @@ jobs:
- uses: actions/setup-python@v2
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==1.10.0
run: python -m pip install cibuildwheel==1.10.1
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
@@ -161,15 +161,18 @@ Here are some repos that use cibuildwheel.
| [Parselmouth][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python interface to the Praat software package, using pybind11, C++17 and CMake, with the core Praat static library built only once and shared between wheels. |
| [python-rapidjson][] | ![travisci icon][] ![gitlab icon][] ![appveyor icon][] | ![windows icon][] ![linux icon][] | Python wrapper around rapidjson |
| [Rtree][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Rtree: spatial index for Python GIS ¶ |
| [python-snappy][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Python bindings for the snappy google library |
| [markupsafe][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Safely add untrusted strings to HTML/XML markup. |
| [KDEpy][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Kernel Density Estimation in Python |
| [cyvcf2][] | ![github icon][] | ![apple icon][] ![linux icon][] | cython + htslib == fast VCF and BCF processing |
| [pybind11 cmake_example][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Example pybind11 module built with a CMake-based build system |
| [pybind11 python_example][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Example pybind11 module built with a Python-based build system |
| [sourmash][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Compute and compare MinHash signatures for DNA data sets. |
| [dd-trace-py][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Uses custom alternate arch emulation on GitHub |
| [iminuit][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Jupyter-friendly Python interface for C++ MINUIT2 |
| [jq.py][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | Python bindings for jq |
| [matrixprofile][] | ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python 3 library making time series data mining tasks, utilizing matrix profile algorithms, accessible to everyone. |
| [time-machine][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Time mocking library using only the CPython C API. |
| [matrixprofile][] | ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python 3 library making time series data mining tasks, utilizing matrix profile algorithms, accessible to everyone. |
| [CTranslate2][] | ![github icon][] | ![apple icon][] ![linux icon][] | Includes libraries from the [Intel oneAPI toolkit](https://software.intel.com/content/www/us/en/develop/tools/oneapi/base-toolkit.html). The Linux wheels also include CUDA libraries for GPU execution. |
| [Tokenizer][] | ![github icon][] ![travisci icon][] | ![apple icon][] ![linux icon][] | Fast and customizable text tokenization library with BPE and SentencePiece support |
| [bx-python][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | A library that includes Cython extensions. |
@@ -182,6 +185,7 @@ Here are some repos that use cibuildwheel.
| [fathon][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | python package for DFA (Detrended Fluctuation Analysis) and related algorithms |
| [Imagecodecs (fork)][] | ![azurepipelines icon][] | ![apple icon][] ![linux icon][] | Over 20 external dependencies in compiled libraries, custom docker image, `libomp`, `openblas` and `install_name_tool` for macOS. |
| [pyinstrument_cext][] | ![travisci icon][] ![appveyor icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A simple C extension, without external dependencies |
| [polaroid][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Full range of wheels for setuptools rust, with auto release and PyPI deploy. |
| [xmlstarlet][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Python 3.6+ CFFI bindings with true MSVC build. |
| [pybind11 scikit_build_example][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | An example combining scikit-build and pybind11 |
@@ -209,15 +213,18 @@ Here are some repos that use cibuildwheel.
[Parselmouth]: https://github.com/YannickJadoul/Parselmouth
[python-rapidjson]: https://github.com/python-rapidjson/python-rapidjson
[Rtree]: https://github.com/Toblerity/rtree
[python-snappy]: https://github.com/andrix/python-snappy
[markupsafe]: https://github.com/pallets/markupsafe
[KDEpy]: https://github.com/tommyod/KDEpy
[cyvcf2]: https://github.com/brentp/cyvcf2
[pybind11 cmake_example]: https://github.com/pybind/cmake_example
[pybind11 python_example]: https://github.com/pybind/python_example
[sourmash]: https://github.com/dib-lab/sourmash
[dd-trace-py]: https://github.com/DataDog/dd-trace-py
[iminuit]: https://github.com/scikit-hep/iminuit
[jq.py]: https://github.com/mwilliamson/jq.py
[matrixprofile]: https://github.com/matrix-profile-foundation/matrixprofile
[time-machine]: https://github.com/adamchainz/time-machine
[matrixprofile]: https://github.com/matrix-profile-foundation/matrixprofile
[CTranslate2]: https://github.com/OpenNMT/CTranslate2
[Tokenizer]: https://github.com/OpenNMT/Tokenizer
[bx-python]: https://github.com/bxlab/bx-python
@@ -230,6 +237,7 @@ Here are some repos that use cibuildwheel.
[fathon]: https://github.com/stfbnc/fathon
[Imagecodecs (fork)]: https://github.com/czaki/imagecodecs_build
[pyinstrument_cext]: https://github.com/joerick/pyinstrument_cext
[polaroid]: https://github.com/daggy1234/polaroid
[xmlstarlet]: https://github.com/dimitern/xmlstarlet
[pybind11 scikit_build_example]: https://github.com/pybind/scikit_build_example
@@ -243,53 +251,57 @@ Here are some repos that use cibuildwheel.
[apple icon]: docs/data/readme_icons/apple.svg
[linux icon]: docs/data/readme_icons/linux.svg
<!-- scikit-learn: 44623, last pushed 0 days ago -->
<!-- Matplotlib: 13149, last pushed 0 days ago -->
<!-- MyPy: 9944, last pushed 0 days ago -->
<!-- psutil: 7071, last pushed 1 days ago -->
<!-- scikit-image: 4193, last pushed 0 days ago -->
<!-- twisted-iocpsupport: 4172, last pushed 2 days ago -->
<!-- websockets: 3196, last pushed 1 days ago -->
<!-- pyzmq: 2696, last pushed 1 days ago -->
<!-- aiortc: 2216, last pushed 0 days ago -->
<!-- numexpr: 1538, last pushed 7 days ago -->
<!-- coverage.py: 1501, last pushed 3 days ago -->
<!-- h5py: 1483, last pushed 0 days ago -->
<!-- River: 1395, last pushed 0 days ago -->
<!-- PyAV: 1169, last pushed 5 days ago -->
<!-- Dependency Injector: 1132, last pushed 0 days ago -->
<!-- PyTables: 1003, last pushed 5 days ago -->
<!-- ruptures: 623, last pushed 6 days ago -->
<!-- aioquic: 583, last pushed 3 days ago -->
<!-- google neuroglancer: 565, last pushed 13 days ago -->
<!-- pikepdf: 540, last pushed 18 days ago -->
<!-- AutoPy: 520, last pushed 163 days ago -->
<!-- Parselmouth: 466, last pushed 0 days ago -->
<!-- python-rapidjson: 416, last pushed 68 days ago -->
<!-- Rtree: 387, last pushed 57 days ago -->
<!-- KDEpy: 242, last pushed 4 days ago -->
<!-- cyvcf2: 242, last pushed 5 days ago -->
<!-- pybind11 cmake_example: 233, last pushed 65 days ago -->
<!-- pybind11 python_example: 232, last pushed 10 days ago -->
<!-- dd-trace-py: 213, last pushed 0 days ago -->
<!-- iminuit: 169, last pushed 8 days ago -->
<!-- jq.py: 144, last pushed 9 days ago -->
<!-- matrixprofile: 133, last pushed 23 days ago -->
<!-- time-machine: 131, last pushed 0 days ago -->
<!-- CTranslate2: 129, last pushed 1 days ago -->
<!-- Tokenizer: 123, last pushed 3 days ago -->
<!-- bx-python: 95, last pushed 59 days ago -->
<!-- boost-histogram: 68, last pushed 0 days ago -->
<!-- pybase64: 55, last pushed 2 days ago -->
<!-- TgCrypto: 53, last pushed 94 days ago -->
<!-- etebase-py: 45, last pushed 46 days ago -->
<!-- pyjet: 27, last pushed 10 days ago -->
<!-- numpythia: 24, last pushed 10 days ago -->
<!-- fathon: 21, last pushed 18 days ago -->
<!-- Imagecodecs (fork): 15, last pushed 8 days ago -->
<!-- pyinstrument_cext: 10, last pushed 7 days ago -->
<!-- xmlstarlet: 7, last pushed 3 days ago -->
<!-- pybind11 scikit_build_example: 4, last pushed 28 days ago -->
<!-- scikit-learn: 44749, last pushed 0 days ago -->
<!-- Matplotlib: 13218, last pushed 0 days ago -->
<!-- MyPy: 10122, last pushed 0 days ago -->
<!-- psutil: 7128, last pushed 7 days ago -->
<!-- scikit-image: 4220, last pushed 0 days ago -->
<!-- twisted-iocpsupport: 4184, last pushed 0 days ago -->
<!-- websockets: 3217, last pushed 13 days ago -->
<!-- pyzmq: 2707, last pushed 13 days ago -->
<!-- aiortc: 2244, last pushed 0 days ago -->
<!-- numexpr: 1548, last pushed 0 days ago -->
<!-- coverage.py: 1515, last pushed 1 days ago -->
<!-- h5py: 1485, last pushed 0 days ago -->
<!-- River: 1428, last pushed 0 days ago -->
<!-- PyAV: 1182, last pushed 2 days ago -->
<!-- Dependency Injector: 1163, last pushed 0 days ago -->
<!-- PyTables: 1005, last pushed 18 days ago -->
<!-- ruptures: 637, last pushed 1 days ago -->
<!-- aioquic: 587, last pushed 15 days ago -->
<!-- google neuroglancer: 568, last pushed 5 days ago -->
<!-- pikepdf: 548, last pushed 0 days ago -->
<!-- AutoPy: 519, last pushed 175 days ago -->
<!-- Parselmouth: 471, last pushed 0 days ago -->
<!-- python-rapidjson: 415, last pushed 80 days ago -->
<!-- Rtree: 388, last pushed 69 days ago -->
<!-- python-snappy: 386, last pushed 6 days ago -->
<!-- markupsafe: 365, last pushed 2 days ago -->
<!-- KDEpy: 242, last pushed 16 days ago -->
<!-- cyvcf2: 242, last pushed 17 days ago -->
<!-- pybind11 cmake_example: 239, last pushed 77 days ago -->
<!-- pybind11 python_example: 235, last pushed 22 days ago -->
<!-- sourmash: 235, last pushed 0 days ago -->
<!-- dd-trace-py: 217, last pushed 0 days ago -->
<!-- iminuit: 172, last pushed 20 days ago -->
<!-- jq.py: 147, last pushed 7 days ago -->
<!-- time-machine: 139, last pushed 4 days ago -->
<!-- matrixprofile: 138, last pushed 36 days ago -->
<!-- CTranslate2: 133, last pushed 0 days ago -->
<!-- Tokenizer: 126, last pushed 0 days ago -->
<!-- bx-python: 97, last pushed 2 days ago -->
<!-- boost-histogram: 69, last pushed 0 days ago -->
<!-- pybase64: 56, last pushed 1 days ago -->
<!-- TgCrypto: 52, last pushed 106 days ago -->
<!-- etebase-py: 46, last pushed 58 days ago -->
<!-- pyjet: 27, last pushed 7 days ago -->
<!-- numpythia: 25, last pushed 7 days ago -->
<!-- fathon: 22, last pushed 31 days ago -->
<!-- Imagecodecs (fork): 16, last pushed 4 days ago -->
<!-- pyinstrument_cext: 10, last pushed 19 days ago -->
<!-- polaroid: 9, last pushed 0 days ago -->
<!-- xmlstarlet: 7, last pushed 1 days ago -->
<!-- pybind11 scikit_build_example: 4, last pushed 40 days ago -->
<!-- END bin/projects.py -->
@@ -313,6 +325,13 @@ Changelog
<!--changelog-start-->
### v1.11.0
- 📚 Lots of docs improvements! (#650, #623, #616, #609, #606)
- 🐛 Fix nuget "Package is not found" error on Windows. (#653)
- ⚠️ cibuildwheel will no longer build Windows 2.7 wheels, unless you specify a custom toolchain using `DISTUTILS_USE_SDK=1` and `MSSdk=1`. This is because Microsoft have stopped distributing Visual C++ Compiler for Python 2.7. See [this FAQ entry](https://cibuildwheel.readthedocs.io/en/stable/faq/#windows-and-python-27) for more details. (#649)
- 🐛 Fix crash on Windows due to missing `which` command (#641).
### v1.10.0
_22 Feb 2021_
-4
View File
@@ -26,8 +26,6 @@ jobs:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.6'
- script: choco install vcpython27 -f -y
displayName: Install Visual C++ for Python 2.7
- bash: |
python -m pip install -e ".[dev]" pytest-azurepipelines
python ./bin/run_tests.py
@@ -39,8 +37,6 @@ jobs:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.8'
- script: choco install vcpython27 -f -y
displayName: Install Visual C++ for Python 2.7
- bash: |
python -m pip install -e ".[dev]" pytest-azurepipelines
python ./bin/run_tests.py
+26 -23
View File
@@ -1,6 +1,8 @@
#!/usr/bin/env python3
from __future__ import annotations
import glob
import os
import subprocess
@@ -25,24 +27,26 @@ config = [
('setup.cfg', "version = {}"),
]
RED = "\u001b[31m"
GREEN = "\u001b[32m"
OFF = "\u001b[0m"
# This file requires Python 3.7
# Setting -> None will cause MyPy to notice this.
@click.command()
def bump_version():
def bump_version() -> None:
current_version = cibuildwheel.__version__
try:
commit_date_str = subprocess.run([
'git',
'show', '-s', '--pretty=format:%ci',
f'v{current_version}^{{commit}}'
'show', '--no-patch', '--pretty=format:%ci',
f'v{current_version}^{{commit}}',
], check=True, capture_output=True, encoding='utf8').stdout
commit_date_parts = commit_date_str.split(' ')
cd_date, cd_time, cd_tz = commit_date_str.split(' ')
url_opts = urllib.parse.urlencode({'q': f'is:pr merged:>{cd_date}T{cd_time}{cd_tz}'})
url = f'https://github.com/joerick/cibuildwheel/pulls?{url_opts}'
url = 'https://github.com/joerick/cibuildwheel/pulls?' + urllib.parse.urlencode({
'q': f'is:pr merged:>{commit_date_parts[0]}T{commit_date_parts[1]}{commit_date_parts[2]}',
})
print(f'PRs merged since last release:\n {url}')
print()
except subprocess.CalledProcessError as e:
@@ -56,8 +60,10 @@ def bump_version():
print('error: Uncommitted changes detected.')
sys.exit(1)
# fmt: off
print( 'Current version:', current_version) # noqa
new_version = input(' New version: ').strip()
# fmt: on
try:
Version(new_version)
@@ -72,7 +78,7 @@ def bump_version():
paths = [Path(p) for p in glob.glob(path_pattern)]
if not paths:
print(f'error: Pattern {path_pattern} didnt match any files')
print(f"error: Pattern {path_pattern} didn't match any files")
sys.exit(1)
find_pattern = version_pattern.format(current_version)
@@ -84,11 +90,11 @@ def bump_version():
if find_pattern in contents:
found_at_least_one_file_needing_update = True
actions.append(
(path, find_pattern, replace_pattern)
(path, find_pattern, replace_pattern,)
)
if not found_at_least_one_file_needing_update:
print(f'error: Didnt find any occurrences of {find_pattern} in {path_pattern}')
print(f'''error: Didn't find any occurrences of "{find_pattern}" in "{path_pattern}"''')
sys.exit(1)
print()
@@ -96,10 +102,8 @@ def bump_version():
print()
for action in actions:
print('{} {red}{}{off}{green}{}{off}'.format(
*action,
red="\u001b[31m", green="\u001b[32m", off="\u001b[0m"
))
path, find, replace = action
print(f'{path} {RED}{find}{OFF}{GREEN}{replace}{OFF}')
print(f'Then commit, and tag as v{new_version}')
@@ -123,21 +127,20 @@ def bump_version():
subprocess.run([
'git', 'commit',
'-a',
'-m', f'Bump version: v{new_version}'
'--all',
f"--message='Bump version: v{new_version}'",
], check=True)
subprocess.run([
'git', 'tag',
'-a',
'-m', f'v{new_version}',
f'v{new_version}'
'--annotate',
f"--message='v{new_version}'",
f'v{new_version}',
], check=True)
print('Done.')
if __name__ == '__main__':
os.chdir(os.path.dirname(__file__))
os.chdir('..')
os.chdir(Path(__file__).parent.parent.resolve())
bump_version()
+10 -7
View File
@@ -1,5 +1,7 @@
#!/usr/bin/env python3
from __future__ import annotations
import os
import sys
import textwrap
@@ -49,17 +51,18 @@ def main():
return
shell('git commit -a -m "Update dependencies"', check=True)
run(
[
'gh', 'pr', 'create',
'--repo', 'joerick/cibuildwheel',
'--base', 'master',
'--title', 'Update dependencies',
'--body', textwrap.dedent(f'''
body = textwrap.dedent(f'''
Update the versions of our dependencies.
PR generated by `{os.path.basename(__file__)}`.
''')
run(
[
'gh', 'pr', 'create',
'--repo=joerick/cibuildwheel',
'--base=master',
"--title='Update dependencies'",
f"--body='{body}'",
],
check=True
)
+13 -11
View File
@@ -9,14 +9,17 @@ Suggested usage:
git diff
"""
from __future__ import annotations
import builtins
import functools
import textwrap
import urllib.request
import xml.dom.minidom
from datetime import datetime
from io import StringIO
from pathlib import Path
from typing import Any, Dict, List, Optional, TextIO
from typing import Any, TextIO
import click
import yaml
@@ -38,7 +41,7 @@ ICONS = (
class Project:
NAME: int = 0
def __init__(self, config: Dict[str, Any], github: Optional[Github] = None):
def __init__(self, config: dict[str, Any], github: Github | None = None):
try:
self.name: str = config["name"]
self.gh: str = config["gh"]
@@ -48,8 +51,8 @@ class Project:
self.stars_repo: str = config.get("stars", self.gh)
self.notes: str = config.get("notes", "")
self.ci: List[str] = config.get("ci", [])
self.os: List[str] = config.get("os", [])
self.ci: list[str] = config.get("ci", [])
self.os: list[str] = config.get("os", [])
self.online = github is not None
if github is not None:
@@ -72,7 +75,7 @@ class Project:
name_len = len(self.name) + 4
self.__class__.NAME = max(self.__class__.NAME, name_len)
def __lt__(self, other: "Project") -> bool:
def __lt__(self, other: Project) -> bool:
if self.online:
return self.num_stars < other.num_stars
else:
@@ -80,10 +83,9 @@ class Project:
@classmethod
def header(cls) -> str:
return (
f"| {'Name':{cls.NAME}} | CI | OS | Notes |\n"
f"|{'':-^{cls.NAME+2 }}|----|----|:------|"
)
return textwrap.dedent(f"""\
| {'Name':{cls.NAME}} | CI | OS | Notes |
|{'':-^{cls.NAME+2 }}|----|----|:------|""")
@property
def namelink(self) -> str:
@@ -140,7 +142,7 @@ def path_for_icon(icon_name: str) -> Path:
def str_projects(
config: List[Dict[str, Any]], *, online: bool = True, auth: Optional[str] = None
config: list[dict[str, Any]], *, online: bool = True, auth: str | None = None,
) -> str:
io = StringIO()
print = functools.partial(builtins.print, file=io)
@@ -178,7 +180,7 @@ def str_projects(
@click.option("--auth", help="GitHub authentication token")
@click.option("--readme", type=click.File("r+"), help="Modify a readme file if given")
def projects(
input: TextIO, online: bool, auth: Optional[str], readme: Optional[TextIO]
input: TextIO, online: bool, auth: str | None, readme: TextIO | None
) -> None:
config = yaml.safe_load(input)
output = str_projects(config, online=online, auth=auth)
+5 -2
View File
@@ -1,5 +1,7 @@
#!/usr/bin/env python3
from __future__ import annotations
import os
import shutil
import sys
@@ -123,13 +125,14 @@ def run_example_ci_configs(config_files=None):
shutil.copyfile(src_config_file, dst_config_file)
run(['git', 'add', example_project], check=True)
run(['git', 'commit', '--no-verify', '-m', textwrap.dedent(f'''
message = textwrap.dedent(f'''
Test example minimal configs
Testing files: {config_files}
Generated from branch: {previous_branch}
Time: {timestamp}
''')], check=True)
''')
run(['git', 'commit', '--no-verify', '--message', message], check=True)
shell(f'git subtree --prefix={example_project} push origin {branch_name}', check=True)
print('---')
+2
View File
@@ -1,5 +1,7 @@
#!/usr/bin/env python3
from __future__ import annotations
import argparse
import os
import subprocess
+13 -9
View File
@@ -1,11 +1,12 @@
#!/usr/bin/env python3
from __future__ import annotations
import configparser
import os
import shutil
import subprocess
import sys
from collections import namedtuple
from typing import NamedTuple
import requests
@@ -25,7 +26,7 @@ if '--no-docker' in sys.argv:
'--allow-unsafe',
'--upgrade',
'cibuildwheel/resources/constraints.in',
'--output-file', f'cibuildwheel/resources/constraints-python{python_version}.txt'
'--output-file=cibuildwheel/resources/constraints-python{python_version}.txt',
], check=True)
else:
# latest manylinux2010 image with cpython 2.7 support
@@ -47,14 +48,15 @@ else:
], check=True)
# default constraints.txt
shutil.copyfile(f'cibuildwheel/resources/constraints-python{PYTHON_VERSIONS[-1]}.txt', 'cibuildwheel/resources/constraints.txt')
shutil.copyfile(f'cibuildwheel/resources/constraints-python{PYTHON_VERSIONS[-1]}.txt', 'cibuildwheel/resources/constraints.txt',)
class Image(NamedTuple):
manylinux_version: str
platform: str
image_name: str
tag: str | None
Image = namedtuple('Image', [
'manylinux_version',
'platform',
'image_name',
'tag',
])
images = [
Image('manylinux1', 'x86_64', 'quay.io/pypa/manylinux1_x86_64', None),
@@ -66,12 +68,14 @@ images = [
Image('manylinux2010', 'pypy_x86_64', 'pypywheels/manylinux2010-pypy_x86_64', None),
# 2014 images
Image('manylinux2014', 'x86_64', 'quay.io/pypa/manylinux2014_x86_64', None),
Image('manylinux2014', 'i686', 'quay.io/pypa/manylinux2014_i686', None),
Image('manylinux2014', 'aarch64', 'quay.io/pypa/manylinux2014_aarch64', None),
Image('manylinux2014', 'ppc64le', 'quay.io/pypa/manylinux2014_ppc64le', None),
Image('manylinux2014', 's390x', 'quay.io/pypa/manylinux2014_s390x', None),
# 2_24 images
Image('manylinux_2_24', 'x86_64', 'quay.io/pypa/manylinux_2_24_x86_64', None),
Image('manylinux_2_24', 'i686', 'quay.io/pypa/manylinux_2_24_i686', None),
Image('manylinux_2_24', 'aarch64', 'quay.io/pypa/manylinux_2_24_aarch64', None),
+10 -9
View File
@@ -1,10 +1,12 @@
#!/usr/bin/env python3
from __future__ import annotations
import copy
import difflib
import logging
from pathlib import Path
from typing import Dict, Optional, Union
from typing import Union
import click
import requests
@@ -80,7 +82,7 @@ class WindowsVersions:
versions = (Version(v) for v in cp_info["versions"])
self.versions = sorted(v for v in versions if not v.is_devrelease)
def update_version_windows(self, spec: Specifier) -> Optional[ConfigWinCP]:
def update_version_windows(self, spec: Specifier) -> ConfigWinCP | None:
versions = sorted(v for v in self.versions if spec.contains(v))
if not all(v.is_prerelease for v in versions):
versions = [v for v in versions if not v.is_prerelease]
@@ -91,12 +93,11 @@ class WindowsVersions:
version = versions[-1]
identifier = f"cp{version.major}{version.minor}-{self.arch}"
result = ConfigWinCP(
return ConfigWinCP(
identifier=identifier,
version=str(version),
arch=self.arch_str,
)
return result
class PyPyVersions:
@@ -171,7 +172,7 @@ class CPythonVersions:
releases_info = response.json()
self.versions_dict: Dict[Version, int] = {}
self.versions_dict: dict[Version, int] = {}
for release in releases_info:
# Removing the prefix, Python 3.9 would use: release["name"].removeprefix("Python ")
version = Version(release["name"][7:])
@@ -180,8 +181,8 @@ class CPythonVersions:
uri = int(release["resource_uri"].rstrip("/").split("/")[-1])
self.versions_dict[version] = uri
def update_version_macos(self, identifier: str, spec: Specifier) -> Optional[ConfigMacOS]:
file_idents = ("macos11.0.pkg", "macosx10.9.pkg", "macosx10.6.pkg")
def update_version_macos(self, identifier: str, spec: Specifier) -> ConfigMacOS | None:
file_idents = ("macos11.pkg", "macosx10.9.pkg", "macosx10.6.pkg")
sorted_versions = sorted(v for v in self.versions_dict if spec.contains(v))
for version in reversed(sorted_versions):
@@ -216,13 +217,13 @@ class AllVersions:
self.macos_cpython = CPythonVersions()
self.macos_pypy = PyPyVersions("64")
def update_config(self, config: Dict[str, str]) -> None:
def update_config(self, config: dict[str, str]) -> None:
identifier = config["identifier"]
version = Version(config["version"])
spec = Specifier(f"=={version.major}.{version.minor}.*")
log.info(f"Reading in '{identifier}' -> {spec} @ {version}")
orig_config = copy.copy(config)
config_update: Optional[AnyConfig]
config_update: AnyConfig | None
# We need to use ** in update due to MyPy (probably a bug)
if "macos" in identifier:
+1 -1
View File
@@ -1 +1 @@
__version__ = '1.10.0'
__version__ = '1.10.1'
+14 -6
View File
@@ -73,19 +73,22 @@ def main() -> None:
Python. Default: auto.
''')
arch_list_str = ", ".join(a.name for a in Architecture)
parser.add_argument('--archs',
default=None,
help='''
help=f'''
Comma-separated list of CPU architectures to build for.
When set to 'auto', builds the architectures natively supported
on this machine. Set this option to build an architecture
via emulation, for example, using binfmt_misc and QEMU.
Default: auto.
Choices: auto, auto64, auto32, native, all, {}
'''.format(", ".join(a.name for a in Architecture)))
Choices: auto, auto64, auto32, native, all, {arch_list_str}
''')
parser.add_argument('--output-dir',
default=os.environ.get('CIBW_OUTPUT_DIR', 'wheelhouse'),
help='Destination folder for the wheels.')
parser.add_argument('package_dir',
default='.',
nargs='?',
@@ -99,6 +102,7 @@ def main() -> None:
parser.add_argument('--print-build-identifiers',
action='store_true',
help='Print the build identifiers matched by the current invocation and exit.')
parser.add_argument('--allow-empty',
action='store_true',
help='Do not report an error code if the build does not match any wheels.')
@@ -367,9 +371,13 @@ def detect_warnings(platform: str, build_options: BuildOptions) -> List[str]:
for option_name in ['test_command', 'before_build']:
option_value = getattr(build_options, option_name)
if option_value:
if '{python}' in option_value or '{pip}' in option_value:
warnings.append(option_name + ": '{python}' and '{pip}' are no longer needed, and will be removed in a future release. Simply use 'python' or 'pip' instead.")
if option_value and ('{python}' in option_value or '{pip}' in option_value):
# Reminder: in an f-string, double braces means literal single brace
msg = (
f"{option_name}: '{{python}}' and '{{pip}}' are no longer needed, "
"and will be removed in a future release. Simply use 'python' or 'pip' instead."
)
warnings.append(msg)
return warnings
+3 -6
View File
@@ -58,9 +58,8 @@ def evaluate_word_node(node: bashlex.ast.node, context: NodeExecutionContext) ->
if part_string not in value:
raise RuntimeError(
'bash parse failed. part "{}" not found in "{}". Word was "{}". Full input was "{}"'.format(
part_string, value, node.word, context.input,
)
f'bash parse failed. part "{part_string}" not found in "{value}". '
f'Word was "{node.word}". Full input was "{context.input}"'
)
value = value.replace(part_string, part_value, 1)
@@ -85,9 +84,7 @@ def evaluate_nodes_as_compound_command(nodes: Sequence[bashlex.ast.node], contex
if node.kind == 'command':
result += evaluate_command_node(node, context=context)
elif node.kind == 'operator':
if node.op == ';':
pass
else:
if node.op != ';':
raise ValueError(f'Unsupported bash operator: "{node.op}"')
else:
raise ValueError(f'Unsupported bash node in compound command: "{node.kind}"')
+7 -5
View File
@@ -45,10 +45,10 @@ class DockerContainer:
subprocess.run(
[
'docker', 'create',
'--env', 'CIBUILDWHEEL',
'--name', self.name,
'-i',
'-v', '/:/host', # ignored on CircleCI
'--env=CIBUILDWHEEL',
f'--name={self.name}',
'--interactive',
'--volume=/:/host', # ignored on CircleCI
*cwd_args,
self.docker_image,
*shell_args
@@ -169,13 +169,15 @@ class DockerContainer:
while True:
line = self.bash_stdout.readline()
if line.endswith(b'%s\n' % (bytes(end_of_message, encoding='utf8'))):
if line.endswith(bytes(end_of_message, encoding='utf8') + b'\n'):
# fmt: off
footer_offset = (
len(line)
- 1 # newline character
- len(end_of_message) # delimiter
- 4 # 4 returncode decimals
)
# fmt: on
returncode_str = line[footer_offset:footer_offset+4]
returncode = int(returncode_str)
# add the last line to output, without the footer
+6 -7
View File
@@ -14,11 +14,10 @@ class InlineArrayDictEncoder(toml.encoder.TomlEncoder): # type: ignore
self.dump_funcs[Version] = lambda v: f'"{v}"'
def dump_sections(self, o: Dict[str, Any], sup: str) -> Any:
if all(isinstance(a, list) for a in o.values()):
val = ""
for k, v in o.items():
inner = ",\n ".join(self.dump_inline_table(d_i).strip() for d_i in v)
val += f"{k} = [\n {inner},\n]\n"
return val, self._dict()
else:
if not all(isinstance(a, list) for a in o.values()):
return super().dump_sections(o, sup)
val = ""
for k, v in o.items():
inner = ",\n ".join(self.dump_inline_table(d_i).strip() for d_i in v)
val += f"{k} = [\n {inner},\n]\n"
return val, self._dict()
+3 -3
View File
@@ -31,7 +31,7 @@ class PythonConfiguration(NamedTuple):
def get_python_configurations(
build_selector: BuildSelector,
architectures: Set[Architecture]
architectures: Set[Architecture],
) -> List[PythonConfiguration]:
full_python_configs = read_python_configs('linux')
@@ -159,7 +159,7 @@ def build(options: BuildOptions) -> None:
docker.call([
'pip', 'wheel',
container_package_dir,
'-w', built_wheel_dir,
'--wheel-dir', built_wheel_dir,
'--no-deps',
*get_build_verbosity_extra_flags(options.build_verbosity)
], env=env)
@@ -253,5 +253,5 @@ def troubleshoot(package_dir: Path, error: Exception) -> None:
'''), file=sys.stderr)
print(' Files detected:')
print('\n'.join([f' {f}' for f in so_files]))
print('\n'.join(f' {f}' for f in so_files))
print('')
+29 -23
View File
@@ -233,6 +233,9 @@ def setup_python(python_configuration: PythonConfiguration,
# inconsistencies if it's left unset.
env.setdefault('MACOSX_DEPLOYMENT_TARGET', '10.9')
config_is_arm64 = python_configuration.identifier.endswith('arm64')
config_is_universal2 = python_configuration.identifier.endswith('universal2')
if python_configuration.version == '3.5':
# Cross-compilation platform override - CPython 3.5 has an
# i386/x86_64 version of Python, but we only want a x64_64 build
@@ -246,34 +249,34 @@ def setup_python(python_configuration: PythonConfiguration,
# compatible back to 10.9.
env.setdefault('_PYTHON_HOST_PLATFORM', 'macosx-10.9-x86_64')
env.setdefault('ARCHFLAGS', '-arch x86_64')
elif python_configuration.identifier.endswith('arm64'):
elif config_is_arm64:
# macOS 11 is the first OS with arm64 support, so the wheels
# have that as a minimum.
env.setdefault('_PYTHON_HOST_PLATFORM', 'macosx-11.0-arm64')
env.setdefault('ARCHFLAGS', '-arch arm64')
elif python_configuration.identifier.endswith('universal2'):
elif config_is_universal2:
if get_macos_version() < (10, 16):
# we can do universal2 builds on macos 10.15, but we need to
# set ARCHFLAGS otherwise CPython sets it to `-arch x86_64`
env.setdefault('ARCHFLAGS', '-arch arm64 -arch x86_64')
if python_configuration.identifier.endswith('arm64') or python_configuration.identifier.endswith('universal2'):
if get_macos_version() < (10, 16) and 'SDKROOT' not in env:
# xcode 12.2 or higher can build arm64 on macos 10.15 or below, but
# needs the correct SDK selected.
sdks = get_macos_sdks()
building_arm64 = config_is_arm64 or config_is_universal2
if building_arm64 and get_macos_version() < (10, 16) and 'SDKROOT' not in env:
# xcode 12.2 or higher can build arm64 on macos 10.15 or below, but
# needs the correct SDK selected.
sdks = get_macos_sdks()
# Different versions of Xcode contain different SDK versions...
# we're happy with anything newer than macOS 11.0
arm64_compatible_sdks = [s for s in sdks if not s.startswith('macosx10.')]
# Different versions of Xcode contain different SDK versions...
# we're happy with anything newer than macOS 11.0
arm64_compatible_sdks = [s for s in sdks if not s.startswith('macosx10.')]
if not arm64_compatible_sdks:
log.warning(unwrap('''
if not arm64_compatible_sdks:
log.warning(unwrap('''
SDK for building arm64-compatible wheels not found. You need Xcode 12.2 or later
to build universal2 or arm64 wheels.
'''))
else:
env.setdefault('SDKROOT', arm64_compatible_sdks[0])
else:
env.setdefault('SDKROOT', arm64_compatible_sdks[0])
log.step('Installing build tools...')
call(['pip', 'install', '--upgrade', 'setuptools', 'wheel', 'delocate', *dependency_constraint_flags], env=env)
@@ -299,6 +302,9 @@ def build(options: BuildOptions) -> None:
for config in python_configurations:
log.build_start(config.identifier)
config_is_arm64 = config.identifier.endswith('arm64')
config_is_universal2 = config.identifier.endswith('universal2')
dependency_constraint_flags: Sequence[PathOrStr] = []
if options.dependency_constraints:
dependency_constraint_flags = [
@@ -322,7 +328,7 @@ def build(options: BuildOptions) -> None:
call([
'pip', 'wheel',
options.package_dir.resolve(),
'-w', built_wheel_dir,
'--wheel-dir', built_wheel_dir,
'--no-deps',
*get_build_verbosity_extra_flags(options.build_verbosity)
], env=env)
@@ -339,9 +345,9 @@ def build(options: BuildOptions) -> None:
if options.repair_command:
log.step('Repairing wheel...')
if config.identifier.endswith('universal2'):
if config_is_universal2:
delocate_archs = 'x86_64,arm64'
elif config.identifier.endswith('arm64'):
elif config_is_arm64:
delocate_archs = 'arm64'
else:
delocate_archs = 'x86_64'
@@ -364,28 +370,28 @@ def build(options: BuildOptions) -> None:
machine_arch = platform.machine()
testing_archs: List[Literal['x86_64', 'arm64']] = []
if config.identifier.endswith('_arm64'):
if config_is_arm64:
testing_archs = ['arm64']
elif config.identifier.endswith('_universal2'):
elif config_is_universal2:
testing_archs = ['x86_64', 'arm64']
else:
testing_archs = ['x86_64']
for testing_arch in testing_archs:
if config.identifier.endswith('_universal2'):
if config_is_universal2:
arch_specific_identifier = f'{config.identifier}:{testing_arch}'
if not options.test_selector(arch_specific_identifier):
continue
if machine_arch == 'x86_64' and testing_arch == 'arm64':
if config.identifier.endswith('_arm64'):
if config_is_arm64:
log.warning(unwrap('''
While arm64 wheels can be built on x86_64, they cannot be tested. The
ability to test the arm64 wheels will be added in a future release of
cibuildwheel, once Apple Silicon CI runners are widely available. To
silence this warning, set `CIBW_TEST_SKIP: *-macosx_arm64`.
'''))
elif config.identifier.endswith('_universal2'):
elif config_is_universal2:
log.warning(unwrap('''
While universal2 wheels can be built on x86_64, the arm64 part of them
cannot currently be tested. The ability to test the arm64 part of a
@@ -440,7 +446,7 @@ def build(options: BuildOptions) -> None:
call_with_arch(before_test_prepared, env=virtualenv_env, shell=True)
# install the wheel
call_with_arch(['pip', 'install', str(repaired_wheel) + options.test_extras], env=virtualenv_env)
call_with_arch(['pip', 'install', f"{repaired_wheel}{options.test_extras}"], env=virtualenv_env)
# test the wheel
if options.test_requires:
+8 -8
View File
@@ -40,10 +40,10 @@ python_configurations = [
{ identifier = "cp35-macosx_x86_64", version = "3.5", url = "https://www.python.org/ftp/python/3.5.4/python-3.5.4-macosx10.6.pkg" },
{ identifier = "cp36-macosx_x86_64", version = "3.6", url = "https://www.python.org/ftp/python/3.6.8/python-3.6.8-macosx10.9.pkg" },
{ identifier = "cp37-macosx_x86_64", version = "3.7", url = "https://www.python.org/ftp/python/3.7.9/python-3.7.9-macosx10.9.pkg" },
{ identifier = "cp38-macosx_x86_64", version = "3.8", url = "https://www.python.org/ftp/python/3.8.8/python-3.8.8-macosx10.9.pkg" },
{ identifier = "cp39-macosx_x86_64", version = "3.9", url = "https://www.python.org/ftp/python/3.9.2/python-3.9.2-macos11.pkg" },
{ identifier = "cp39-macosx_arm64", version = "3.9", url = "https://www.python.org/ftp/python/3.9.2/python-3.9.2-macos11.pkg" },
{ identifier = "cp39-macosx_universal2", version = "3.9", url = "https://www.python.org/ftp/python/3.9.2/python-3.9.2-macos11.pkg" },
{ identifier = "cp38-macosx_x86_64", version = "3.8", url = "https://www.python.org/ftp/python/3.8.9/python-3.8.9-macosx10.9.pkg" },
{ identifier = "cp39-macosx_x86_64", version = "3.9", url = "https://www.python.org/ftp/python/3.9.4/python-3.9.4-macos11.pkg" },
{ identifier = "cp39-macosx_arm64", version = "3.9", url = "https://www.python.org/ftp/python/3.9.4/python-3.9.4-macos11.pkg" },
{ identifier = "cp39-macosx_universal2", version = "3.9", url = "https://www.python.org/ftp/python/3.9.4/python-3.9.4-macos11.pkg" },
{ identifier = "pp27-macosx_x86_64", version = "2.7", url = "https://downloads.python.org/pypy/pypy2.7-v7.3.3-osx64.tar.bz2" },
{ identifier = "pp36-macosx_x86_64", version = "3.6", url = "https://downloads.python.org/pypy/pypy3.6-v7.3.3-osx64.tar.bz2" },
{ identifier = "pp37-macosx_x86_64", version = "3.7", url = "https://downloads.python.org/pypy/pypy3.7-v7.3.3-osx64.tar.bz2" },
@@ -59,10 +59,10 @@ python_configurations = [
{ identifier = "cp36-win_amd64", version = "3.6.8", arch = "64" },
{ identifier = "cp37-win32", version = "3.7.9", arch = "32" },
{ identifier = "cp37-win_amd64", version = "3.7.9", arch = "64" },
{ identifier = "cp38-win32", version = "3.8.8", arch = "32" },
{ identifier = "cp38-win_amd64", version = "3.8.8", arch = "64" },
{ identifier = "cp39-win32", version = "3.9.2", arch = "32" },
{ identifier = "cp39-win_amd64", version = "3.9.2", arch = "64" },
{ identifier = "cp38-win32", version = "3.8.9", arch = "32" },
{ identifier = "cp38-win_amd64", version = "3.8.9", arch = "64" },
{ identifier = "cp39-win32", version = "3.9.4", arch = "32" },
{ identifier = "cp39-win_amd64", version = "3.9.4", arch = "64" },
{ identifier = "pp27-win32", version = "2.7", arch = "32", url = "https://downloads.python.org/pypy/pypy2.7-v7.3.3-win32.zip" },
{ identifier = "pp36-win32", version = "3.6", arch = "32", url = "https://downloads.python.org/pypy/pypy3.6-v7.3.3-win32.zip" },
{ identifier = "pp37-win32", version = "3.7", arch = "32", url = "https://downloads.python.org/pypy/pypy3.7-v7.3.3-win32.zip" },
@@ -29,7 +29,7 @@ pathlib2==2.3.5
# virtualenv
scandir==1.10.0
# via pathlib2
singledispatch==3.6.0
singledispatch==3.6.1
# via importlib-resources
six==1.15.0
# via
@@ -37,7 +37,7 @@ six==1.15.0
# virtualenv
typing==3.7.4.3
# via importlib-resources
virtualenv==20.4.2
virtualenv==20.4.3
# via -r cibuildwheel/resources/constraints.in
wheel==0.36.2
# via
@@ -18,7 +18,7 @@ importlib-resources==3.2.1
# via virtualenv
six==1.15.0
# via virtualenv
virtualenv==20.4.2
virtualenv==20.4.3
# via -r cibuildwheel/resources/constraints.in
wheel==0.36.2
# via
@@ -12,21 +12,21 @@ distlib==0.3.1
# via virtualenv
filelock==3.0.12
# via virtualenv
importlib-metadata==3.4.0
importlib-metadata==3.10.0
# via virtualenv
importlib-resources==5.1.0
importlib-resources==5.1.2
# via virtualenv
six==1.15.0
# via virtualenv
typing-extensions==3.7.4.3
# via importlib-metadata
virtualenv==20.4.2
virtualenv==20.4.3
# via -r cibuildwheel/resources/constraints.in
wheel==0.36.2
# via
# -r cibuildwheel/resources/constraints.in
# delocate
zipp==3.4.0
zipp==3.4.1
# via
# importlib-metadata
# importlib-resources
@@ -34,5 +34,5 @@ zipp==3.4.0
# The following packages are considered to be unsafe in a requirements file:
pip==21.0.1
# via -r cibuildwheel/resources/constraints.in
setuptools==53.0.0
setuptools==54.2.0
# via -r cibuildwheel/resources/constraints.in
@@ -12,23 +12,23 @@ distlib==0.3.1
# via virtualenv
filelock==3.0.12
# via virtualenv
importlib-metadata==3.4.0
importlib-metadata==3.10.0
# via virtualenv
six==1.15.0
# via virtualenv
typing-extensions==3.7.4.3
# via importlib-metadata
virtualenv==20.4.2
virtualenv==20.4.3
# via -r cibuildwheel/resources/constraints.in
wheel==0.36.2
# via
# -r cibuildwheel/resources/constraints.in
# delocate
zipp==3.4.0
zipp==3.4.1
# via importlib-metadata
# The following packages are considered to be unsafe in a requirements file:
pip==21.0.1
# via -r cibuildwheel/resources/constraints.in
setuptools==53.0.0
setuptools==54.2.0
# via -r cibuildwheel/resources/constraints.in
@@ -14,7 +14,7 @@ filelock==3.0.12
# via virtualenv
six==1.15.0
# via virtualenv
virtualenv==20.4.2
virtualenv==20.4.3
# via -r cibuildwheel/resources/constraints.in
wheel==0.36.2
# via
@@ -24,5 +24,5 @@ wheel==0.36.2
# The following packages are considered to be unsafe in a requirements file:
pip==21.0.1
# via -r cibuildwheel/resources/constraints.in
setuptools==53.0.0
setuptools==54.2.0
# via -r cibuildwheel/resources/constraints.in
@@ -14,7 +14,7 @@ filelock==3.0.12
# via virtualenv
six==1.15.0
# via virtualenv
virtualenv==20.4.2
virtualenv==20.4.3
# via -r cibuildwheel/resources/constraints.in
wheel==0.36.2
# via
@@ -24,5 +24,5 @@ wheel==0.36.2
# The following packages are considered to be unsafe in a requirements file:
pip==21.0.1
# via -r cibuildwheel/resources/constraints.in
setuptools==53.0.0
setuptools==54.2.0
# via -r cibuildwheel/resources/constraints.in
+2 -2
View File
@@ -14,7 +14,7 @@ filelock==3.0.12
# via virtualenv
six==1.15.0
# via virtualenv
virtualenv==20.4.2
virtualenv==20.4.3
# via -r cibuildwheel/resources/constraints.in
wheel==0.36.2
# via
@@ -24,5 +24,5 @@ wheel==0.36.2
# The following packages are considered to be unsafe in a requirements file:
pip==21.0.1
# via -r cibuildwheel/resources/constraints.in
setuptools==53.0.0
setuptools==54.2.0
# via -r cibuildwheel/resources/constraints.in
+12 -12
View File
@@ -1,27 +1,27 @@
[x86_64]
manylinux1 = quay.io/pypa/manylinux1_x86_64:2021-02-19-3257524
manylinux1 = quay.io/pypa/manylinux1_x86_64:2021-04-05-14df3a6
manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2021-02-06-3d322a5
manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2021-02-20-2c345f8
manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2021-02-20-2c345f8
manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2021-04-05-b4fd19d
manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2021-04-05-b4fd19d
[i686]
manylinux1 = quay.io/pypa/manylinux1_i686:2021-02-19-3257524
manylinux1 = quay.io/pypa/manylinux1_i686:2021-04-05-14df3a6
manylinux2010 = quay.io/pypa/manylinux2010_i686:2021-02-06-3d322a5
manylinux2014 = quay.io/pypa/manylinux2014_i686:2021-02-20-2c345f8
manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2021-02-20-2c345f8
manylinux2014 = quay.io/pypa/manylinux2014_i686:2021-04-05-b4fd19d
manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2021-04-05-b4fd19d
[pypy_x86_64]
manylinux2010 = pypywheels/manylinux2010-pypy_x86_64:2020-12-11-f1e0e80
[aarch64]
manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2021-02-20-2c345f8
manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2021-02-20-2c345f8
manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2021-04-05-b4fd19d
manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2021-04-05-b4fd19d
[ppc64le]
manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2021-02-20-2c345f8
manylinux_2_24 = quay.io/pypa/manylinux_2_24_ppc64le:2021-02-20-2c345f8
manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2021-04-05-b4fd19d
manylinux_2_24 = quay.io/pypa/manylinux_2_24_ppc64le:2021-04-05-b4fd19d
[s390x]
manylinux2014 = quay.io/pypa/manylinux2014_s390x:2021-02-20-2c345f8
manylinux_2_24 = quay.io/pypa/manylinux_2_24_s390x:2021-02-20-2c345f8
manylinux2014 = quay.io/pypa/manylinux2014_s390x:2021-04-05-b4fd19d
manylinux_2_24 = quay.io/pypa/manylinux_2_24_s390x:2021-04-05-b4fd19d
+1 -3
View File
@@ -209,9 +209,7 @@ class NonPlatformWheelError(Exception):
def strtobool(val: str) -> bool:
if val.lower() in ('y', 'yes', 't', 'true', 'on', '1'):
return True
return False
return val.lower() in {'y', 'yes', 't', 'true', 'on', '1'}
class CIProvider(Enum):
+12 -9
View File
@@ -25,7 +25,6 @@ from .util import (
)
IS_RUNNING_ON_AZURE = Path('C:\\hostedtoolcache').exists()
IS_RUNNING_ON_TRAVIS = os.environ.get('TRAVIS_OS_NAME') == 'windows'
def call(args: Sequence[PathOrStr], env: Optional[Dict[str, str]] = None,
@@ -44,8 +43,13 @@ def shell(command: str, env: Optional[Dict[str, str]] = None, cwd: Optional[str]
def get_nuget_args(version: str, arch: str) -> List[str]:
python_name = 'python' if version[0] == '3' else 'python2'
if arch == '32':
python_name = python_name + 'x86'
return [python_name, '-Version', version, '-OutputDirectory', 'C:\\cibw\\python']
python_name += 'x86'
return [
python_name,
'-Version', version,
'-FallbackSource', 'https://api.nuget.org/v3/index.json',
'-OutputDirectory', 'C:\\cibw\\python',
]
class PythonConfiguration(NamedTuple):
@@ -69,10 +73,9 @@ def get_python_configurations(
'64': Architecture.AMD64,
}
# Only supported with custom compiler, since MS removed the 2008 compiler download
custom_compiler = os.environ.get('DISTUTILS_USE_SDK') and os.environ.get('MSSdk')
if IS_RUNNING_ON_TRAVIS and not custom_compiler:
# cannot install VCForPython27.msi which is needed for compiling C software
# try with (and similar): msiexec /i VCForPython27.msi ALLUSERS=1 ACCEPT=YES /passive
if not custom_compiler:
python_configurations = [c for c in python_configurations if not c.version.startswith('2.7')]
# skip builds as required
@@ -295,13 +298,13 @@ def build(options: BuildOptions) -> None:
])
# check that we are using the Python from the virtual environment
call(['which', 'python'], env=virtualenv_env)
call(['where', 'python'], env=virtualenv_env)
if options.before_test:
before_test_prepared = prepare_command(
options.before_test,
project='.',
package=options.package_dir
package=options.package_dir,
)
shell(before_test_prepared, env=virtualenv_env)
@@ -318,7 +321,7 @@ def build(options: BuildOptions) -> None:
test_command_prepared = prepare_command(
options.test_command,
project=Path('.').resolve(),
package=options.package_dir.resolve()
package=options.package_dir.resolve(),
)
shell(test_command_prepared, cwd='c:\\', env=virtualenv_env)
+17 -17
View File
@@ -2,9 +2,9 @@
title: Contributing
---
Wheel-building can be pretty complex. I expect users to find many edge-cases - please help the rest of the community out by documenting these, adding features to support them, and reporting bugs.
Wheel-building can be pretty complex. We expect users to find edge-cases - please help the rest of the community out by documenting these, adding features to support them, and reporting bugs.
I plan to be pretty liberal in accepting pull requests, as long as they align with the design goals below.
If you have an idea for a modification or feature, it's probably best to raise an issue first and discuss it with the maintainer team. Once we have rough consensus on a design, begin work in a PR.
`cibuildwheel` is indie open source. We're not paid to work on this.
@@ -27,12 +27,12 @@ cibuildwheel doesn't really do anything itself - it's always deferring to other
We're not responsible for errors in those tools, for fixing errors/crashes there. But cibuildwheel's job is providing users with an 'integrated' user experience across those tools. We provide an abstraction. The user says 'build me some wheels', not 'open the docker container, build a wheel with pip, fix up the symbols with auditwheel' etc. However, errors have a habit of breaking abstractions. And this is where users get confused, because the mechanism of cibuildwheel is laid bare, and they must understand a little bit how it works to debug.
So, if we can, I'd like to improve the experience on errors as well. In [this](https://github.com/joerick/cibuildwheel/issues/139) case, it takes a bit of knowledge to understand that the linux builds are happening in a totally different OS via docker, that the linked symbols won't match, that auditwheel will fail because of this. A problem with how the tools fit together, instead of the tools themselves.
So, if we can, I'd like to improve the experience on errors as well. In [this](https://github.com/joerick/cibuildwheel/issues/139) case, it takes a bit of knowledge to understand that the Linux builds are happening in a different OS via Docker, that the linked symbols won't match, that auditwheel will fail because of this. A problem with how the tools fit together, instead of the tools themselves.
Maintainer notes
----------------
## Local testing
### Local testing
You should run:
@@ -44,10 +44,9 @@ pip install -e .[dev]
To prepare a development environment.
## Testing minimal configs
### Testing sample configs
cibuildwheel's _minimal_ example configs can be tested on a simple project on cibuildwheel's existing CI. These should be run whenever the minimal configs change.
cibuildwheel's example configs can be tested on a simple project on cibuildwheel's existing CI. These should be run whenever the minimal configs change.
To test minimal configs, make sure you have a clean git repo, then run the script:
@@ -57,9 +56,15 @@ bin/run_example_ci_configs.py
The script will create an isolated 'orphan' commit containing all the minimal config CI files, and a simple C extension project, and push that to a branch on the `origin` repo. The project's CI is already set up to run on branch push, so will begin testing.
You can test any other configs using `bin/run_example_ci_configs.py CONFIG_PATH`, e.g.
```bash
bin/run_example_ci_configs.py examples/github-with-qemu.yml
```
The script then outputs a Markdown table that can be copy/pasted into a PR to monitor and record the test.
## Preparing environments
### Preparing environments
This has been moved to using docker, so you only need the following instructions if you add `--no-docker` to avoid using docker.
@@ -92,16 +97,9 @@ And, you need to install the requirements into each environment:
for f in env*/bin/pip; do $f install pip-tools; done
```
### Making a release
## Making a release
Before making a release, ensure pinned dependencies are up-to-date. Run the script:
```bash
bin/make_dependency_update_pr.py
```
If updates are needed, this will push a PR with those updates for the CI to test. Once green, merge this PR.
Before making a release, ensure pinned dependencies are up-to-date. Autoupdates are run weekly, with a PR being raised with any changes as required, so just make sure the latest one is merged before continuing.
Then, increment the project version number using:
@@ -119,3 +117,5 @@ python setup.py sdist bdist_wheel
twine upload dist/*
git push && git push --tags
```
Then head to https://github.com/joerick/cibuildwheel/releases and create a GitHub release from the new tag, pasting in the changelog entry.
+4 -2
View File
@@ -30,9 +30,11 @@ For more details see https://en.cppreference.com/w/cpp/compiler_support, https:/
## Windows and Python 2.7
Visual C++ for Python 2.7 does not support modern C++ standards (i.e., C++11 and later). When building on Appveyor, you will need to either use the "Visual Studio 2017" or "Visual Studio 2019" image, but Python 2.7 is not supported on these images - skip it by setting `CIBW_SKIP=cp27-win*`.
In previous years, Microsoft distributed a compiler toolchain called 'Visual C++ for Python 2.7', which was a distribution of MSVC 2008 that was created to make it easier to build Python 2.7 extensions on Windows, because it was fully compatible with the toolchain that built Python 2.7.
There is an optional workaround for this, though: the pybind11 project argues and shows that it is [possible to compile Python 2.7 extension with a newer compiler](https://pybind11.readthedocs.io/en/stable/faq.html#working-with-ancient-visual-studio-2008-builds-on-windows) and has an example project showing how to do this: https://github.com/pybind/python_example. The main catch is that a user might need to install [a newer "Microsoft Visual C++ Redistributable"](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads), since the newer C++ standard library's binaries are not included by default with the Python 2.7 installation.
This toolchain does not support modern C++ standards (i.e., C++11 and later). And it is hard to find this toolchain these days, since Microsoft removed the download for the required Visual Studio 2008 needed to build a native extension in April, 2021. So, by default, cibuildwheel does not attempt to build Python 2.7 extensions on Windows.
There is an optional workaround, though: the pybind11 project argues and shows that it is [possible to compile Python 2.7 extension with a newer compiler](https://pybind11.readthedocs.io/en/stable/faq.html#working-with-ancient-visual-studio-2008-builds-on-windows) and has an example project showing how to do this: https://github.com/pybind/python_example. The main catch is that a user might need to install [a newer "Microsoft Visual C++ Redistributable"](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads), since the newer C++ standard library's binaries are not included by default with the Python 2.7 installation.
Forcing `distutils` or `setuptools` to use a more recent version of MSVC that supports modern C++ can be done in the following way:
+31
View File
@@ -2,6 +2,7 @@
# name: required, printed name
# gh: GitHub repo (eventually a url: could be added for non-github projects)
# stars: GitHub repo (optional, if different from package, such as for Twisted)
# pypi: The pypi name, if different from the GitHub package name
# os: Operating system list, [windows, apple, linux] (optional)
# ci: [appveyor, github, azurepipelines, circleci, gitlab, travisci] (optional)
# notes: (text, optional)
@@ -29,6 +30,7 @@
- name: Parselmouth
gh: YannickJadoul/Parselmouth
pypi: praat-parselmouth
notes: A Python interface to the Praat software package, using pybind11, C++17 and CMake, with the core Praat static library built only once and shared between wheels.
ci: [github]
os: [windows, apple, linux]
@@ -82,6 +84,7 @@
- name: PyAV
gh: PyAV-Org/PyAV
pypi: av
ci: [github]
os: [windows, apple, linux]
notes: Pythonic bindings for FFmpeg's libraries.
@@ -109,6 +112,7 @@
- name: etebase-py
gh: etesync/etebase-py
pypi: etebase
notes: Python bindings to a Rust library using `setuptools-rust`, and `sccache` for improved speed.
ci: [travisci]
os: [linux]
@@ -175,6 +179,7 @@
- name: jq.py
gh: mwilliamson/jq.py
pypi: jq
ci: [travisci]
os: [apple, linux]
@@ -226,6 +231,7 @@
- name: Dependency Injector
gh: ets-labs/python-dependency-injector
pypi: dependency-injector
ci: [travisci]
os: [windows, apple, linux]
notes: Dependency injection framework for Python, uses Windows TravisCI
@@ -237,11 +243,13 @@
- name: PyTables
gh: PyTables/PyTables
pypi: tables
ci: [github]
os: [windows, apple, linux]
- name: dd-trace-py
gh: DataDog/dd-trace-py
pypi: ddtrace
ci: [github]
os: [windows, apple, linux]
notes: Uses custom alternate arch emulation on GitHub
@@ -270,6 +278,7 @@
- name: MyPy
gh: mypyc/mypy_mypyc-wheels
stars: python/mypy
pypi: mypy
ci: [github]
os: [apple, linux, windows]
notes: MyPyC, the compiled component of MyPy.
@@ -277,6 +286,7 @@
- name: Imagecodecs (fork)
gh: czaki/imagecodecs_build
stars: cgohlke/imagecodecs
pypi: imagecodecs
ci: [azurepipelines]
ci_config: azure-pipelines.yaml
os: [apple, linux]
@@ -293,3 +303,24 @@
ci: [github]
os: [apple, linux, windows]
notes: Time mocking library using only the CPython C API.
- name: polaroid
gh: daggy1234/polaroid
ci: [github]
os: [apple, linux, windows]
notes: Full range of wheels for setuptools rust, with auto release and PyPI deploy.
- name: python-snappy
gh: andrix/python-snappy
ci: [github]
os: [apple, linux, windows]
- name: sourmash
gh: dib-lab/sourmash
ci: [github]
os: [apple, linux, windows]
- name: markupsafe
gh: pallets/markupsafe
ci: [github]
os: [apple, linux, windows]
+10 -1
View File
@@ -3,13 +3,14 @@
p {
margin-bottom: 12px;
line-height: 26px;
}
code {
font-size: 85%;
background-color: rgba(27,31,35,.05);
border-radius: 3px;
padding: .2em .4em;
padding: .15em .4em;
color: inherit;
border: none;
margin: 0 1px;
@@ -39,6 +40,14 @@ h1, h2, h3, h4, h5, h6 {
white-space: normal;
}
.rst-content .admonition {
line-height: inherit;
}
.admonition code {
border: none;
}
/*
Code block filename style
+33 -3
View File
@@ -18,7 +18,7 @@ If your wheel didn't compile, check the list below for some debugging tips.
Linux wheels are built in the [`manylinux` docker images](https://github.com/pypa/manylinux) to provide binary compatible wheels on Linux, according to [PEP 571](https://www.python.org/dev/peps/pep-0571/). Because of this, when building with `cibuildwheel` on Linux, a few things should be taken into account:
- Programs and libraries cannot be installed on the Travis CI Ubuntu host with `apt-get`, but can be installed inside of the Docker image using `yum` or manually. The same goes for environment variables that are potentially needed to customize the wheel building. `cibuildwheel` supports this by providing the `CIBW_ENVIRONMENT` and `CIBW_BEFORE_BUILD` options to setup the build environment inside the running Docker image. See [the options docs](options.md#build-environment) for details on these options.
- Programs and libraries are not installed on the Travis CI Ubuntu host, but rather should be installed inside of the Docker image (using `yum` for `manylinux2010` or `manylinux2014`, and `apt-get` for `manylinux_2_24`) or manually. The same goes for environment variables that are potentially needed to customize the wheel building. `cibuildwheel` supports this by providing the `CIBW_ENVIRONMENT` and `CIBW_BEFORE_BUILD` options to setup the build environment inside the running Docker image. See [the options docs](options.md#build-environment) for details on these options.
- The project directory is mounted in the running Docker instance as `/project`, the output directory for the wheels as `/output`. In general, this is handled transparently by `cibuildwheel`. For a more finegrained level of control however, the root of the host file system is mounted as `/host`, allowing for example to access shared files, caches, etc. on the host file system. Note that this is not available on CircleCI due to their Docker policies.
@@ -136,6 +136,36 @@ Here's an example GitHub Actions workflow with a job that builds for Apple Silic
{% include "../examples/github-apple-silicon.yml" %}
```
### Windows and Python 2.7
Building 2.7 extensions on Windows is difficult, because the VS 2008 compiler that was used for the original Python compilation was discontinued in 2018, and has since been removed from Microsoft's downloads. Most people choose to not build Windows 2.7 wheels, or to override the compiler to something more modern.
To override, you need to have a modern compiler toolchain activated, and set `DISTUTILS_USE_SDK=1` and `MSSdk=1`. For example, on GitHub Actions, you would add these steps:
```yaml
- name: Prepare compiler environment for Windows
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Set Windows environment variables
if: runner.os == 'Windows'
shell: bash
run: |
echo "DISTUTILS_USE_SDK=1" >> $GITHUB_ENV
echo "MSSdk=1" >> $GITHUB_ENV
# invoke cibuildwheel...
```
cibuildwheel will not try to build 2.7 on Windows unless it detects that the above two variables are set. Note that changing to a more modern compiler will mean your wheel picks up a runtime dependency to a different [Visual C++ Redistributable][]. You also need to be [a bit careful][] in designing your extension; some major binding tools like pybind11 do this for you.
More on setting a custom Windows toolchain in our docs on modern C++ standards [here](cpp_standards.md#windows-and-python-27).
[Visual C++ Redistributable]: https://support.microsoft.com/en-us/topic/the-latest-supported-visual-c-downloads-2647da03-1eea-4433-9aff-95f26a218cc0
[a bit careful]: https://pybind11.readthedocs.io/en/stable/faq.html#working-with-ancient-visual-studio-2008-builds-on-windows
### Building packages with optional C extensions
`cibuildwheel` defines the environment variable `CIBUILDWHEEL` to the value `1` allowing projects for which the C extension is optional to make it mandatory when building wheels.
@@ -205,7 +235,7 @@ There are two suggested methods for keeping cibuildwheel up to date that instead
If you use GitHub Actions for builds, you can use cibuildwheel as an action:
```yaml
uses: joerick/cibuildwheel@v1.10.0
uses: joerick/cibuildwheel@v1.10.1
```
This is a composite step that just runs cibuildwheel using pipx. You can set command-line options as `with:` parameters, and use `env:` as normal.
@@ -231,7 +261,7 @@ The second option, and the only one that supports other CI systems, is using a `
```bash
# requirements-cibw.txt
cibuildwheel==1.10.0
cibuildwheel==1.10.1
```
Then your install step would have `python -m pip install -r requirements-cibw.txt` in it. Your `dependabot.yml` file could look like this:
+64 -25
View File
@@ -4,7 +4,7 @@
## Setting options
cibuildwheel is configured using environment variables, that can be set using
cibuildwheel is configured using environment variables that can be set using
your CI config.
For example, to configure cibuildwheel to run tests, add the following YAML to
@@ -90,20 +90,31 @@ Default: `auto`
`auto` will auto-detect platform using environment variables, such as `TRAVIS_OS_NAME`/`APPVEYOR`/`CIRCLECI`.
For `linux` you need Docker running, on macOS or Linux. For `macos`, you need a Mac machine, and note that this script is going to automatically install MacPython on your system, so don't run on your development machine. For `windows`, you need to run in Windows, and `cibuildwheel` will install required versions of Python to `C:\cibw\python` using NuGet.
- For `linux`, you need Docker running, on macOS or Linux.
- For `macos`, you need a Mac machine. Note that cibuildwheel is going to install MacPython on your system, so you probably don't want to run this on your development machine.
- For `windows`, you need to run in Windows. cibuildwheel will install required versions of Python to `C:\cibw\python` using NuGet.
This option can also be set using the [command-line option](#command-line) `--platform`.
!!! tip
If you have Docker installed, you can locally debug your cibuildwheel Linux config, instead of pushing to CI to test every change. For example:
```bash
export CIBW_BUILD='cp37-*'
export CIBW_TEST_COMMAND='pytest {package}/tests'
cibuildwheel --platform linux .
```
### `CIBW_BUILD`, `CIBW_SKIP` {: #build-skip}
> Choose the Python versions to build
Space-separated list of builds to build and skip. Each build has an identifier like `cp27-manylinux_x86_64` or `cp35-macosx_x86_64` - you can list specific ones to build and `cibuildwheel` will only build those, and/or list ones to skip and `cibuildwheel` won't try to build them.
Space-separated list of builds to build and skip. Each build has an identifier like `cp27-manylinux_x86_64` or `cp35-macosx_x86_64` - you can list specific ones to build and cibuildwheel will only build those, and/or list ones to skip and cibuildwheel won't try to build them.
When both options are specified, both conditions are applied and only builds with a tag that matches `CIBW_BUILD` and does not match `CIBW_SKIP` will be built.
When setting the options, you can use shell-style globbing syntax, as per [`fnmatch`](https://docs.python.org/3/library/fnmatch.html) with the addition of curly bracket syntax `{option1,option2}`, provided by [`bracex`](https://pypi.org/project/bracex/). All the build identifiers supported by cibuildwheel are shown below:
When setting the options, you can use shell-style globbing syntax, as per [fnmatch](https://docs.python.org/3/library/fnmatch.html) with the addition of curly bracket syntax `{option1,option2}`, provided by [bracex](https://pypi.org/project/bracex/). All the build identifiers supported by cibuildwheel are shown below:
<div class="build-id-table-marker"></div>
@@ -120,7 +131,7 @@ When setting the options, you can use shell-style globbing syntax, as per [`fnma
| PyPy3.7 v7.3 | pp37-macosx_x86_64 | pp37-win32 | pp37-manylinux_x86_64 | |
The list of supported and currently selected build identifiers can also be retrieved by passing the `--print-build-identifiers` flag to `cibuildwheel`.
The list of supported and currently selected build identifiers can also be retrieved by passing the `--print-build-identifiers` flag to cibuildwheel.
The format is `python_tag-platform_tag`, with tags similar to those in [PEP 425](https://www.python.org/dev/peps/pep-0425/#details).
For CPython, the minimally supported macOS version is 10.9; for PyPy 2.7 and PyPy 3.6/3.7, respectively macOS 10.7 and 10.13 or higher is required.
@@ -276,8 +287,8 @@ the package is compatible with all versions of Python that it can build.
Currently, setuptools has not yet added support for reading this value from
pyproject.toml yet, and so does not copy it to Requires-Python in the wheel
metadata. This mechanism is used by `pip` to scan through older versions of
your package until it finds a release compatible with the curernt version
metadata. This mechanism is used by pip to scan through older versions of
your package until it finds a release compatible with the current version
of Python compatible when installing, so it is an important value to set if
you plan to drop support for a version of Python in the future.
@@ -329,7 +340,7 @@ CIBW_ENVIRONMENT: "BUILD_TIME=$(date) SAMPLE_TEXT=\"sample text\""
```
!!! note
`cibuildwheel` always defines the environment variable `CIBUILDWHEEL=1`. This can be useful for [building wheels with optional extensions](faq.md#building-packages-with-optional-c-extensions).
cibuildwheel always defines the environment variable `CIBUILDWHEEL=1`. This can be useful for [building wheels with optional extensions](faq.md#building-packages-with-optional-c-extensions).
### `CIBW_BEFORE_ALL` {: #before-all}
> Execute a shell command on the build system before any wheels are built.
@@ -338,7 +349,7 @@ Shell command to prepare a common part of the project (e.g. build or install lib
This option is very useful for the Linux build, where builds take place in isolated Docker containers managed by cibuildwheel. This command will run inside the container before the wheel builds start. Note, if you're building both x86_64 and i686 wheels (the default), your build uses two different Docker images. In that case, this command will execute twice - once per build container.
The placeholder `{package}` can be used here; it will be replaced by the path to the package being built by `cibuildwheel`.
The placeholder `{package}` can be used here; it will be replaced by the path to the package being built by cibuildwheel.
On Windows and macOS, the version of Python available inside `CIBW_BEFORE_ALL` is whatever is available on the host machine. On Linux, a modern Python version is available on PATH.
@@ -354,6 +365,11 @@ CIBW_BEFORE_ALL: make -C third_party_lib
CIBW_BEFORE_ALL_LINUX: yum install -y libffi-dev
```
Note that manylinux2_24 builds occur inside a Debian9 docker, where
manylinux2010 and manylinux2014 builds occur inside a CentOS one. So for
`manylinux2_24` the `CIBW_BEFORE_ALL_LINUX` command must use `apt-get -y`
instead.
### `CIBW_BEFORE_BUILD` {: #before-build}
> Execute a shell command preparing each wheel's build
@@ -361,7 +377,7 @@ A shell command to run before building the wheel. This option allows you to run
If dependencies are required to build your wheel (for example if you include a header from a Python module), instead of using this command, we recommend adding requirements to a pyproject.toml file. This is reproducible, and users who do not get your wheels (such as Alpine or ClearLinux users) will still benefit.
The active Python binary can be accessed using `python`, and pip with `pip`; `cibuildwheel` makes sure the right version of Python and pip will be executed. The placeholder `{package}` can be used here; it will be replaced by the path to the package being built by `cibuildwheel`.
The active Python binary can be accessed using `python`, and pip with `pip`; cibuildwheel makes sure the right version of Python and pip will be executed. The placeholder `{package}` can be used here; it will be replaced by the path to the package being built by cibuildwheel.
The command is run in a shell, so you can write things like `cmd1 && cmd2`.
@@ -421,7 +437,7 @@ Default:
A shell command to repair a built wheel by copying external library dependencies into the wheel tree and relinking them.
The command is run on each built wheel (except for pure Python ones) before testing it.
The following placeholders must be used inside the command and will be replaced by `cibuildwheel`:
The following placeholders must be used inside the command and will be replaced by cibuildwheel:
- `{wheel}` for the absolute path to the built wheel
- `{dest_dir}` for the absolute path of the directory where to create the repaired wheel
@@ -432,31 +448,54 @@ The command is run in a shell, so you can run multiple commands like `cmd1 && cm
Platform-specific variants also available:<br/>
`CIBW_REPAIR_WHEEL_COMMAND_MACOS` | `CIBW_REPAIR_WHEEL_COMMAND_WINDOWS` | `CIBW_REPAIR_WHEEL_COMMAND_LINUX`
!!! tip
cibuildwheel doesn't yet ship a default repair command for Windows.
**If that's an issue for you, check out [delvewheel]** - a new package that aims to do the same as auditwheel or delocate for Windows.
Because delvewheel is still relatively early-stage, cibuildwheel does not yet run it by default. However, we'd recommend giving it a try! See the examples below for usage.
[Delvewheel]: https://github.com/adang1345/delvewheel
#### Examples
```yaml
# use delvewheel on windows (only works on Python 3.6+)
CIBW_BEFORE_BUILD_WINDOWS: "pip install delvewheel"
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair -w {dest_dir} {wheel}"
# don't repair macOS wheels
CIBW_REPAIR_WHEEL_COMMAND_MACOS: ""
# pass the `--lib-sdir .` flag to auditwheel on Linux
CIBW_REPAIR_WHEEL_COMMAND_LINUX: "auditwheel repair --lib-sdir . -w {dest_dir} {wheel}"
```
### `CIBW_MANYLINUX_X86_64_IMAGE`, `CIBW_MANYLINUX_I686_IMAGE`, `CIBW_MANYLINUX_PYPY_X86_64_IMAGE`, `CIBW_MANYLINUX_AARCH64_IMAGE`, `CIBW_MANYLINUX_PPC64LE_IMAGE`, `CIBW_MANYLINUX_S390X_IMAGE` {: #manylinux-image}
> Specify alternative manylinux docker images
### CIBW_MANYLINUX_*_IMAGE {: #manylinux-image}
> Specify alternative manylinux Docker images
An alternative Docker image to be used for building [`manylinux`](https://github.com/pypa/manylinux) wheels. `cibuildwheel` will then pull these instead of the default images, [`quay.io/pypa/manylinux2010_x86_64`](https://quay.io/pypa/manylinux2010_x86_64), [`quay.io/pypa/manylinux2010_i686`](https://quay.io/pypa/manylinux2010_i686), [`pypywheels/manylinux2010-pypy_x86_64`](https://hub.docker.com/r/pypywheels/manylinux2010-pypy_x86_64), [`quay.io/pypa/manylinux2014_aarch64`](https://quay.io/pypa/manylinux2014_aarch64), [`quay.io/pypa/manylinux2014_ppc64le`](https://quay.io/pypa/manylinux2014_ppc64le), and [`quay.io/pypa/manylinux2014_s390x`](https://quay.io/pypa/manylinux2010_s390x).
The available options are:
The value of this option can either be set to `manylinux1`, `manylinux2010`, `manylinux2014` or `manylinux_2_24` to use a pinned version of the [official `manylinux` images](https://github.com/pypa/manylinux) and [PyPy `manylinux` images](https://github.com/pypy/manylinux). Alternatively, set these options to any other valid Docker image name. Note that for PyPy, only the official `manylinux2010` image is currently available. For architectures other
than x86 (x86\_64 and i686) `manylinux2014` or `manylinux_2_24` must be used because the first version of the manylinux specification that supports additional architectures is `manylinux2014`.
- `CIBW_MANYLINUX_X86_64_IMAGE`
- `CIBW_MANYLINUX_I686_IMAGE`
- `CIBW_MANYLINUX_PYPY_X86_64_IMAGE`
- `CIBW_MANYLINUX_AARCH64_IMAGE`
- `CIBW_MANYLINUX_PPC64LE_IMAGE`
- `CIBW_MANYLINUX_S390X_IMAGE`
Beware to specify a valid Docker image that can be used in the same way as the official, default Docker images: all necessary Python and pip versions need to be present in `/opt/python/`, and the `auditwheel` tool needs to be present for `cibuildwheel` to work. Apart from that, the architecture and relevant shared system libraries need to be manylinux1-, manylinux2010- or manylinux2014-compatible in order to produce valid `manylinux1`/`manylinux2010`/`manylinux2014`/`manylinux_2_24` wheels (see [pypa/manylinux on GitHub](https://github.com/pypa/manylinux), [PEP 513](https://www.python.org/dev/peps/pep-0513/), [PEP 571](https://www.python.org/dev/peps/pep-0571/), [PEP 599](https://www.python.org/dev/peps/pep-0599/) and [PEP 600](https://www.python.org/dev/peps/pep-0600/) for more details).
Set an alternative Docker image to be used for building [manylinux](https://github.com/pypa/manylinux) wheels. cibuildwheel will then pull these instead of the default images, [`quay.io/pypa/manylinux2010_x86_64`](https://quay.io/pypa/manylinux2010_x86_64), [`quay.io/pypa/manylinux2010_i686`](https://quay.io/pypa/manylinux2010_i686), [`pypywheels/manylinux2010-pypy_x86_64`](https://hub.docker.com/r/pypywheels/manylinux2010-pypy_x86_64), [`quay.io/pypa/manylinux2014_aarch64`](https://quay.io/pypa/manylinux2014_aarch64), [`quay.io/pypa/manylinux2014_ppc64le`](https://quay.io/pypa/manylinux2014_ppc64le), and [`quay.io/pypa/manylinux2014_s390x`](https://quay.io/pypa/manylinux2010_s390x).
Note that `auditwheel` detects the version of the `manylinux` standard in the Docker image through the `AUDITWHEEL_PLAT` environment variable, as `cibuildwheel` has no way of detecting the correct `--plat` command line argument to pass to `auditwheel` for a custom image. If a Docker image does not correctly set this `AUDITWHEEL_PLAT` environment variable, the `CIBW_ENVIRONMENT` option can be used to do so (e.g., `CIBW_ENVIRONMENT='AUDITWHEEL_PLAT="manylinux2010_$(uname -m)"'`).
The value of this option can either be set to `manylinux1`, `manylinux2010`, `manylinux2014` or `manylinux_2_24` to use a pinned version of the [official manylinux images](https://github.com/pypa/manylinux) and [PyPy manylinux images](https://github.com/pypy/manylinux). Alternatively, set these options to any other valid Docker image name. For PyPy, only the official `manylinux2010` image is currently available. For architectures other
than x86 (x86\_64 and i686) `manylinux2014` or `manylinux_2_24` must be used, because the first version of the manylinux specification that supports additional architectures is `manylinux2014`.
Note that `manylinux2014`/`manylinux_2_24` don't support builds with Python 2.7 - when building with `manylinux2014`/`manylinux_2_24`, skip Python 2.7 using `CIBW_SKIP` (see example below).
If setting a custom Docker image, you'll need to make sure it can be used in the same way as the official, default Docker images: all necessary Python and pip versions need to be present in `/opt/python/`, and the auditwheel tool needs to be present for cibuildwheel to work. Apart from that, the architecture and relevant shared system libraries need to be compatible to the relevant standard to produce valid manylinux1/manylinux2010/manylinux2014/manylinux_2_24 wheels (see [pypa/manylinux on GitHub](https://github.com/pypa/manylinux), [PEP 513](https://www.python.org/dev/peps/pep-0513/), [PEP 571](https://www.python.org/dev/peps/pep-0571/), [PEP 599](https://www.python.org/dev/peps/pep-0599/) and [PEP 600](https://www.python.org/dev/peps/pep-0600/) for more details).
Auditwheel detects the version of the manylinux standard in the Docker image through the `AUDITWHEEL_PLAT` environment variable, as cibuildwheel has no way of detecting the correct `--plat` command line argument to pass to auditwheel for a custom image. If a Docker image does not correctly set this `AUDITWHEEL_PLAT` environment variable, the `CIBW_ENVIRONMENT` option can be used to do so (e.g., `CIBW_ENVIRONMENT='AUDITWHEEL_PLAT="manylinux2010_$(uname -m)"'`).
#### Examples
```yaml
@@ -539,8 +578,8 @@ CIBW_DEPENDENCY_VERSIONS: ./constraints.txt
Shell command to run tests after the build. The wheel will be installed
automatically and available for import from the tests. To ensure the wheel is
imported by your tests (instead of your source copy), tests are run from a
different directory. Use the placeholders `{project}` and `{package}` when
imported by your tests (instead of your source copy), **tests are not run from
your project directory**. Use the placeholders `{project}` and `{package}` when
specifying paths in your project. If this variable is not set, your wheel will
not be installed after building.
@@ -571,10 +610,10 @@ CIBW_TEST_COMMAND: "echo Wheel installed"
### `CIBW_BEFORE_TEST` {: #before-test}
> Execute a shell command before testing each wheel
A shell command to run in **each** test virtual environment, before your wheel is installed and tested. This is useful if you need to install a non pip package, change values of environment variables
or perform multi step pip installation (e.g. installing `scikit-build` or `cython` before install test package)
A shell command to run in **each** test virtual environment, before your wheel is installed and tested. This is useful if you need to install a non-pip package, invoke pip with different environment variables,
or perform a multi-step pip installation (e.g. installing scikit-build or Cython before installing test package).
The active Python binary can be accessed using `python`, and pip with `pip`; `cibuildwheel` makes sure the right version of Python and pip will be executed. The placeholder `{package}` can be used here; it will be replaced by the path to the package being built by `cibuildwheel`.
The active Python binary can be accessed using `python`, and pip with `pip`; cibuildwheel makes sure the right version of Python and pip will be executed. The placeholder `{package}` can be used here; it will be replaced by the path to the package being built by cibuildwheel.
The command is run in a shell, so you can write things like `cmd1 && cmd2`.
@@ -639,7 +678,7 @@ CIBW_TEST_EXTRAS: test,qt
### `CIBW_TEST_SKIP` {: #test-skip}
> Skip running tests on some builds
This will skip testing on any identifiers that match the given skip patterns (see [`CIBW_SKIP`](#build-skip)). This can be used to mask out tests for wheels that have missing dependencies upstream that are slow or hard to build, or to mask up slow tests on emulated architectures.
This will skip testing on any identifiers that match the given skip patterns (see [`CIBW_SKIP`](#build-skip)). This can be used to mask out tests for wheels that have missing dependencies upstream that are slow or hard to build, or to skip slow tests on emulated architectures.
With macOS `universal2` wheels, you can also skip the the individual archs inside the wheel using an `:arch` suffix. For example, `cp39-macosx_universal2:x86_64` or `cp39-macosx_universal2:arm64`.
@@ -750,7 +789,7 @@ optional arguments:
$('.rst-content h3')
.filter(function (i, el) {
return !!$(el).text().match(/(^([A-Z0-9, _]| and )+)¶$/);
return !!$(el).text().match(/(^([A-Z0-9, _*]| and )+)¶$/);
})
.each(function (i, el) {
var optionName = $(el).text().replace('¶', '');
+2 -10
View File
@@ -45,12 +45,8 @@ To build Linux, Mac, and Windows wheels using GitHub Actions, create a `.github/
steps:
- uses: actions/checkout@v2
- name: Install Visual C++ for Python 2.7
if: runner.os == 'Windows'
run: choco install vcpython27 -f -y
- name: Build wheels
run: pipx run cibuildwheel==1.10.0
run: pipx run cibuildwheel==1.10.1
- uses: actions/upload-artifact@v2
with:
@@ -85,11 +81,7 @@ To build Linux, Mac, and Windows wheels using GitHub Actions, create a `.github/
- uses: actions/setup-python@v2
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==1.10.0
- name: Install Visual C++ for Python 2.7
if: runner.os == 'Windows'
run: choco install vcpython27 -f -y
run: python -m pip install cibuildwheel==1.10.1
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
+1 -1
View File
@@ -12,7 +12,7 @@ stack: python 3.7
init:
- cmd: set PATH=C:\Python37;C:\Python37\Scripts;%PATH%
install: python -m pip install cibuildwheel==1.10.0
install: python -m pip install cibuildwheel==1.10.1
build_script: python -m cibuildwheel --output-dir wheelhouse
+3 -5
View File
@@ -6,7 +6,7 @@ jobs:
- bash: |
set -o errexit
python3 -m pip install --upgrade pip
pip3 install cibuildwheel==1.10.0
pip3 install cibuildwheel==1.10.1
displayName: Install dependencies
- bash: cibuildwheel --output-dir wheelhouse .
displayName: Build wheels
@@ -20,7 +20,7 @@ jobs:
- bash: |
set -o errexit
python3 -m pip install --upgrade pip
python3 -m pip install cibuildwheel==1.10.0
python3 -m pip install cibuildwheel==1.10.1
displayName: Install dependencies
- bash: cibuildwheel --output-dir wheelhouse .
displayName: Build wheels
@@ -31,12 +31,10 @@ jobs:
pool: {vmImage: 'vs2017-win2016'}
steps:
- task: UsePythonVersion@0
- script: choco install vcpython27 -f -y
displayName: Install Visual C++ for Python 2.7
- bash: |
set -o errexit
python -m pip install --upgrade pip
pip install cibuildwheel==1.10.0
pip install cibuildwheel==1.10.1
displayName: Install dependencies
- bash: cibuildwheel --output-dir wheelhouse .
displayName: Build wheels
+2 -2
View File
@@ -11,7 +11,7 @@ jobs:
- run:
name: Build the Linux wheels.
command: |
pip3 install --user cibuildwheel==1.10.0
pip3 install --user cibuildwheel==1.10.1
cibuildwheel --output-dir wheelhouse
- store_artifacts:
path: wheelhouse/
@@ -25,7 +25,7 @@ jobs:
- run:
name: Build the OS X wheels.
command: |
pip3 install cibuildwheel==1.10.0
pip3 install cibuildwheel==1.10.1
cibuildwheel --output-dir wheelhouse
- store_artifacts:
path: wheelhouse/
+1 -1
View File
@@ -10,7 +10,7 @@ jobs:
- uses: actions/checkout@v2
- name: Build wheels
uses: joerick/cibuildwheel@v1.10.0
uses: joerick/cibuildwheel@v1.10.1
env:
CIBW_ARCHS_MACOS: x86_64 universal2
+1 -5
View File
@@ -26,12 +26,8 @@ jobs:
with:
python-version: '3.8'
- name: Install Visual C++ for Python 2.7
if: runner.os == 'Windows'
run: choco install vcpython27 -f -y
- name: Build wheels
uses: joerick/cibuildwheel@v1.10.0
uses: joerick/cibuildwheel@v1.10.1
- uses: actions/upload-artifact@v2
with:
+1 -5
View File
@@ -13,12 +13,8 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Install Visual C++ for Python 2.7
if: runner.os == 'Windows'
run: choco install vcpython27 -f -y
- name: Build wheels
uses: joerick/cibuildwheel@v1.10.0
uses: joerick/cibuildwheel@v1.10.1
# to supply options, put them in 'env', like:
# env:
# CIBW_SOME_OPTION: value
+1 -5
View File
@@ -18,10 +18,6 @@ jobs:
with:
python-version: '3.7'
- name: Install Visual C++ for Python 2.7
if: runner.os == 'Windows'
run: choco install vcpython27 -f -y
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v1
@@ -29,7 +25,7 @@ jobs:
platforms: all
- name: Build wheels
uses: joerick/cibuildwheel@v1.10.0
uses: joerick/cibuildwheel@v1.10.1
env:
# configure cibuildwheel to build native archs ('auto'), and some
# emulated ones
+1 -1
View File
@@ -12,7 +12,7 @@ linux:
DOCKER_TLS_CERTDIR: ""
script:
- curl -sSL https://get.docker.com/ | sh
- python -m pip install cibuildwheel==1.10.0
- python -m pip install cibuildwheel==1.10.1
- cibuildwheel --output-dir wheelhouse
artifacts:
paths:
+2 -2
View File
@@ -14,13 +14,13 @@ jobs:
- os: windows
language: shell
before_install:
- choco install python --version 3.8.6
- choco upgrade python -y --version 3.8.6
- export PATH="/c/Python38:/c/Python38/Scripts:$PATH"
# make sure it's on PATH as 'python3'
- ln -s /c/Python38/python.exe /c/Python38/python3.exe
install:
- python3 -m pip install cibuildwheel==1.10.0
- python3 -m pip install cibuildwheel==1.10.1
script:
# build the wheels, put them into './wheelhouse'
+2 -2
View File
@@ -20,13 +20,13 @@ jobs:
- os: windows
language: shell
before_install:
- choco install python --version 3.8.6
- choco upgrade python -y --version 3.8.6
- export PATH="/c/Python38:/c/Python38/Scripts:$PATH"
# make sure it's on PATH as 'python3'
- ln -s /c/Python38/python.exe /c/Python38/python3.exe
install:
- python3 -m pip install cibuildwheel==1.10.0
- python3 -m pip install cibuildwheel==1.10.1
script:
# build the wheels, put them into './wheelhouse'
+4 -4
View File
@@ -14,7 +14,7 @@ python:
before_install:
- |
if [[ "$TRAVIS_OS_NAME" = windows ]]; then
choco install python --version 3.8.6
choco upgrade python -y --version 3.8.6
export PATH="/c/Python38:/c/Python38/Scripts:$PATH"
# make sure it's on PATH as 'python3'
ln -s /c/Python38/python.exe /c/Python38/python3.exe
@@ -55,7 +55,7 @@ jobs:
- stage: deploy
name: Build and deploy Linux wheels
services: docker
install: python3 -m pip install cibuildwheel==1.10.0
install: python3 -m pip install cibuildwheel==1.10.1
script: python3 -m cibuildwheel --output-dir wheelhouse
after_success: |
python3 -m pip install twine
@@ -65,7 +65,7 @@ jobs:
name: Build and deploy macOS wheels
os: osx
language: shell
install: python3 -m pip install cibuildwheel==1.10.0
install: python3 -m pip install cibuildwheel==1.10.1
script: python3 -m cibuildwheel --output-dir wheelhouse
after_success: |
python3 -m pip install twine
@@ -75,7 +75,7 @@ jobs:
name: Build and deploy Windows wheels
os: windows
language: shell
install: python3 -m pip install cibuildwheel==1.10.0
install: python3 -m pip install cibuildwheel==1.10.1
script: python3 -m cibuildwheel --output-dir wheelhouse
after_success: |
python3 -m pip install twine
+1
View File
@@ -39,3 +39,4 @@ markdown_extensions:
plugins:
- include-markdown
- search
+2 -1
View File
@@ -8,4 +8,5 @@ build-backend = "setuptools.build_meta"
[tool.black]
line-length = 120
target-version = ['py36']
target-version = ['py36', 'py37', 'py38']
skip-string-normalization = true
+36 -29
View File
@@ -1,39 +1,48 @@
[metadata]
name = cibuildwheel
version = 1.10.0
version = 1.10.1
description = Build Python wheels on CI with minimal configuration.
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/joerick/cibuildwheel
author = Joe Rickerby
author_email = joerick@mac.com
url = https://github.com/joerick/cibuildwheel
license = BSD
license_file = LICENSE
classifiers =
Development Status :: 5 - Production/Stable
Intended Audience :: Developers
License :: OSI Approved :: BSD License
Natural Language :: English
Programming Language :: Python :: 3
Development Status :: 5 - Production/Stable
License :: OSI Approved :: BSD License
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: Implementation :: CPython
Topic :: Software Development :: Build Tools
keywords = ci,wheel,packaging,pypi,travis,appveyor,macos,linux,windows
project_urls =
Changelog=https://github.com/joerick/cibuildwheel#changelog
Documentation=https://cibuildwheel.readthedocs.io/
keywords = ci,wheel,packaging,pypi,travis,appveyor,macos,linux,windows
[options]
packages = find:
zip_safe = False
include_package_data = True
python_requires = >=3.6
install_requires =
bashlex!=0.13
toml
certifi
bracex
certifi
packaging
typing_extensions; python_version < '3.8'
toml
typing_extensions;python_version < '3.8'
python_requires = >=3.6
include_package_data = True
zip_safe = False
[options.entry_points]
console_scripts =
cibuildwheel = cibuildwheel.__main__:main
[options.package_data]
cibuildwheel = resources/*
@@ -42,28 +51,26 @@ cibuildwheel = resources/*
include =
cibuildwheel
[options.entry_points]
console_scripts =
cibuildwheel = cibuildwheel.__main__:main
[flake8]
ignore = E501,W503,E741,E226,B950
select = C,E,F,W,B,B9
application-import-names = cibuildwheel
exclude =
cibuildwheel/resources/,
dist/,
build/,
.git/,
env/,
env2/,
env??/,
.venv/,
site/
cibuildwheel/resources/,
dist/,
build/,
.git/,
env/,
env2/,
env??/,
.venv/,
site/
[tool:pytest]
junit_family=xunit2
junit_family = xunit2
testpaths =
test
unit_test
[mypy]
python_version = 3.7
@@ -110,5 +117,5 @@ ignore_missing_imports = True
ignore_missing_imports = True
[tool:isort]
profile=black
multi_line_output=3
profile = black
multi_line_output = 3
+1 -1
View File
@@ -31,7 +31,7 @@ def test(tmp_path):
# write python version information to a temporary file, this is
# checked in setup.py
'CIBW_BEFORE_ALL': before_all_command,
'CIBW_BEFORE_ALL_LINUX': before_all_command + ''' && python -c "import sys; assert sys.version_info >= (3, 6)"''',
'CIBW_BEFORE_ALL_LINUX': f'{before_all_command} && python -c "import sys; assert sys.version_info >= (3, 6)"',
'CIBW_ENVIRONMENT': "TEST_VAL='123'"
})
+9 -10
View File
@@ -40,11 +40,10 @@ VERSION_REGEX = r'([\w-]+)==([^\s]+)'
def get_versions_from_constraint_file(constraint_file):
constraint_file_text = constraint_file.read_text(encoding='utf8')
versions = {}
for package, version in re.findall(VERSION_REGEX, constraint_file_text):
versions[package] = version
return versions
return {
package: version
for package, version in re.findall(VERSION_REGEX, constraint_file_text)
}
@pytest.mark.parametrize('python_version', ['2.7', '3.5', '3.6', '3.8'])
@@ -52,8 +51,8 @@ def test_pinned_versions(tmp_path, python_version):
if utils.platform == 'linux':
pytest.skip('linux doesn\'t pin individual tool versions, it pins manylinux images instead')
if utils.IS_WINDOWS_RUNNING_ON_TRAVIS and python_version == '2.7':
pytest.skip('Windows + Travis CI requires a workaround')
if utils.platform == 'windows' and python_version == '2.7':
pytest.skip('Windows requires a workaround')
is_running_on_macos_11_or_later = (
utils.platform == 'macos' and utils.get_macos_version() >= (10, 16)
@@ -91,7 +90,7 @@ def test_pinned_versions(tmp_path, python_version):
build_environment[env_name] = constraint_versions[package]
cibw_environment_option = ' '.join(
[f'{k}={v}' for k, v in build_environment.items()]
f'{k}={v}' for k, v in build_environment.items()
)
# build and test the wheels
@@ -124,7 +123,7 @@ def test_dependency_constraints_file(tmp_path, python_version):
if utils.platform == 'linux':
pytest.skip('linux doesn\'t pin individual tool versions, it pins manylinux images instead')
if utils.IS_WINDOWS_RUNNING_ON_TRAVIS and python_version == '2.7':
if utils.platform == 'windows' and python_version == '2.7':
pytest.skip('Windows + Travis CI requires a workaround')
project_dir = tmp_path / 'project'
@@ -154,7 +153,7 @@ def test_dependency_constraints_file(tmp_path, python_version):
build_environment[env_name] = version
cibw_environment_option = ' '.join(
[f'{k}={v}' for k, v in build_environment.items()]
f'{k}={v}' for k, v in build_environment.items()
)
# build and test the wheels
+13 -16
View File
@@ -12,7 +12,18 @@ import sys
from contextlib import contextmanager
from tempfile import mkdtemp
IS_WINDOWS_RUNNING_ON_TRAVIS = os.environ.get('TRAVIS_OS_NAME') == 'windows'
platform: str
if 'CIBW_PLATFORM' in os.environ:
platform = os.environ['CIBW_PLATFORM']
elif sys.platform.startswith('linux'):
platform = 'linux'
elif sys.platform.startswith('darwin'):
platform = 'macos'
elif sys.platform in ['win32', 'cygwin']:
platform = 'windows'
else:
raise Exception('Unsupported platform')
# Python 2 does not have a tempfile.TemporaryDirectory context manager
@@ -91,7 +102,7 @@ def _get_arm64_macosx_deployment_target(macosx_deployment_target: str) -> str:
def expected_wheels(package_name, package_version, manylinux_versions=None,
macosx_deployment_target='10.9', machine_arch=None, *,
exclude_27=IS_WINDOWS_RUNNING_ON_TRAVIS):
exclude_27=platform == 'windows'):
'''
Returns a list of expected wheels from a run of cibuildwheel.
'''
@@ -187,17 +198,3 @@ def get_macos_version():
'''
version_str, _, _ = pm.mac_ver()
return tuple(map(int, version_str.split(".")[:2]))
platform = None
if 'CIBW_PLATFORM' in os.environ:
platform = os.environ['CIBW_PLATFORM']
elif sys.platform.startswith('linux'):
platform = 'linux'
elif sys.platform.startswith('darwin'):
platform = 'macos'
elif sys.platform in ['win32', 'cygwin']:
platform = 'windows'
else:
raise Exception('Unsupported platform')
+1 -1
View File
@@ -94,7 +94,7 @@ def test_binary_output():
data = bytes(output, encoding='utf8', errors='surrogateescape')
for i in range(0, 512):
for i in range(512):
assert data[i] == i % 256
# check that environment variables can carry binary data, except null characters
+1 -1
View File
@@ -134,7 +134,7 @@ def test_repair_command(repair_command, platform_specific, platform, intercepted
])
@pytest.mark.parametrize('platform_specific', [False, True])
def test_environment(environment, platform_specific, platform, intercepted_build_args, monkeypatch):
env_string = ' '.join([f'{k}={v}' for k, v in environment.items()])
env_string = ' '.join(f'{k}={v}' for k, v in environment.items())
if platform_specific:
monkeypatch.setenv('CIBW_ENVIRONMENT_' + platform.upper(), env_string)
monkeypatch.setenv('CIBW_ENVIRONMENT', 'overwritten')
+2 -6
View File
@@ -123,12 +123,10 @@ def test_archs_platform_native(platform, intercepted_build_args, monkeypatch):
main()
build_options = intercepted_build_args.args[0]
if platform == 'linux':
if platform in {'linux', 'macos'}:
assert build_options.architectures == {Architecture.x86_64}
elif platform == 'windows':
assert build_options.architectures == {Architecture.AMD64}
elif platform == 'macos':
assert build_options.architectures == {Architecture.x86_64}
def test_archs_platform_auto64(platform, intercepted_build_args, monkeypatch):
@@ -137,12 +135,10 @@ def test_archs_platform_auto64(platform, intercepted_build_args, monkeypatch):
main()
build_options = intercepted_build_args.args[0]
if platform == 'linux':
if platform in {'linux', 'macos'}:
assert build_options.architectures == {Architecture.x86_64}
elif platform == 'windows':
assert build_options.architectures == {Architecture.AMD64}
elif platform == 'macos':
assert build_options.architectures == {Architecture.x86_64}
def test_archs_platform_auto32(platform, intercepted_build_args, monkeypatch):