Compare commits

..
33 Commits
Author SHA1 Message Date
Joe Rickerby 84f82a5898 Bump version: v1.10.0 2021-02-23 21:07:56 +00:00
Joe Rickerby 985389d5ee Fix a few version increment-related issues 2021-02-22 22:39:04 +00:00
Joe Rickerby fe961f4a7e Fix old version number 2021-02-22 22:33:51 +00:00
Joe Rickerby da24b0d361 Merge pull request #608 from joerick/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2021-02-22 22:25:41 +00:00
Joe Rickerby 76fd16ea8b Merge pull request #607 from joerick/update-dependencies-pr
[Bot] Update dependencies
2021-02-22 22:25:27 +00:00
Joe Rickerby 7a51e249ec Update cibuildwheel/resources/build-platforms.toml 2021-02-22 20:46:49 +00:00
pre-commit-ci[bot] 11b2c110d7 [pre-commit.ci] pre-commit autoupdate 2021-02-22 16:38:35 +00:00
mayeut b0ac79061c Update dependencies 2021-02-22 06:08:21 +00:00
Adam JohnsonandHenry Schreiner b5b825783f docs: add time-machine as working example (#604)
* Add time-machine as working example

* docs: rerun projects.py

Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
2021-02-20 15:04:56 -05:00
github-actions[bot]andmayeut 66195bf4bc Update dependencies (#599)
Co-authored-by: mayeut <mayeut@users.noreply.github.com>
2021-02-18 13:40:50 +01:00
Matthieu Darbois 1e7961c157 Add manylinux_2_24 support (#595) 2021-02-18 08:15:37 +01:00
Matthieu Darbois 14f2f4eeb1 Merge pull request #594 from mayeut/update-dependencies-cp27
Pin `manylinux2010` images (CPython 2.7 support)
2021-02-16 22:54:03 +01:00
mayeut 6f217f6c90 Lock manylinux2010 images used to keep CPython 2.7 support 2021-02-14 19:29:24 +01:00
mayeut 21aab69860 Only open Pull Requests when running from 'joerick/cibuildwheel' 2021-02-14 19:29:24 +01:00
mayeut 93c14c805b Pin manylinux2010 image used to update dependencies
`manylinux2010` dropped CPython 2.7
Use the tag `2021-02-06-3d322a5` for dependency update which is the last supporting CPython 2.7
2021-02-14 19:29:22 +01:00
Henry SchreinerandJoe Rickerby d2772c2293 refactor: subprocess.run (#592)
* change check_call to run

* refactor: change check_output to run

* Apply suggestions from code review

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

Co-authored-by: Joe Rickerby <joerick@mac.com>
2021-02-14 12:56:33 -05:00
Henry SchreinerandJoe Rickerby 58c5e56e9f docs: support tabs (#576)
* docs: support tabs

* Get superfences working

* Use an 'admonition' as a tab, add some styling

* docs: reorder tabs and modernize

* docs: tabbed options settings

* docs: reorder to match order in other places

* docs: correct the example

* Apply suggestions from code review (lazy edits in GH :) )

* Update mkdocs-include-markdown-plugin and remove unneeded include option

Co-authored-by: Joe Rickerby <joerick@mac.com>
2021-02-12 11:08:43 -05:00
Henry Schreiner bb14c67835 fix: set MACOSX_DEPLOYMENT_TARGET for BEFORE_ALL (#590) 2021-02-12 10:41:06 -05:00
Henry Schreiner bd3bc981a5 docs: fix a few more markdown spaces missing (#586)
Followup to #581 fixing two more release notes. The fence should be fixed by #576.
2021-02-12 10:39:20 -05:00
Henry Schreiner 2da8e12936 fix: empty CIBW_BUILD still counts as "*" (#588) 2021-02-12 10:31:27 -05:00
Joe Rickerby dfbb20ee69 add missing version pin in gitlab example 2021-02-12 14:08:41 +00:00
Henry Schreiner 08edf62e79 tests: don't expect CPython 2.7 in manylinux2010 images (#591) 2021-02-11 14:56:08 +01:00
Joe Rickerby b4addbf4a9 Merge pull request #585 from joerick/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2021-02-08 18:48:08 +00:00
Joe Rickerby 13a79bdb45 Merge pull request #583 from henryiii/docs/uni2ident
docs: add missing AS indentifiers
2021-02-08 18:46:20 +00:00
Joe Rickerby 5b4a3dea50 Mobile fix for the TOC, stop it overflow-x'ing the whole page 2021-02-08 18:43:23 +00:00
Joe Rickerby cb579ee641 Merge pull request #581 from joerick/henryiii-patch-1
docs: fix bullets in 1.6.0 release notes
2021-02-08 18:01:58 +00:00
pre-commit-ci[bot] eb82806f0b [pre-commit.ci] pre-commit autoupdate 2021-02-08 16:37:00 +00:00
Henry Schreiner b719392bd5 docs: drop PyPy patch version from table, not important for wheel compat 2021-02-08 10:14:03 -05:00
Henry Schreiner 6908669cb1 docs: combine columns for the identifier table 2021-02-08 10:09:16 -05:00
Henry Fredrick Schreiner f40c248231 docs: add missing AS indentifiers 2021-02-07 20:45:44 -05:00
pre-commit-ci[bot] ca7db28ec4 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2021-02-07 01:53:09 +00:00
Henry Schreiner 0eb29ef19b docs: fix bullets in 1.6.0 release notes 2021-02-06 20:52:03 -05:00
Henry Schreiner dee19309cb fix: add a blank line for better visual spacing (#578) 2021-02-06 13:08:20 -05:00
45 changed files with 544 additions and 245 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ jobs:
- name: "Run update: python configs"
run: python ./bin/update_pythons.py --force
- name: Create Pull Request
if: github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/master' && github.repository == 'joerick/cibuildwheel'
uses: peter-evans/create-pull-request@v3
with:
commit-message: Update dependencies
+2 -2
View File
@@ -23,7 +23,7 @@ repos:
files: ^bin/update_pythons.py|setup.py$
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.800
rev: v0.812
hooks:
- id: mypy
exclude: ^(bin/|cibuildwheel/resources/).*py$
@@ -36,7 +36,7 @@ repos:
args: ["--python-version=3.7", "--ignore-missing-imports", "--scripts-are-modules"]
- repo: https://github.com/asottile/pyupgrade
rev: v2.9.0
rev: v2.10.0
hooks:
- id: pyupgrade
args: ["--py36-plus"]
+77 -54
View File
@@ -86,7 +86,7 @@ jobs:
- uses: actions/setup-python@v2
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==1.9.0
run: python -m pip install cibuildwheel==1.10.0
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
@@ -147,8 +147,8 @@ Here are some repos that use cibuildwheel.
| [pyzmq][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Python bindings for zeromq, the networking library. Uses Cython and CFFI. |
| [aiortc][] | ![github icon][] | ![apple icon][] ![linux icon][] | WebRTC and ORTC implementation for Python using asyncio. |
| [numexpr][] | ![github icon][] ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Fast numerical array expression evaluator for Python, NumPy, PyTables, pandas, bcolz and more |
| [h5py][] | ![azurepipelines icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | HDF5 for Python -- The h5py package is a Pythonic interface to the HDF5 binary data format. |
| [coverage.py][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The coverage tool for Python |
| [h5py][] | ![azurepipelines icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | HDF5 for Python -- The h5py package is a Pythonic interface to the HDF5 binary data format. |
| [River][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | 🌊 Online machine learning in Python |
| [PyAV][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Pythonic bindings for FFmpeg's libraries. |
| [Dependency Injector][] | ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Dependency injection framework for Python, uses Windows TravisCI |
@@ -156,8 +156,8 @@ Here are some repos that use cibuildwheel.
| [ruptures][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Extensive Cython + NumPy [pyproject.toml](https://github.com/deepcharles/ruptures/blob/master/pyproject.toml) example. |
| [aioquic][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | QUIC and HTTP/3 implementation in Python |
| [google neuroglancer][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | WebGL-based viewer for volumetric data |
| [AutoPy][] | ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Includes a Windows Travis build. |
| [pikepdf][] | ![azurepipelines icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python library for reading and writing PDF, powered by qpdf |
| [AutoPy][] | ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Includes a Windows Travis build. |
| [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 ¶ |
@@ -169,6 +169,7 @@ Here are some repos that use cibuildwheel.
| [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. |
| [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. |
@@ -179,8 +180,8 @@ Here are some repos that use cibuildwheel.
| [pyjet][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The interface between FastJet and NumPy |
| [numpythia][] | ![github icon][] | ![apple icon][] ![linux icon][] | The interface between PYTHIA and NumPy |
| [fathon][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | python package for DFA (Detrended Fluctuation Analysis) and related algorithms |
| [pyinstrument_cext][] | ![travisci icon][] ![appveyor icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A simple C extension, without external dependencies |
| [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 |
| [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 |
@@ -194,8 +195,8 @@ Here are some repos that use cibuildwheel.
[pyzmq]: https://github.com/zeromq/pyzmq
[aiortc]: https://github.com/aiortc/aiortc
[numexpr]: https://github.com/pydata/numexpr
[h5py]: https://github.com/h5py/h5py
[coverage.py]: https://github.com/nedbat/coveragepy
[h5py]: https://github.com/h5py/h5py
[River]: https://github.com/online-ml/river
[PyAV]: https://github.com/PyAV-Org/PyAV
[Dependency Injector]: https://github.com/ets-labs/python-dependency-injector
@@ -203,8 +204,8 @@ Here are some repos that use cibuildwheel.
[ruptures]: https://github.com/deepcharles/ruptures
[aioquic]: https://github.com/aiortc/aioquic
[google neuroglancer]: https://github.com/google/neuroglancer
[AutoPy]: https://github.com/autopilot-rs/autopy
[pikepdf]: https://github.com/pikepdf/pikepdf
[AutoPy]: https://github.com/autopilot-rs/autopy
[Parselmouth]: https://github.com/YannickJadoul/Parselmouth
[python-rapidjson]: https://github.com/python-rapidjson/python-rapidjson
[Rtree]: https://github.com/Toblerity/rtree
@@ -216,6 +217,7 @@ Here are some repos that use cibuildwheel.
[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
[CTranslate2]: https://github.com/OpenNMT/CTranslate2
[Tokenizer]: https://github.com/OpenNMT/Tokenizer
[bx-python]: https://github.com/bxlab/bx-python
@@ -226,8 +228,8 @@ Here are some repos that use cibuildwheel.
[pyjet]: https://github.com/scikit-hep/pyjet
[numpythia]: https://github.com/scikit-hep/numpythia
[fathon]: https://github.com/stfbnc/fathon
[pyinstrument_cext]: https://github.com/joerick/pyinstrument_cext
[Imagecodecs (fork)]: https://github.com/czaki/imagecodecs_build
[pyinstrument_cext]: https://github.com/joerick/pyinstrument_cext
[xmlstarlet]: https://github.com/dimitern/xmlstarlet
[pybind11 scikit_build_example]: https://github.com/pybind/scikit_build_example
@@ -241,52 +243,53 @@ 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: 43800, last pushed 0 days ago -->
<!-- Matplotlib: 12963, last pushed 0 days ago -->
<!-- MyPy: 9770, last pushed 0 days ago -->
<!-- psutil: 6990, last pushed 5 days ago -->
<!-- scikit-image: 4143, last pushed 0 days ago -->
<!-- twisted-iocpsupport: 4140, last pushed 7 days ago -->
<!-- websockets: 3146, last pushed 9 days ago -->
<!-- pyzmq: 2675, last pushed 1 days ago -->
<!-- aiortc: 2113, last pushed 7 days ago -->
<!-- numexpr: 1512, last pushed 16 days ago -->
<!-- h5py: 1474, last pushed 2 days ago -->
<!-- coverage.py: 1471, last pushed 2 days ago -->
<!-- River: 1296, last pushed 0 days ago -->
<!-- PyAV: 1142, last pushed 13 days ago -->
<!-- Dependency Injector: 1070, last pushed 0 days ago -->
<!-- PyTables: 1001, last pushed 6 days ago -->
<!-- ruptures: 589, last pushed 3 days ago -->
<!-- aioquic: 571, last pushed 78 days ago -->
<!-- google neuroglancer: 555, last pushed 0 days ago -->
<!-- AutoPy: 517, last pushed 134 days ago -->
<!-- pikepdf: 517, last pushed 5 days ago -->
<!-- Parselmouth: 450, last pushed 1 days ago -->
<!-- python-rapidjson: 410, last pushed 39 days ago -->
<!-- Rtree: 387, last pushed 28 days ago -->
<!-- KDEpy: 235, last pushed 37 days ago -->
<!-- cyvcf2: 233, last pushed 0 days ago -->
<!-- pybind11 cmake_example: 226, last pushed 35 days ago -->
<!-- pybind11 python_example: 224, last pushed 73 days ago -->
<!-- dd-trace-py: 206, last pushed 0 days ago -->
<!-- iminuit: 166, last pushed 25 days ago -->
<!-- jq.py: 140, last pushed 102 days ago -->
<!-- matrixprofile: 124, last pushed 2 days ago -->
<!-- CTranslate2: 123, last pushed 0 days ago -->
<!-- Tokenizer: 115, last pushed 3 days ago -->
<!-- bx-python: 95, last pushed 30 days ago -->
<!-- boost-histogram: 66, last pushed 0 days ago -->
<!-- pybase64: 54, last pushed 0 days ago -->
<!-- TgCrypto: 51, last pushed 65 days ago -->
<!-- etebase-py: 40, last pushed 17 days ago -->
<!-- pyjet: 27, last pushed 3 days ago -->
<!-- numpythia: 24, last pushed 9 days ago -->
<!-- fathon: 20, last pushed 4 days ago -->
<!-- pyinstrument_cext: 10, last pushed 57 days ago -->
<!-- Imagecodecs (fork): 10, last pushed 7 days ago -->
<!-- xmlstarlet: 7, last pushed 2 days ago -->
<!-- pybind11 scikit_build_example: 2, last pushed 18 days ago -->
<!-- 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 -->
<!-- END bin/projects.py -->
@@ -310,6 +313,21 @@ Changelog
<!--changelog-start-->
### v1.10.0
_22 Feb 2021_
- ✨ Added `manylinux_2_24` support. To use these new Debian-based manylinux
images, set your [manylinux image](https://cibuildwheel.readthedocs.io/en/stable/options/#manylinux-image)
options to `manylinux_2_24`.
- 🛠 On macOS, we now set `MACOSX_DEPLOYMENT_TARGET` in before running
`CIBW_BEFORE_ALL`. This is useful when using `CIBW_BEFORE_ALL` to build a
shared library.
- 🛠 An empty `CIBW_BUILD` option is now the same as being unset i.e, `*`.
This makes some build matrix configuration easier. (#588)
- 📚 Neatened up documentation - added tabs to a few places (#576), fixed some
formatting issues.
### v1.9.0
_5 February 2021_
@@ -337,14 +355,16 @@ _5 February 2021_
```yaml
- name: Build wheels
uses: joerick/cibuildwheel@v1.9.0
uses: joerick/cibuildwheel@version # e.g. v1.9.0
with:
output-dir: wheelhouse
# env:
# CIBW_SOME_OPTION: value
```
This saves a bit of boilerplate, and you can [use Dependabot to keep the
pinned version up-to-date](https://cibuildwheel.readthedocs.io/en/stable/faq/#automatic-updates).
- ✨ Added `auto64` and `auto32` shortcuts to the
[CIBW_ARCHS](https://cibuildwheel.readthedocs.io/en/stable/options/#archs)
option. (#553)
@@ -459,6 +479,7 @@ _9 September 2020_
[still on Python 3.9b3](https://github.com/pypa/manylinux/issues/758), not a
release candidate. We'd advise holding off on distributing 3.9 ppc64le wheels
until a subsequent version of cibuildwheel.
- 🌟 Add Gitlab CI support. Gitlab CI can now build Linux wheels, using
cibuildwheel. (#419)
- 🐛 Fix a bug that causes pyproject.toml dependencies to fail to install on
@@ -556,6 +577,7 @@ _2 May 2020_
options - if you always want to use the latest toolchain, you can still do
that, or you can specify your own pip constraints file and manylinux image.
(#256)
- ✨ Added `package_dir` command line option, meaning we now support building
a package that lives in a subdirectory and pulls in files from the wider
project. See [the `package_dir` option help](https://cibuildwheel.readthedocs.io/en/stable/options/#command-line-options)
@@ -566,6 +588,7 @@ _2 May 2020_
will be copied into the Docker container. If your builds are slower on this
version, that's likely the reason. `cd` to your project and then call
`cibuildwheel` from there. (#319, #295)
- 🛠 On macOS, we make `MACOSX_DEPLOYMENT_TARGET` default to `10.9` if it's
not set. This should make things more consistent between Python versions.
- 🛠 Dependency updates - CPython 3.7.7, CPython 2.7.18, Pypy 7.3.1.
+1 -1
View File
@@ -19,7 +19,7 @@ config = [
('cibuildwheel/__init__.py', "__version__ = '{}'"),
('docs/faq.md', "cibuildwheel=={}"),
('docs/faq.md', "cibuildwheel@v{}"),
('docs/setup.md', "cibuildwheel@v{}"),
('docs/setup.md', "cibuildwheel=={}"),
('examples/*', "cibuildwheel=={}"),
('examples/*', "cibuildwheel@v{}"),
('setup.cfg', "version = {}"),
+2 -2
View File
@@ -14,7 +14,7 @@ if __name__ == '__main__':
# run the docker unit tests only on Linux
if sys.platform.startswith('linux'):
unit_test_args += ['--run-docker']
subprocess.check_call(unit_test_args)
subprocess.run(unit_test_args, check=True)
# run the integration tests
subprocess.check_call([sys.executable, '-m', 'pytest', '-x', '--durations', '0', '--timeout=2400', 'test'])
subprocess.run([sys.executable, '-m', 'pytest', '-x', '--durations', '0', '--timeout=2400', 'test'], check=True)
+30 -17
View File
@@ -20,20 +20,21 @@ PYTHON_VERSIONS = ['27', '35', '36', '37', '38', '39']
if '--no-docker' in sys.argv:
for python_version in PYTHON_VERSIONS:
subprocess.check_call([
subprocess.run([
f'./env{python_version}/bin/pip-compile',
'--allow-unsafe',
'--upgrade',
'cibuildwheel/resources/constraints.in',
'--output-file', f'cibuildwheel/resources/constraints-python{python_version}.txt'
])
], check=True)
else:
image_runner = 'quay.io/pypa/manylinux2010_x86_64:latest'
subprocess.check_call(['docker', 'pull', image_runner])
# latest manylinux2010 image with cpython 2.7 support
image_runner = 'quay.io/pypa/manylinux2010_x86_64:2021-02-06-3d322a5'
subprocess.run(['docker', 'pull', image_runner], check=True)
for python_version in PYTHON_VERSIONS:
abi_flags = '' if int(python_version) >= 38 else 'm'
python_path = f'/opt/python/cp{python_version}-cp{python_version}{abi_flags}/bin/'
subprocess.check_call([
subprocess.run([
'docker', 'run', '--rm',
'-e', 'CUSTOM_COMPILE_COMMAND',
'-v', f'{os.getcwd()}:/volume',
@@ -43,7 +44,7 @@ else:
f'{python_path}pip-compile --allow-unsafe --upgrade '
'cibuildwheel/resources/constraints.in '
f'--output-file cibuildwheel/resources/constraints-python{python_version}.txt'
])
], check=True)
# default constraints.txt
shutil.copyfile(f'cibuildwheel/resources/constraints-python{PYTHON_VERSIONS[-1]}.txt', 'cibuildwheel/resources/constraints.txt')
@@ -52,28 +53,40 @@ Image = namedtuple('Image', [
'manylinux_version',
'platform',
'image_name',
'tag',
])
images = [
Image('manylinux1', 'x86_64', 'quay.io/pypa/manylinux1_x86_64'),
Image('manylinux1', 'i686', 'quay.io/pypa/manylinux1_i686'),
Image('manylinux1', 'x86_64', 'quay.io/pypa/manylinux1_x86_64', None),
Image('manylinux1', 'i686', 'quay.io/pypa/manylinux1_i686', None),
Image('manylinux2010', 'x86_64', 'quay.io/pypa/manylinux2010_x86_64'),
Image('manylinux2010', 'i686', 'quay.io/pypa/manylinux2010_i686'),
Image('manylinux2010', 'pypy_x86_64', 'pypywheels/manylinux2010-pypy_x86_64'),
# Images for manylinux2010 are pinned to the latest tag supporting cp27
Image('manylinux2010', 'x86_64', 'quay.io/pypa/manylinux2010_x86_64', '2021-02-06-3d322a5'),
Image('manylinux2010', 'i686', 'quay.io/pypa/manylinux2010_i686', '2021-02-06-3d322a5'),
Image('manylinux2014', 'x86_64', 'quay.io/pypa/manylinux2014_x86_64'),
Image('manylinux2014', 'i686', 'quay.io/pypa/manylinux2014_i686'),
Image('manylinux2014', 'aarch64', 'quay.io/pypa/manylinux2014_aarch64'),
Image('manylinux2014', 'ppc64le', 'quay.io/pypa/manylinux2014_ppc64le'),
Image('manylinux2014', 's390x', 'quay.io/pypa/manylinux2014_s390x'),
Image('manylinux2010', 'pypy_x86_64', 'pypywheels/manylinux2010-pypy_x86_64', None),
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),
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),
Image('manylinux_2_24', 'ppc64le', 'quay.io/pypa/manylinux_2_24_ppc64le', None),
Image('manylinux_2_24', 's390x', 'quay.io/pypa/manylinux_2_24_s390x', None),
]
config = configparser.ConfigParser()
for image in images:
# get the tag name whose digest matches 'latest'
if image.image_name.startswith('quay.io/'):
if image.tag is not None:
# image has been pinned, do not update
tag_name = image.tag
elif image.image_name.startswith('quay.io/'):
_, _, repository_name = image.image_name.partition('/')
response = requests.get(
f'https://quay.io/api/v1/repository/{repository_name}?includeTags=true'
+1 -1
View File
@@ -1 +1 @@
__version__ = '1.9.0'
__version__ = '1.10.0'
+3 -2
View File
@@ -147,7 +147,8 @@ def main() -> None:
else:
assert_never(platform)
build_config, skip_config = os.environ.get('CIBW_BUILD', '*'), os.environ.get('CIBW_SKIP', '')
build_config = os.environ.get('CIBW_BUILD') or '*'
skip_config = os.environ.get('CIBW_SKIP', '')
test_skip = os.environ.get('CIBW_TEST_SKIP', '')
environment_config = get_option_from_environment('CIBW_ENVIRONMENT', platform=platform, default='')
before_all = get_option_from_environment('CIBW_BEFORE_ALL', platform=platform, default='')
@@ -282,7 +283,7 @@ def main() -> None:
if not output_dir.exists():
output_dir.mkdir(parents=True)
with cibuildwheel.util.print_new_wheels("{n} wheels produced in {m:.0f} minutes:", output_dir):
with cibuildwheel.util.print_new_wheels("\n{n} wheels produced in {m:.0f} minutes:", output_dir):
if platform == 'linux':
cibuildwheel.linux.build(build_options)
elif platform == 'windows':
+1 -1
View File
@@ -8,7 +8,7 @@ EnvironmentExecutor = Callable[[List[str], Dict[str, str]], str]
def local_environment_executor(command: List[str], env: Dict[str, str]) -> str:
return subprocess.check_output(command, env=env, universal_newlines=True)
return subprocess.run(command, env=env, universal_newlines=True, stdout=subprocess.PIPE, check=True).stdout
class NodeExecutionContext(NamedTuple):
+2 -1
View File
@@ -49,7 +49,8 @@ def get_python_configurations(
def build(options: BuildOptions) -> None:
try:
subprocess.check_output(['docker', '--version'])
# check docker is installed
subprocess.run(['docker', '--version'], check=True, stdout=subprocess.DEVNULL)
except Exception:
print('cibuildwheel: Docker not found. Docker is required to run Linux builds. '
'If you\'re building on Travis CI, add `services: [docker]` to your .travis.yml.'
+12 -9
View File
@@ -28,14 +28,14 @@ from .util import (
)
def call(args: Sequence[PathOrStr], env: Optional[Dict[str, str]] = None, cwd: Optional[str] = None, shell: bool = False) -> int:
def call(args: Sequence[PathOrStr], env: Optional[Dict[str, str]] = None, cwd: Optional[str] = None, shell: bool = False) -> None:
# print the command executing for the logs
if shell:
print(f'+ {args}')
else:
print('+ ' + ' '.join(shlex.quote(str(a)) for a in args))
return subprocess.check_call(args, env=env, cwd=cwd, shell=shell)
subprocess.run(args, env=env, cwd=cwd, shell=shell, check=True)
def get_macos_version() -> Tuple[int, int]:
@@ -53,10 +53,12 @@ def get_macos_version() -> Tuple[int, int]:
def get_macos_sdks() -> List[str]:
output = subprocess.check_output(
output = subprocess.run(
['xcodebuild', '-showsdks'],
universal_newlines=True,
)
check=True,
stdout=subprocess.PIPE,
).stdout
return [m.group(1) for m in re.finditer(r'-sdk (macosx\S+)', output)]
@@ -125,7 +127,7 @@ def make_symlinks(installation_bin_path: Path, python_executable: str, pip_execu
def install_cpython(version: str, url: str) -> Path:
installed_system_packages = subprocess.check_output(['pkgutil', '--pkgs'], universal_newlines=True).splitlines()
installed_system_packages = subprocess.run(['pkgutil', '--pkgs'], universal_newlines=True, check=True, stdout=subprocess.PIPE).stdout.splitlines()
# if this version of python isn't installed, get it from python.org and install
python_package_identifier = f'org.python.Python.PythonFramework-{version}'
@@ -211,7 +213,7 @@ def setup_python(python_configuration: PythonConfiguration,
# check what version we're on
call(['which', 'python'], env=env)
call(['python', '--version'], env=env)
which_python = subprocess.check_output(['which', 'python'], env=env, universal_newlines=True).strip()
which_python = subprocess.run(['which', 'python'], env=env, universal_newlines=True, check=True, stdout=subprocess.PIPE).stdout.strip()
if which_python != '/tmp/cibw_bin/python':
print("cibuildwheel: python available on PATH doesn't match our installed instance. If you have modified PATH, ensure that you don't overwrite cibuildwheel's entry or insert python above it.", file=sys.stderr)
sys.exit(1)
@@ -221,7 +223,7 @@ def setup_python(python_configuration: PythonConfiguration,
assert (installation_bin_path / 'pip').exists()
call(['which', 'pip'], env=env)
call(['pip', '--version'], env=env)
which_pip = subprocess.check_output(['which', 'pip'], env=env, universal_newlines=True).strip()
which_pip = subprocess.run(['which', 'pip'], env=env, universal_newlines=True, check=True, stdout=subprocess.PIPE).stdout.strip()
if which_pip != '/tmp/cibw_bin/pip':
print("cibuildwheel: pip available on PATH doesn't match our installed instance. If you have modified PATH, ensure that you don't overwrite cibuildwheel's entry or insert pip above it.", file=sys.stderr)
sys.exit(1)
@@ -288,6 +290,7 @@ def build(options: BuildOptions) -> None:
if options.before_all:
log.step('Running before_all...')
env = options.environment.as_dictionary(prev_environment=os.environ)
env.setdefault('MACOSX_DEPLOYMENT_TARGET', '10.9')
before_all_prepared = prepare_command(options.before_all, project='.', package=options.package_dir)
call([before_all_prepared], shell=True, env=env)
@@ -412,12 +415,12 @@ def build(options: BuildOptions) -> None:
raise RuntimeError("don't know how to emulate {testing_arch} on {machine_arch}")
# define a custom 'call' function that adds the arch prefix each time
def call_with_arch(args: Sequence[PathOrStr], **kwargs: Any) -> int:
def call_with_arch(args: Sequence[PathOrStr], **kwargs: Any) -> None:
if isinstance(args, str):
args = ' '.join(arch_prefix) + ' ' + args
else:
args = [*arch_prefix, *args]
return call(args, **kwargs)
call(args, **kwargs)
# Use --no-download to ensure determinism by using seed libraries
# built into virtualenv
+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.7/python-3.8.7-macosx10.9.pkg" },
{ identifier = "cp39-macosx_x86_64", version = "3.9", url = "https://www.python.org/ftp/python/3.9.1/python-3.9.1-macos11.0.pkg" },
{ identifier = "cp39-macosx_arm64", version = "3.9", url = "https://www.python.org/ftp/python/3.9.1/python-3.9.1-macos11.0.pkg" },
{ identifier = "cp39-macosx_universal2", version = "3.9", url = "https://www.python.org/ftp/python/3.9.1/python-3.9.1-macos11.0.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 = "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.7", arch = "32" },
{ identifier = "cp38-win_amd64", version = "3.8.7", arch = "64" },
{ identifier = "cp39-win32", version = "3.9.1", arch = "32" },
{ identifier = "cp39-win_amd64", version = "3.9.1", 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 = "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.4.0.3
singledispatch==3.6.0
# via importlib-resources
six==1.15.0
# via
@@ -1,22 +1,27 @@
[x86_64]
manylinux1 = quay.io/pypa/manylinux1_x86_64:2021-01-24-153e846
manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2021-01-24-4117e7c
manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2021-01-24-91ce2b8
manylinux1 = quay.io/pypa/manylinux1_x86_64:2021-02-19-3257524
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
[i686]
manylinux1 = quay.io/pypa/manylinux1_i686:2021-01-24-153e846
manylinux2010 = quay.io/pypa/manylinux2010_i686:2021-01-24-4117e7c
manylinux2014 = quay.io/pypa/manylinux2014_i686:2021-01-24-91ce2b8
manylinux1 = quay.io/pypa/manylinux1_i686:2021-02-19-3257524
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
[pypy_x86_64]
manylinux2010 = pypywheels/manylinux2010-pypy_x86_64:2020-12-11-f1e0e80
[aarch64]
manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2021-01-24-91ce2b8
manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2021-02-20-2c345f8
manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2021-02-20-2c345f8
[ppc64le]
manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2021-01-24-91ce2b8
manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2021-02-20-2c345f8
manylinux_2_24 = quay.io/pypa/manylinux_2_24_ppc64le:2021-02-20-2c345f8
[s390x]
manylinux2014 = quay.io/pypa/manylinux2014_s390x:2021-01-24-91ce2b8
manylinux2014 = quay.io/pypa/manylinux2014_s390x:2021-02-20-2c345f8
manylinux_2_24 = quay.io/pypa/manylinux_2_24_s390x:2021-02-20-2c345f8
+4 -4
View File
@@ -33,12 +33,12 @@ def call(args: Sequence[PathOrStr], env: Optional[Dict[str, str]] = None,
print('+ ' + ' '.join(str(a) for a in args))
# we use shell=True here, even though we don't need a shell due to a bug
# https://bugs.python.org/issue8557
subprocess.check_call([str(a) for a in args], env=env, cwd=cwd, shell=True)
subprocess.run([str(a) for a in args], env=env, cwd=cwd, shell=True, check=True)
def shell(command: str, env: Optional[Dict[str, str]] = None, cwd: Optional[str] = None) -> None:
print(f'+ {command}')
subprocess.check_call(command, env=env, cwd=cwd, shell=True)
subprocess.run(command, env=env, cwd=cwd, shell=True, check=True)
def get_nuget_args(version: str, arch: str) -> List[str]:
@@ -152,7 +152,7 @@ def setup_python(python_configuration: PythonConfiguration, dependency_constrain
call(['where', 'python'], env=env)
call(['python', '--version'], env=env)
call(['python', '-c', '"import struct; print(struct.calcsize(\'P\') * 8)"'], env=env)
where_python = subprocess.check_output(['where', 'python'], env=env, universal_newlines=True).splitlines()[0].strip()
where_python = subprocess.run(['where', 'python'], env=env, universal_newlines=True, check=True, stdout=subprocess.PIPE).stdout.splitlines()[0].strip()
if where_python != str(installation_path / 'python.exe'):
print("cibuildwheel: python available on PATH doesn't match our installed instance. If you have modified PATH, ensure that you don't overwrite cibuildwheel's entry or insert python above it.", file=sys.stderr)
sys.exit(1)
@@ -161,7 +161,7 @@ def setup_python(python_configuration: PythonConfiguration, dependency_constrain
if not (installation_path / 'Scripts' / 'pip.exe').exists():
call(['python', get_pip_script, *dependency_constraint_flags], env=env, cwd="C:\\cibw")
assert (installation_path / 'Scripts' / 'pip.exe').exists()
where_pip = subprocess.check_output(['where', 'pip'], env=env, universal_newlines=True).splitlines()[0].strip()
where_pip = subprocess.run(['where', 'pip'], env=env, universal_newlines=True, check=True, stdout=subprocess.PIPE).stdout.splitlines()[0].strip()
if where_pip.strip() != str(installation_path / 'Scripts' / 'pip.exe'):
print("cibuildwheel: pip available on PATH doesn't match our installed instance. If you have modified PATH, ensure that you don't overwrite cibuildwheel's entry or insert pip above it.", file=sys.stderr)
sys.exit(1)
+6
View File
@@ -287,3 +287,9 @@
ci: [github]
os: [apple, linux, windows]
notes: Extensive Cython + NumPy [pyproject.toml](https://github.com/deepcharles/ruptures/blob/master/pyproject.toml) example.
- name: time-machine
gh: adamchainz/time-machine
ci: [github]
os: [apple, linux, windows]
notes: Time mocking library using only the CPython C API.
+56
View File
@@ -89,3 +89,59 @@ h1, h2, h3, h4, h5, h6 {
/* import font awesome 4 for icons */
@import url(https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css);
/* Tabs */
/* Style the tab */
.tabs {
margin-bottom: 1em;
-webkit-font-smoothing: antialiased;
}
.tabs-header {
background-color: white;
display: flex;
justify-content: flex-start;
border-bottom: 2px solid #ccc;
}
/* Style the buttons that are used to open the tab content */
.tabs-header button {
background-color: transparent;
border: none;
outline: none;
cursor: pointer;
color: inherit;
font: inherit;
font-size: 0.9em;
font-weight: 600;
padding: 8px 16px;
border-bottom: 2px solid transparent;
/* put the border on top of the parent border */
margin-bottom: -2px;
}
.tabs-header button:focus-visible {
/* preserve an outline for accesibility purposes */
outline: 1px solid currentColor;
}
/* Change background color of buttons on hover */
.tabs-header button:hover {
background-color: rgba(0, 0, 0, 0.02);
}
/* Create an active/current tablink class */
.tabs-header button.active {
color: #4086bd;
border-bottom-color: currentColor;
}
/* Style the tab content */
.tabs-content {
background-color: #f1f6fa;
padding: 1px 1em;
padding-top: 0.8em;
}
+46 -1
View File
@@ -1,4 +1,49 @@
// add classes for code-block-filename styling
$('.rst-content pre')
.prev('blockquote')
.addClass('code-block-filename');
var tabConversionIterations = 0
// convert tab admonition to tabs
while (true) {
const firstTab = $('.rst-content .admonition.tab').first()
if (firstTab.length == 0) break;
const otherTabs = firstTab.nextUntil(':not(.admonition.tab)');
const allTabs = $($.merge($.merge([], firstTab), otherTabs));
const tabContainer = $('<div>').addClass('tabs');
const headerContainer = $('<div>').addClass('tabs-header');
const contentContainer = $('<div>').addClass('tabs-content');
tabContainer.insertBefore(firstTab);
tabContainer.append(headerContainer, contentContainer)
const selectTab = function (index) {
headerContainer.children().removeClass('active')
headerContainer.children().eq(index).addClass('active')
contentContainer.children().hide()
contentContainer.children().eq(index).show()
}
allTabs.each(function (tabI, el) {
const $el = $(el)
const titleElement = $el.children('.admonition-title')
const title = titleElement.text()
const button = $('<button>').text(title)
button.click(function () {
selectTab(tabI)
})
headerContainer.append(button)
titleElement.remove()
$el.removeClass('admonition')
contentContainer.append($el)
})
selectTab(0)
// this will catch infinite loops which can occur when editing the above
if (tabConversionIterations++ > 1000) throw 'too many iterations'
}
+4 -2
View File
@@ -105,6 +105,7 @@ Actions. Once QEMU is set up and registered, you just need to set the
Linux), and the other architectures are emulated automatically.
> .github/workflows/build.yml
```yaml
{% include "../examples/github-with-qemu.yml" %}
```
@@ -130,6 +131,7 @@ Hopefully, this is a temporary situation. Once we have widely available Apple Si
Here's an example GitHub Actions workflow with a job that builds for Apple Silicon:
> .github/workflows/build_macos.yml
```yml
{% include "../examples/github-apple-silicon.yml" %}
```
@@ -203,7 +205,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.9.0
uses: joerick/cibuildwheel@v1.10.0
```
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.
@@ -229,7 +231,7 @@ The second option, and the only one that supports other CI systems, is using a `
```bash
# requirements-cibw.txt
cibuildwheel==1.9.0
cibuildwheel==1.10.0
```
Then your install step would have `python -m pip install -r requirements-cibw.txt` in it. Your `dependabot.yml` file could look like this:
+77 -48
View File
@@ -10,44 +10,72 @@ your CI config.
For example, to configure cibuildwheel to run tests, add the following YAML to
your CI config file:
> .travis.yml ([docs](https://docs.travis-ci.com/user/environment-variables/))
```yaml
env:
global:
- CIBW_TEST_REQUIRES=pytest
- CIBW_TEST_COMMAND="pytest {project}/tests"
```
> appveyor.yml ([docs](https://www.appveyor.com/docs/build-configuration/#environment-variables))
```yaml
environment:
global:
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: "pytest {project}\\tests"
```
!!! tab "GitHub Actions"
> .circleci/config.yml ([docs](https://circleci.com/docs/2.0/configuration-reference/#environment))
```yaml
jobs:
job_name:
environment:
> .github/workflows/*.yml ([docs](https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables)) (can be global, in job, or in step)
```yaml
env:
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: "pytest {project}/tests"
```
```
> azure-pipelines.yml ([docs](https://docs.microsoft.com/en-us/azure/devops/pipelines/process/variables))
```yaml
variables:
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: "pytest {project}/tests"
```
!!! tab "Azure Pipelines"
> azure-pipelines.yml ([docs](https://docs.microsoft.com/en-us/azure/devops/pipelines/process/variables))
```yaml
variables:
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: "pytest {project}/tests"
```
!!! tab "Travis CI"
> .travis.yml ([docs](https://docs.travis-ci.com/user/environment-variables/))
```yaml
env:
global:
- CIBW_TEST_REQUIRES=pytest
- CIBW_TEST_COMMAND="pytest {project}/tests"
```
!!! tab "AppVeyor"
> appveyor.yml ([docs](https://www.appveyor.com/docs/build-configuration/#environment-variables))
```yaml
environment:
global:
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: "pytest {project}\\tests"
```
!!! tab "CircleCI"
> .circleci/config.yml ([docs](https://circleci.com/docs/2.0/configuration-reference/#environment))
```yaml
jobs:
job_name:
environment:
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: "pytest {project}/tests"
```
!!! tab "Gitlab CI"
> .gitlab-ci.yml ([docs](https://docs.gitlab.com/ee/ci/variables/README.html#create-a-custom-variable-in-gitlab-ciyml))
```yaml
linux:
variables:
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: "pytest {project}/tests"
```
> .github/workflows/*.yml ([docs](https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables)) (can be global, in job, or in step)
```yaml
env:
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: "pytest {project}/tests"
```
## Build selection
@@ -79,17 +107,17 @@ When setting the options, you can use shell-style globbing syntax, as per [`fnma
<div class="build-id-table-marker"></div>
| | macOS 64bit | Manylinux x86 64bit | Manylinux x86 32bit | Windows 64bit | Windows 32bit | Manylinux Armv8 64bit | Manylinux PPC64LE | Manylinux s390x |
|-----------------|---------------------|------------------------|----------------------|-----------------|----------------|------------------------|------------------------|----------------------|
| Python 2.7 | cp27-macosx_x86_64 | cp27-manylinux_x86_64 | cp27-manylinux_i686 | cp27-win_amd64 | cp27-win32 | | | |
| Python 3.5 | cp35-macosx_x86_64 | cp35-manylinux_x86_64 | cp35-manylinux_i686 | cp35-win_amd64 | cp35-win32 | cp35-manylinux_aarch64 | cp35-manylinux_ppc64le | cp35-manylinux_s390x |
| Python 3.6 | cp36-macosx_x86_64 | cp36-manylinux_x86_64 | cp36-manylinux_i686 | cp36-win_amd64 | cp36-win32 | cp36-manylinux_aarch64 | cp36-manylinux_ppc64le | cp36-manylinux_s390x |
| Python 3.7 | cp37-macosx_x86_64 | cp37-manylinux_x86_64 | cp37-manylinux_i686 | cp37-win_amd64 | cp37-win32 | cp37-manylinux_aarch64 | cp37-manylinux_ppc64le | cp37-manylinux_s390x |
| Python 3.8 | cp38-macosx_x86_64 | cp38-manylinux_x86_64 | cp38-manylinux_i686 | cp38-win_amd64 | cp38-win32 | cp38-manylinux_aarch64 | cp38-manylinux_ppc64le | cp38-manylinux_s390x |
| Python 3.9 | cp39-macosx_x86_64 | cp39-manylinux_x86_64 | cp39-manylinux_i686 | cp39-win_amd64 | cp39-win32 | cp39-manylinux_aarch64 | cp39-manylinux_ppc64le | cp39-manylinux_s390x |
| PyPy 2.7 v7.3.3 | pp27-macosx_x86_64 | pp27-manylinux_x86_64 | | | pp27-win32 | | | |
| PyPy 3.6 v7.3.3 | pp36-macosx_x86_64 | pp36-manylinux_x86_64 | | | pp36-win32 | | | |
| PyPy 3.7 (beta) v7.3.3 | pp37-macosx_x86_64 | pp37-manylinux_x86_64 | | | pp37-win32 | | | |
| | macOS | Windows | Manylinux Intel | Manylinux Other |
|--------------|---------------------------------------------------------------------|-------------------------------|-----------------------------------------------|----------------------------------------------------------------------------|
| Python 2.7 | cp27-macosx_x86_64 | cp27-win_amd64<br/>cp27-win32 | cp27-manylinux_x86_64<br/>cp27-manylinux_i686 | |
| Python 3.5 | cp35-macosx_x86_64 | cp35-win_amd64<br/>cp35-win32 | cp35-manylinux_x86_64<br/>cp35-manylinux_i686 | cp35-manylinux_aarch64<br/>cp35-manylinux_ppc64le<br/>cp35-manylinux_s390x |
| Python 3.6 | cp36-macosx_x86_64 | cp36-win_amd64<br/>cp36-win32 | cp36-manylinux_x86_64<br/>cp36-manylinux_i686 | cp36-manylinux_aarch64<br/>cp36-manylinux_ppc64le<br/>cp36-manylinux_s390x |
| Python 3.7 | cp37-macosx_x86_64 | cp37-win_amd64<br/>cp37-win32 | cp37-manylinux_x86_64<br/>cp37-manylinux_i686 | cp37-manylinux_aarch64<br/>cp37-manylinux_ppc64le<br/>cp37-manylinux_s390x |
| Python 3.8 | cp38-macosx_x86_64 | cp38-win_amd64<br/>cp38-win32 | cp38-manylinux_x86_64<br/>cp38-manylinux_i686 | cp38-manylinux_aarch64<br/>cp38-manylinux_ppc64le<br/>cp38-manylinux_s390x |
| Python 3.9 | cp39-macosx_x86_64<br/>cp39-macosx_universal2<br/>cp39-macosx_arm64 | cp39-win_amd64<br/>cp39-win32 | cp39-manylinux_x86_64<br/>cp39-manylinux_i686 | cp39-manylinux_aarch64<br/>cp39-manylinux_ppc64le<br/>cp39-manylinux_s390x |
| PyPy2.7 v7.3 | pp27-macosx_x86_64 | pp27-win32 | pp27-manylinux_x86_64 | |
| PyPy3.6 v7.3 | pp36-macosx_x86_64 | pp36-win32 | pp36-manylinux_x86_64 | |
| 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`.
@@ -420,14 +448,14 @@ CIBW_REPAIR_WHEEL_COMMAND_LINUX: "auditwheel repair --lib-sdir . -w {dest_dir} {
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 value of this option can either be set to `manylinux1`, `manylinux2010` or `manylinux2014` 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 must be used because this is the first version of the manylinux specification that supports additional architectures.
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`.
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` 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/) and [PEP 599](https://www.python.org/dev/peps/pep-0599/) for more details).
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).
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)"'`).
Note that `manylinux2014` doesn't support builds with Python 2.7 - when building with `manylinux2014`, skip Python 2.7 using `CIBW_SKIP` (see example below).
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).
#### Examples
@@ -690,12 +718,13 @@ optional arguments:
<style>
.options-toc {
display: grid;
grid-auto-columns: fit-content(20%) 1fr;
grid-template-columns: fit-content(20%) 1fr;
grid-gap: 16px 32px;
gap: 16px 32px;
font-size: 90%;
margin-bottom: 28px;
margin-top: 28px;
overflow-x: auto;
}
.options-toc .header {
grid-column: 1 / 3;
+127 -35
View File
@@ -4,12 +4,101 @@ title: 'Setup'
# GitHub Actions [linux/mac/windows] {: #github-actions}
To build Linux, Mac, and Windows wheels using GitHub Actions, create a `.github/workflows/build.yml` file in your repo.
To build Linux, Mac, and Windows wheels using GitHub Actions, create a `.github/workflows/build_wheels.yml` file in your repo.
!!! tab "Action"
For GitHub Actions, `cibuildwheel` provides an action you can use. This is
concise and enables easier auto updating via GitHub's Dependabot; see
[Automatic updates](faq.md#automatic-updates).
> .github/workflows/build_wheels.yml
```yaml
{% include "../examples/github-minimal.yml" %}
```
You can use `env:` with the action just like you would with `run:`; you can
also use `with:` to set the command line options: `package-dir: .` and
`output-dir: wheelhouse` (those values are the defaults).
!!! tab "pipx"
The GitHub Actions runners have pipx installed, so you can easily build in
just one line. This is internally how the action works; the main benefit of
the action form is easy updates via GitHub's Dependabot.
> .github/workflows/build_wheels.yml
```yaml
name: Build
on: [push, pull_request]
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, windows-2019, macos-10.15]
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
- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl
```
!!! tab "Generic"
This is the most generic form using setup-python and pip; it looks the most
like the other CI examples. If you want to avoid having setup that takes
advantage of GitHub Actions features or pipx being preinstalled, this might
appeal to you.
> .github/workflows/build_wheels.yml
```yaml
name: Build
on: [push, pull_request]
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, windows-2019, macos-10.15]
steps:
- uses: actions/checkout@v2
# Used to host cibuildwheel
- 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
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl
```
> build.yml
```yaml
{% include "../examples/github-minimal.yml" %}
```
Commit this file, and push to GitHub - either to your default branch, or to a PR branch. The build should start automatically.
@@ -17,13 +106,13 @@ For more info on this file, check out the [docs](https://help.github.com/en/acti
[`examples/github-deploy.yml`](https://github.com/joerick/cibuildwheel/blob/master/examples/github-deploy.yml) extends this minimal example with a demonstration of how to automatically upload the built wheels to PyPI.
You can also use cibuildwheel directly as an action with `uses: joerick/cibuildwheel@v1.9.0`; this combines the download and run steps into a single action, and command line arguments are available via `with:`. This makes it easy to manage cibuildwheel updates via normal actions update mechanisms like dependabot, see [Automatic updates](faq.md#automatic-updates).
# Azure Pipelines [linux/mac/windows] {: #azure-pipelines}
To build Linux, Mac, and Windows wheels on Azure Pipelines, create a `azure-pipelines.yml` file in your repo.
> azure-pipelines.yml
```yaml
{% include "../examples/azure-pipelines-minimal.yml" %}
```
@@ -40,6 +129,7 @@ Wheels will be stored for you and available through the Pipelines interface. For
To build Linux, Mac, and Windows wheels on Travis CI, create a `.travis.yml` file in your repo.
> .travis.yml
```yaml
{% include "../examples/travis-ci-minimal.yml" %}
```
@@ -52,35 +142,6 @@ Then setup a deployment method by following the [Travis CI deployment docs](http
[`examples/travis-ci-deploy.yml`](https://github.com/joerick/cibuildwheel/blob/master/examples/travis-ci-deploy.yml) extends this minimal example with a demonstration of how to automatically upload the built wheels to PyPI.
# CircleCI [linux/mac] {: #circleci}
To build Linux and Mac wheels on CircleCI, create a `.circleci/config.yml` file in your repo,
> .circleci/config.yml
```yaml
{% include "../examples/circleci-minimal.yml" %}
```
Commit this file, enable building of your repo on CircleCI, and push.
!!! note
CircleCI doesn't enable free macOS containers for open source by default, but you can ask for access. See [here](https://circleci.com/docs/2.0/oss/#overview) for more information.
CircleCI will store the built wheels for you - you can access them from the project console. Check out the CircleCI [docs](https://circleci.com/docs/2.0/configuration-reference/#section=configuration) for more info on this config file.
# Gitlab CI [linux] {: #gitlab-ci}
To build Linux wheels on Gitlab CI, create a `.gitlab-ci.yml` file in your repo,
> .gitlab-ci.yml
```yaml
{% include "../examples/gitlab-minimal.yml" %}
```
Commit this file, and push to Gitlab. The pipeline should start automatically.
Gitlab will store the built wheels for you - you can access them from the Pipelines view. Check out the Gitlab [docs](https://docs.gitlab.com/ee/ci/yaml/) for more info on this config file.
# AppVeyor [linux/mac/windows] {: #appveyor}
To build Linux, Mac, and Windows wheels on AppVeyor, create an `appveyor.yml` file in your repo.
@@ -97,6 +158,37 @@ AppVeyor will store the built wheels for you - you can access them from the proj
For more info on this config file, check out the [docs](https://www.appveyor.com/docs/).
# CircleCI [linux/mac] {: #circleci}
To build Linux and Mac wheels on CircleCI, create a `.circleci/config.yml` file in your repo,
> .circleci/config.yml
```yaml
{% include "../examples/circleci-minimal.yml" %}
```
Commit this file, enable building of your repo on CircleCI, and push.
!!! note
CircleCI doesn't enable free macOS containers for open source by default, but you can ask for access. See [here](https://circleci.com/docs/2.0/oss/#overview) for more information.
CircleCI will store the built wheels for you - you can access them from the project console. Check out the CircleCI [docs](https://circleci.com/docs/2.0/configuration-reference/#section=configuration) for more info on this config file.
# Gitlab CI [linux] {: #gitlab-ci}
To build Linux wheels on Gitlab CI, create a `.gitlab-ci.yml` file in your repo,
> .gitlab-ci.yml
```yaml
{% include "../examples/gitlab-minimal.yml" %}
```
Commit this file, and push to Gitlab. The pipeline should start automatically.
Gitlab will store the built wheels for you - you can access them from the Pipelines view. Check out the Gitlab [docs](https://docs.gitlab.com/ee/ci/yaml/) for more info on this config file.
> ⚠️ Got an error? Check the [FAQ](faq.md).
<script>
+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.9.0
install: python -m pip install cibuildwheel==1.10.0
build_script: python -m cibuildwheel --output-dir wheelhouse
+3 -3
View File
@@ -6,7 +6,7 @@ jobs:
- bash: |
set -o errexit
python3 -m pip install --upgrade pip
pip3 install cibuildwheel==1.9.0
pip3 install cibuildwheel==1.10.0
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.9.0
python3 -m pip install cibuildwheel==1.10.0
displayName: Install dependencies
- bash: cibuildwheel --output-dir wheelhouse .
displayName: Build wheels
@@ -36,7 +36,7 @@ jobs:
- bash: |
set -o errexit
python -m pip install --upgrade pip
pip install cibuildwheel==1.9.0
pip install cibuildwheel==1.10.0
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.9.0
pip3 install --user cibuildwheel==1.10.0
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.9.0
pip3 install cibuildwheel==1.10.0
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.9.0
uses: joerick/cibuildwheel@v1.10.0
env:
CIBW_ARCHS_MACOS: x86_64 universal2
+1 -1
View File
@@ -31,7 +31,7 @@ jobs:
run: choco install vcpython27 -f -y
- name: Build wheels
uses: joerick/cibuildwheel@v1.9.0
uses: joerick/cibuildwheel@v1.10.0
- uses: actions/upload-artifact@v2
with:
+1 -1
View File
@@ -18,7 +18,7 @@ jobs:
run: choco install vcpython27 -f -y
- name: Build wheels
uses: joerick/cibuildwheel@v1.9.0
uses: joerick/cibuildwheel@v1.10.0
# to supply options, put them in 'env', like:
# env:
# CIBW_SOME_OPTION: value
+1 -1
View File
@@ -29,7 +29,7 @@ jobs:
platforms: all
- name: Build wheels
uses: joerick/cibuildwheel@v1.9.0
uses: joerick/cibuildwheel@v1.10.0
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
- python -m pip install cibuildwheel==1.10.0
- cibuildwheel --output-dir wheelhouse
artifacts:
paths:
+1 -1
View File
@@ -20,7 +20,7 @@ jobs:
- ln -s /c/Python38/python.exe /c/Python38/python3.exe
install:
- python3 -m pip install cibuildwheel==1.9.0
- python3 -m pip install cibuildwheel==1.10.0
script:
# build the wheels, put them into './wheelhouse'
+1 -1
View File
@@ -26,7 +26,7 @@ jobs:
- ln -s /c/Python38/python.exe /c/Python38/python3.exe
install:
- python3 -m pip install cibuildwheel==1.9.0
- python3 -m pip install cibuildwheel==1.10.0
script:
# build the wheels, put them into './wheelhouse'
+3 -3
View File
@@ -55,7 +55,7 @@ jobs:
- stage: deploy
name: Build and deploy Linux wheels
services: docker
install: python3 -m pip install cibuildwheel==1.9.0
install: python3 -m pip install cibuildwheel==1.10.0
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.9.0
install: python3 -m pip install cibuildwheel==1.10.0
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.9.0
install: python3 -m pip install cibuildwheel==1.10.0
script: python3 -m cibuildwheel --output-dir wheelhouse
after_success: |
python3 -m pip install twine
+5 -1
View File
@@ -25,13 +25,17 @@ nav:
- changelog.md
markdown_extensions:
- fenced_code
- md_in_html
- toc:
permalink: True
- attr_list
- admonition
- pymdownx.magiclink:
repo_url_shortener: True
- pymdownx.highlight:
# use highlightjs - it's built-in to the theme
use_pygments: False
- pymdownx.superfences
plugins:
- include-markdown
+1 -1
View File
@@ -1,7 +1,7 @@
[metadata]
name = cibuildwheel
version = 1.9.0
version = 1.10.0
description = Build Python wheels on CI with minimal configuration.
long_description = file: README.md
long_description_content_type = text/markdown
+1 -1
View File
@@ -2,7 +2,7 @@ from setuptools import setup
extras = {
"docs": [
"mkdocs-include-markdown-plugin==2.1.1",
"mkdocs-include-markdown-plugin==2.8.0",
"mkdocs==1.0.4",
"pymdown-extensions",
],
+1 -1
View File
@@ -7,7 +7,7 @@ from . import test_projects, utils
project_with_before_build_asserts = test_projects.new_c_project(
setup_py_add=textwrap.dedent(r'''
import sys, os
import os
# assert that the Python version as written to pythonversion.txt in the CIBW_BEFORE_BUILD step
# is the same one as is currently running.
+3 -3
View File
@@ -7,7 +7,7 @@ from . import test_projects, utils
dockcross_only_project = test_projects.new_c_project(
setup_py_add=textwrap.dedent(r'''
import os, sys
import os
# check that we're running in the correct docker image as specified in the
# environment options CIBW_MANYLINUX1_*_IMAGE
@@ -31,10 +31,10 @@ def test(tmp_path):
actual_wheels = utils.cibuildwheel_run(project_dir, add_env={
'CIBW_MANYLINUX_X86_64_IMAGE': 'dockcross/manylinux2010-x64',
'CIBW_MANYLINUX_I686_IMAGE': 'dockcross/manylinux2010-x86',
'CIBW_SKIP': 'pp* cp39-*',
'CIBW_SKIP': 'pp* cp27-* cp39-*',
})
# also check that we got the right wheels built
expected_wheels = [w for w in utils.expected_wheels('spam', '0.1.0')
if '-pp' not in w and '-cp39-' not in w]
if '-pp' not in w and '-cp39-' not in w and '-cp27-' not in w]
assert set(actual_wheels) == set(expected_wheels)
+4 -2
View File
@@ -15,10 +15,12 @@ ALL_MACOS_WHEELS = (
def get_xcode_version() -> Tuple[int, int]:
output = subprocess.check_output(
output = subprocess.run(
['xcodebuild', '-version'],
universal_newlines=True,
)
check=True,
stdout=subprocess.PIPE,
).stdout
lines = output.splitlines()
_, version_str = lines[0].split()
+17 -12
View File
@@ -9,6 +9,9 @@ from . import test_projects, utils
project_with_manylinux_symbols = test_projects.new_c_project(
spam_c_top_level_add=textwrap.dedent(r'''
#include <malloc.h>
#include <stdlib.h>
#include <stdint.h>
#include <math.h>
#if !defined(__GLIBC_PREREQ)
#error "Must run on a glibc linux environment"
@@ -19,19 +22,21 @@ project_with_manylinux_symbols = test_projects.new_c_project(
#endif
'''),
spam_c_function_add=textwrap.dedent(r'''
#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 17) /* manylinux2014 is glibc 2.17 */
// secure_getenv is only available in manylinux2014, ensuring
// that only a manylinux2014 wheel is produced
secure_getenv("NON_EXISTING_ENV_VARIABLE");
#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 24)
// nextupf is only available in manylinux_2_24+
sts = (int)nextupf(0.0F);
#elif defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 17) /* manylinux2014 is glibc 2.17 */
// secure_getenv is only available in manylinux2014+
sts = (int)(intptr_t)secure_getenv("NON_EXISTING_ENV_VARIABLE");
#elif defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10) /* manylinux2010 is glibc 2.12 */
// malloc_info is only available on manylinux2010+
malloc_info(0, stdout);
sts = malloc_info(0, stdout);
#endif
'''),
)
@pytest.mark.parametrize('manylinux_image', ['manylinux1', 'manylinux2010', 'manylinux2014'])
@pytest.mark.parametrize('manylinux_image', ['manylinux1', 'manylinux2010', 'manylinux2014', 'manylinux_2_24'])
def test(manylinux_image, tmp_path):
if utils.platform != 'linux':
pytest.skip('the docker test is only relevant to the linux build')
@@ -46,7 +51,7 @@ def test(manylinux_image, tmp_path):
# CFLAGS environment variable is necessary to fail on 'malloc_info' (on manylinux1) during compilation/linking,
# rather than when dynamically loading the Python
add_env = {
'CIBW_ENVIRONMENT': 'CFLAGS="$CFLAGS -Werror=implicit-function-declaration"',
'CIBW_ENVIRONMENT': 'CFLAGS="$CFLAGS -O0 -Werror=implicit-function-declaration"',
'CIBW_MANYLINUX_X86_64_IMAGE': manylinux_image,
'CIBW_MANYLINUX_I686_IMAGE': manylinux_image,
'CIBW_MANYLINUX_PYPY_X86_64_IMAGE': manylinux_image,
@@ -57,14 +62,14 @@ def test(manylinux_image, tmp_path):
if manylinux_image == 'manylinux1':
# We don't have a manylinux1 image for PyPy
add_env['CIBW_SKIP'] = 'pp*'
elif manylinux_image == 'manylinux2014':
# We don't have a manylinux2014 image for PyPy (yet?)
add_env['CIBW_SKIP'] = 'cp27* pp*' # Python 2.7 not available on manylinux2014
elif manylinux_image in {'manylinux2014', 'manylinux_2_24'}:
# We don't have a manylinux2014 / 'manylinux_2_24' image for PyPy (yet?)
add_env['CIBW_SKIP'] = 'cp27* pp*' # Python 2.7 not available on manylinux2014 / 'manylinux_2_24'
actual_wheels = utils.cibuildwheel_run(project_dir, add_env=add_env)
expected_wheels = [w for w in utils.expected_wheels('spam', '0.1.0', manylinux_versions=[manylinux_image])]
if manylinux_image == 'manylinux2014':
if manylinux_image in {'manylinux2014', 'manylinux_2_24'}:
expected_wheels = [w for w in expected_wheels if '-cp27' not in w]
if manylinux_image in ['manylinux1', 'manylinux2014']:
if manylinux_image in {'manylinux1', 'manylinux2014', 'manylinux_2_24'}:
expected_wheels = [w for w in expected_wheels if '-pp' not in w]
assert set(actual_wheels) == set(expected_wheels)
-1
View File
@@ -7,7 +7,6 @@ basic_project = test_projects.new_c_project(
setup_py_add=textwrap.dedent(
"""
# Will fail if PEP 518 does work
import sys
import requests
if sys.version_info < (3, 6, 0):
assert requests.__version__ == "2.22.0", "Requests found but wrong version ({0})".format(requests.__version__)
+3 -3
View File
@@ -34,11 +34,11 @@ def main():
if options.open:
if sys.platform == 'darwin':
subprocess.check_call(['open', '--', project_dir])
subprocess.run(['open', '--', project_dir], check=True)
elif sys.platform == 'linux2':
subprocess.check_call(['xdg-open', '--', project_dir])
subprocess.run(['xdg-open', '--', project_dir], check=True)
elif sys.platform == 'win32':
subprocess.check_call(['explorer', project_dir])
subprocess.run(['explorer', project_dir], check=True)
if __name__ == '__main__':
+10 -1
View File
@@ -60,12 +60,21 @@ MOD_INIT(spam)
'''
SETUP_PY_TEMPLATE = r'''
import sys
from setuptools import setup, Extension
{{ setup_py_add }}
libraries = []
if sys.platform.startswith('linux'):
libraries.extend(['m', 'c'])
setup(
ext_modules=[Extension('spam', sources=['spam.c'])],
ext_modules=[Extension(
'spam',
sources=['spam.c'],
libraries=libraries,
)],
{{ setup_py_setup_args_add | indent(4) }}
)
'''
-1
View File
@@ -5,7 +5,6 @@ from . import test_projects, utils
project_with_ssl_tests = test_projects.new_c_project(
setup_py_add=textwrap.dedent(r'''
import ssl
import sys
if sys.version_info[0] == 2:
from urllib2 import urlopen
+6 -3
View File
@@ -31,11 +31,13 @@ def cibuildwheel_get_build_identifiers(project_path, env=None):
Returns the list of build identifiers that cibuildwheel will try to build
for the current platform.
'''
cmd_output = subprocess.check_output(
cmd_output = subprocess.run(
[sys.executable, '-m', 'cibuildwheel', '--print-build-identifiers', str(project_path)],
universal_newlines=True,
env=env,
)
check=True,
stdout=subprocess.PIPE,
).stdout
return cmd_output.strip().split('\n')
@@ -64,10 +66,11 @@ def cibuildwheel_run(project_path, package_dir='.', env=None, add_env=None, outp
env.update(add_env)
with TemporaryDirectoryIfNone(output_dir) as _output_dir:
subprocess.check_call(
subprocess.run(
[sys.executable, '-m', 'cibuildwheel', '--output-dir', str(_output_dir), str(package_dir)],
env=env,
cwd=project_path,
check=True,
)
wheels = os.listdir(_output_dir)
return wheels
@@ -71,11 +71,13 @@ def test_empty_selector(platform, intercepted_build_args, monkeypatch):
('x86_64', 'manylinux1', 'quay.io/pypa/manylinux1_x86_64:*'),
('x86_64', 'manylinux2010', 'quay.io/pypa/manylinux2010_x86_64:*'),
('x86_64', 'manylinux2014', 'quay.io/pypa/manylinux2014_x86_64:*'),
('x86_64', 'manylinux_2_24', 'quay.io/pypa/manylinux_2_24_x86_64:*'),
('x86_64', 'custom_image', 'custom_image'),
('i686', None, 'quay.io/pypa/manylinux2010_i686:*'),
('i686', 'manylinux1', 'quay.io/pypa/manylinux1_i686:*'),
('i686', 'manylinux2010', 'quay.io/pypa/manylinux2010_i686:*'),
('i686', 'manylinux2014', 'quay.io/pypa/manylinux2014_i686:*'),
('i686', 'manylinux_2_24', 'quay.io/pypa/manylinux_2_24_i686:*'),
('i686', 'custom_image', 'custom_image'),
('pypy_x86_64', None, 'pypywheels/manylinux2010-pypy_x86_64:*'),
('pypy_x86_64', 'manylinux1', 'manylinux1'), # Does not exist