Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d6cf349b1a | ||
|
|
515e9be2c4 | ||
|
|
9e1369e07d | ||
|
|
122af66cd1 | ||
|
|
501562c572 | ||
|
|
37afff43ad | ||
|
|
b6a862a3ff | ||
|
|
5db1cf898e | ||
|
|
703f6b9d82 | ||
|
|
967d043895 | ||
|
|
68e47e4fcb | ||
|
|
e04bd54dd6 | ||
|
|
f62cbc303a | ||
|
|
f7bdccfbd7 | ||
|
|
07fd2fc7b1 | ||
|
|
9c36d85eee | ||
|
|
0aac8c2221 | ||
|
|
3311a36e65 | ||
|
|
506f2dcb9c | ||
|
|
74466fb69d | ||
|
|
31770e9ac7 | ||
|
|
e368cebe5a | ||
|
|
688c458172 |
@@ -37,7 +37,7 @@ jobs:
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install -e ".[dev]"
|
||||
python -m pip install ".[test]"
|
||||
|
||||
- name: Sample build
|
||||
if: "contains(github.event.pull_request.labels.*.name, 'CI: Sample build')"
|
||||
@@ -70,7 +70,7 @@ jobs:
|
||||
- uses: actions/setup-python@v2
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install -r requirements-dev.txt
|
||||
python -m pip install ".[test]"
|
||||
|
||||
- name: Set up QEMU
|
||||
id: qemu
|
||||
|
||||
@@ -17,6 +17,8 @@ jobs:
|
||||
run: nox --force-color -s update_constraints
|
||||
- name: "Run update: python configs"
|
||||
run: nox --force-color -s update_pins
|
||||
- name: "Run update: docs user projects"
|
||||
run: nox --force-color -s update_proj
|
||||
|
||||
# we use this step to grab a Github App auth token, so that PRs generated by this workflow
|
||||
# run the GHA tests.
|
||||
|
||||
+21
-10
@@ -14,7 +14,7 @@ repos:
|
||||
- id: trailing-whitespace
|
||||
|
||||
- repo: https://github.com/asottile/pyupgrade
|
||||
rev: v2.19.0
|
||||
rev: v2.19.4
|
||||
hooks:
|
||||
- id: pyupgrade
|
||||
name: PyUpgrade 3.6+
|
||||
@@ -26,12 +26,12 @@ repos:
|
||||
args: ["--py37-plus"]
|
||||
|
||||
- repo: https://github.com/PyCQA/isort
|
||||
rev: 5.8.0
|
||||
rev: 5.9.1
|
||||
hooks:
|
||||
- id: isort
|
||||
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 21.5b2
|
||||
rev: 21.6b0
|
||||
hooks:
|
||||
- id: black
|
||||
|
||||
@@ -42,17 +42,28 @@ repos:
|
||||
stages: [manual]
|
||||
|
||||
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||
rev: v0.812
|
||||
rev: v0.902
|
||||
hooks:
|
||||
- id: mypy
|
||||
exclude: ^(bin/|cibuildwheel/resources/).*py$
|
||||
additional_dependencies: [packaging]
|
||||
args: ["--python-version=3.6", "--ignore-missing-imports", "--scripts-are-modules"]
|
||||
exclude: ^(bin|cibuildwheel/resources|docs)/.*py$
|
||||
args: ["--python-version=3.6", "--scripts-are-modules"]
|
||||
additional_dependencies:
|
||||
- packaging
|
||||
- types-jinja2
|
||||
- types-certifi
|
||||
- types-toml
|
||||
- id: mypy
|
||||
name: mypy 3.7+ on bin/
|
||||
files: ^bin/.*py$
|
||||
additional_dependencies: [packaging]
|
||||
args: ["--python-version=3.7", "--ignore-missing-imports", "--scripts-are-modules"]
|
||||
files: ^(bin|docs)/.*py$
|
||||
args: ["--python-version=3.7", "--scripts-are-modules"]
|
||||
additional_dependencies:
|
||||
- packaging
|
||||
- rich
|
||||
- types-jinja2
|
||||
- types-pyyaml
|
||||
- types-click
|
||||
- types-requests
|
||||
- types-toml
|
||||
|
||||
- repo: https://github.com/PyCQA/flake8
|
||||
rev: 3.9.2
|
||||
|
||||
@@ -85,7 +85,7 @@ jobs:
|
||||
- uses: actions/setup-python@v2
|
||||
|
||||
- name: Install cibuildwheel
|
||||
run: python -m pip install cibuildwheel==2.0.0a1
|
||||
run: python -m pip install cibuildwheel==2.0.0a4
|
||||
|
||||
- name: Build wheels
|
||||
run: python -m cibuildwheel --output-dir wheelhouse
|
||||
@@ -123,6 +123,7 @@ Options
|
||||
| | [`CIBW_TEST_SKIP`](https://cibuildwheel.readthedocs.io/en/stable/options/#test-skip) | Skip running tests on some builds |
|
||||
| **Other** | [`CIBW_BUILD_VERBOSITY`](https://cibuildwheel.readthedocs.io/en/stable/options/#build-verbosity) | Increase/decrease the output of pip wheel |
|
||||
|
||||
These options can be specified in a pyproject.toml file, as well; see [configuration](https://cibuildwheel.readthedocs.io/en/stable/options/#configuration).
|
||||
|
||||
Working examples
|
||||
----------------
|
||||
@@ -156,8 +157,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 |
|
||||
| [pikepdf][] | ![azurepipelines icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python library for reading and writing PDF, powered by qpdf |
|
||||
| [DeepForest][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | An Efficient, Scalable and Optimized Python Framework for Deep Forest (2021.2.1) |
|
||||
| [google neuroglancer][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | WebGL-based viewer for volumetric data |
|
||||
| [DeepForest][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | An Efficient, Scalable and Optimized Python Framework for Deep Forest (2021.2.1) |
|
||||
| [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 |
|
||||
@@ -173,27 +174,27 @@ Here are some repos that use cibuildwheel.
|
||||
| [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 |
|
||||
| [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. |
|
||||
| [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. |
|
||||
| [jq.py][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | Python bindings for jq |
|
||||
| [Tokenizer][] | ![github icon][] ![travisci icon][] | ![apple icon][] ![linux icon][] | Fast and customizable text tokenization library with BPE and SentencePiece support |
|
||||
| [PyGLM][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Fast OpenGL Mathematics (GLM) for Python |
|
||||
| [bx-python][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | A library that includes Cython extensions. |
|
||||
| [boost-histogram][] | ![github icon][] ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Supports full range of wheels, including PyPy and alternate archs. |
|
||||
| [iDynTree][] | ![github icon][] | ![linux icon][] | Uses manylinux_2_24 |
|
||||
| [boost-histogram][] | ![github icon][] ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Supports full range of wheels, including PyPy and alternate archs. |
|
||||
| [TgCrypto][] | ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Includes a Windows Travis build. |
|
||||
| [pybase64][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Fast Base64 encoding/decoding in Python |
|
||||
| [etebase-py][] | ![travisci icon][] | ![linux icon][] | Python bindings to a Rust library using `setuptools-rust`, and `sccache` for improved speed. |
|
||||
| [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 |
|
||||
| [polaroid][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Full range of wheels for setuptools rust, with auto release and PyPI deploy. |
|
||||
| [GSD][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Cython and NumPy project with 64-bit wheels. |
|
||||
| [polaroid][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Full range of wheels for setuptools rust, with auto release and PyPI deploy. |
|
||||
| [pybind11 scikit_build_example][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | An example combining scikit-build and pybind11 |
|
||||
| [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. |
|
||||
| [xmlstarlet][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Python 3.6+ CFFI bindings with true MSVC build. |
|
||||
| [CorrectionLib][] | ![github icon][] | ![apple icon][] ![linux icon][] | Structured JSON powered correction library for HEP, designed for the CMS experiment at CERN. |
|
||||
| [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. |
|
||||
| [SiPM][] | ![github icon][] | ![apple icon][] ![linux icon][] | High performance library for SiPM detectors simulation using C++17, OpenMP and AVX2 intrinsics. |
|
||||
|
||||
[scikit-learn]: https://github.com/scikit-learn/scikit-learn
|
||||
@@ -215,8 +216,8 @@ Here are some repos that use cibuildwheel.
|
||||
[ruptures]: https://github.com/deepcharles/ruptures
|
||||
[aioquic]: https://github.com/aiortc/aioquic
|
||||
[pikepdf]: https://github.com/pikepdf/pikepdf
|
||||
[DeepForest]: https://github.com/LAMDA-NJU/Deep-Forest
|
||||
[google neuroglancer]: https://github.com/google/neuroglancer
|
||||
[DeepForest]: https://github.com/LAMDA-NJU/Deep-Forest
|
||||
[AutoPy]: https://github.com/autopilot-rs/autopy
|
||||
[Parselmouth]: https://github.com/YannickJadoul/Parselmouth
|
||||
[python-rapidjson]: https://github.com/python-rapidjson/python-rapidjson
|
||||
@@ -232,27 +233,27 @@ Here are some repos that use cibuildwheel.
|
||||
[dd-trace-py]: https://github.com/DataDog/dd-trace-py
|
||||
[iminuit]: https://github.com/scikit-hep/iminuit
|
||||
[time-machine]: https://github.com/adamchainz/time-machine
|
||||
[matrixprofile]: https://github.com/matrix-profile-foundation/matrixprofile
|
||||
[CTranslate2]: https://github.com/OpenNMT/CTranslate2
|
||||
[matrixprofile]: https://github.com/matrix-profile-foundation/matrixprofile
|
||||
[jq.py]: https://github.com/mwilliamson/jq.py
|
||||
[Tokenizer]: https://github.com/OpenNMT/Tokenizer
|
||||
[PyGLM]: https://github.com/Zuzu-Typ/PyGLM
|
||||
[bx-python]: https://github.com/bxlab/bx-python
|
||||
[boost-histogram]: https://github.com/scikit-hep/boost-histogram
|
||||
[iDynTree]: https://github.com/robotology/idyntree
|
||||
[boost-histogram]: https://github.com/scikit-hep/boost-histogram
|
||||
[TgCrypto]: https://github.com/pyrogram/tgcrypto
|
||||
[pybase64]: https://github.com/mayeut/pybase64
|
||||
[etebase-py]: https://github.com/etesync/etebase-py
|
||||
[pyjet]: https://github.com/scikit-hep/pyjet
|
||||
[numpythia]: https://github.com/scikit-hep/numpythia
|
||||
[fathon]: https://github.com/stfbnc/fathon
|
||||
[polaroid]: https://github.com/daggy1234/polaroid
|
||||
[GSD]: https://github.com/glotzerlab/gsd
|
||||
[polaroid]: https://github.com/daggy1234/polaroid
|
||||
[pybind11 scikit_build_example]: https://github.com/pybind/scikit_build_example
|
||||
[pyinstrument_cext]: https://github.com/joerick/pyinstrument_cext
|
||||
[Imagecodecs (fork)]: https://github.com/czaki/imagecodecs_build
|
||||
[xmlstarlet]: https://github.com/dimitern/xmlstarlet
|
||||
[CorrectionLib]: https://github.com/cms-nanoAOD/correctionlib
|
||||
[Imagecodecs (fork)]: https://github.com/czaki/imagecodecs_build
|
||||
[SiPM]: https://github.com/EdoPro98/SimSiPM
|
||||
|
||||
[appveyor icon]: docs/data/readme_icons/appveyor.svg
|
||||
@@ -265,64 +266,64 @@ 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: 45793, last pushed 0 days ago -->
|
||||
<!-- Matplotlib: 13636, last pushed 0 days ago -->
|
||||
<!-- MyPy: 10696, last pushed 0 days ago -->
|
||||
<!-- psutil: 7319, last pushed 4 days ago -->
|
||||
<!-- scikit-image: 4342, last pushed 0 days ago -->
|
||||
<!-- twisted-iocpsupport: 4266, last pushed 0 days ago -->
|
||||
<!-- websockets: 3349, last pushed 0 days ago -->
|
||||
<!-- pyzmq: 2792, last pushed 1 days ago -->
|
||||
<!-- aiortc: 2396, last pushed 32 days ago -->
|
||||
<!-- River: 1604, last pushed 0 days ago -->
|
||||
<!-- coverage.py: 1592, last pushed 6 days ago -->
|
||||
<!-- numexpr: 1586, last pushed 75 days ago -->
|
||||
<!-- h5py: 1517, last pushed 1 days ago -->
|
||||
<!-- Dependency Injector: 1318, last pushed 20 days ago -->
|
||||
<!-- PyAV: 1246, last pushed 2 days ago -->
|
||||
<!-- PyTables: 1023, last pushed 53 days ago -->
|
||||
<!-- ruptures: 704, last pushed 0 days ago -->
|
||||
<!-- aioquic: 644, last pushed 13 days ago -->
|
||||
<!-- pikepdf: 624, last pushed 9 days ago -->
|
||||
<!-- DeepForest: 591, last pushed 6 days ago -->
|
||||
<!-- google neuroglancer: 586, last pushed 3 days ago -->
|
||||
<!-- AutoPy: 533, last pushed 251 days ago -->
|
||||
<!-- Parselmouth: 511, last pushed 0 days ago -->
|
||||
<!-- python-rapidjson: 420, last pushed 156 days ago -->
|
||||
<!-- Rtree: 403, last pushed 59 days ago -->
|
||||
<!-- python-snappy: 398, last pushed 82 days ago -->
|
||||
<!-- markupsafe: 390, last pushed 0 days ago -->
|
||||
<!-- H3-py: 376, last pushed 0 days ago -->
|
||||
<!-- pybind11 cmake_example: 271, last pushed 6 days ago -->
|
||||
<!-- KDEpy: 264, last pushed 7 days ago -->
|
||||
<!-- cyvcf2: 260, last pushed 19 days ago -->
|
||||
<!-- pybind11 python_example: 250, last pushed 6 days ago -->
|
||||
<!-- sourmash: 241, last pushed 0 days ago -->
|
||||
<!-- dd-trace-py: 237, last pushed 0 days ago -->
|
||||
<!-- iminuit: 181, last pushed 0 days ago -->
|
||||
<!-- time-machine: 160, last pushed 0 days ago -->
|
||||
<!-- matrixprofile: 158, last pushed 68 days ago -->
|
||||
<!-- CTranslate2: 157, last pushed 0 days ago -->
|
||||
<!-- jq.py: 152, last pushed 15 days ago -->
|
||||
<!-- Tokenizer: 140, last pushed 14 days ago -->
|
||||
<!-- PyGLM: 103, last pushed 7 days ago -->
|
||||
<!-- bx-python: 102, last pushed 47 days ago -->
|
||||
<!-- boost-histogram: 78, last pushed 0 days ago -->
|
||||
<!-- iDynTree: 75, last pushed 3 days ago -->
|
||||
<!-- TgCrypto: 64, last pushed 16 days ago -->
|
||||
<!-- pybase64: 62, last pushed 1 days ago -->
|
||||
<!-- etebase-py: 50, last pushed 134 days ago -->
|
||||
<!-- pyjet: 28, last pushed 6 days ago -->
|
||||
<!-- numpythia: 28, last pushed 15 days ago -->
|
||||
<!-- fathon: 25, last pushed 65 days ago -->
|
||||
<!-- polaroid: 16, last pushed 69 days ago -->
|
||||
<!-- GSD: 16, last pushed 1 days ago -->
|
||||
<!-- pybind11 scikit_build_example: 14, last pushed 6 days ago -->
|
||||
<!-- pyinstrument_cext: 10, last pushed 95 days ago -->
|
||||
<!-- xmlstarlet: 7, last pushed 29 days ago -->
|
||||
<!-- CorrectionLib: 5, last pushed 5 days ago -->
|
||||
<!-- Imagecodecs (fork): 3, last pushed 19 days ago -->
|
||||
<!-- SiPM: 2, last pushed 15 days ago -->
|
||||
<!-- scikit-learn: 46184, last pushed 0 days ago -->
|
||||
<!-- Matplotlib: 13797, last pushed 0 days ago -->
|
||||
<!-- MyPy: 10905, last pushed 0 days ago -->
|
||||
<!-- psutil: 7420, last pushed 14 days ago -->
|
||||
<!-- scikit-image: 4387, last pushed 0 days ago -->
|
||||
<!-- twisted-iocpsupport: 4280, last pushed 0 days ago -->
|
||||
<!-- websockets: 3418, last pushed 0 days ago -->
|
||||
<!-- pyzmq: 2821, last pushed 3 days ago -->
|
||||
<!-- aiortc: 2441, last pushed 9 days ago -->
|
||||
<!-- River: 1669, last pushed 0 days ago -->
|
||||
<!-- coverage.py: 1630, last pushed 0 days ago -->
|
||||
<!-- numexpr: 1597, last pushed 109 days ago -->
|
||||
<!-- h5py: 1530, last pushed 0 days ago -->
|
||||
<!-- Dependency Injector: 1396, last pushed 0 days ago -->
|
||||
<!-- PyAV: 1279, last pushed 15 days ago -->
|
||||
<!-- PyTables: 1028, last pushed 87 days ago -->
|
||||
<!-- ruptures: 739, last pushed 4 days ago -->
|
||||
<!-- aioquic: 680, last pushed 6 days ago -->
|
||||
<!-- pikepdf: 655, last pushed 0 days ago -->
|
||||
<!-- google neuroglancer: 646, last pushed 0 days ago -->
|
||||
<!-- DeepForest: 621, last pushed 21 days ago -->
|
||||
<!-- AutoPy: 542, last pushed 4 days ago -->
|
||||
<!-- Parselmouth: 521, last pushed 27 days ago -->
|
||||
<!-- python-rapidjson: 423, last pushed 0 days ago -->
|
||||
<!-- Rtree: 408, last pushed 92 days ago -->
|
||||
<!-- python-snappy: 403, last pushed 116 days ago -->
|
||||
<!-- markupsafe: 401, last pushed 4 days ago -->
|
||||
<!-- H3-py: 392, last pushed 8 days ago -->
|
||||
<!-- pybind11 cmake_example: 278, last pushed 21 days ago -->
|
||||
<!-- KDEpy: 276, last pushed 18 days ago -->
|
||||
<!-- cyvcf2: 266, last pushed 53 days ago -->
|
||||
<!-- pybind11 python_example: 255, last pushed 21 days ago -->
|
||||
<!-- sourmash: 250, last pushed 0 days ago -->
|
||||
<!-- dd-trace-py: 248, last pushed 0 days ago -->
|
||||
<!-- iminuit: 181, last pushed 17 days ago -->
|
||||
<!-- time-machine: 173, last pushed 6 days ago -->
|
||||
<!-- CTranslate2: 168, last pushed 0 days ago -->
|
||||
<!-- matrixprofile: 166, last pushed 17 days ago -->
|
||||
<!-- jq.py: 159, last pushed 10 days ago -->
|
||||
<!-- Tokenizer: 146, last pushed 13 days ago -->
|
||||
<!-- PyGLM: 104, last pushed 41 days ago -->
|
||||
<!-- bx-python: 103, last pushed 7 days ago -->
|
||||
<!-- iDynTree: 82, last pushed 6 days ago -->
|
||||
<!-- boost-histogram: 80, last pushed 3 days ago -->
|
||||
<!-- TgCrypto: 66, last pushed 22 days ago -->
|
||||
<!-- pybase64: 62, last pushed 5 days ago -->
|
||||
<!-- etebase-py: 50, last pushed 168 days ago -->
|
||||
<!-- pyjet: 28, last pushed 32 days ago -->
|
||||
<!-- numpythia: 28, last pushed 21 days ago -->
|
||||
<!-- fathon: 26, last pushed 19 days ago -->
|
||||
<!-- GSD: 17, last pushed 17 days ago -->
|
||||
<!-- polaroid: 16, last pushed 12 days ago -->
|
||||
<!-- pybind11 scikit_build_example: 14, last pushed 20 days ago -->
|
||||
<!-- pyinstrument_cext: 10, last pushed 129 days ago -->
|
||||
<!-- Imagecodecs (fork): 9, last pushed 13 days ago -->
|
||||
<!-- xmlstarlet: 7, last pushed 63 days ago -->
|
||||
<!-- CorrectionLib: 6, last pushed 9 days ago -->
|
||||
<!-- SiPM: 3, last pushed 18 days ago -->
|
||||
|
||||
<!-- END bin/projects.py -->
|
||||
|
||||
@@ -350,14 +351,23 @@ Changelog
|
||||
|
||||
_This release is currently in prerelease. The below release notes will be condensed into a single entry when we do a final release._
|
||||
|
||||
_v2.0.0a1 (1 Jun 2021)_
|
||||
_v2.0.0a3 (22 Jun 2021)_
|
||||
|
||||
- 🌟 You can now configure cibuildwheel options inside your project's `pyproject.toml`! Environment variables still work of course. Check out the [documentation](https://cibuildwheel.readthedocs.io/en/latest/options/#setting-options) for more info.
|
||||
|
||||
_v2.0.0a2 (1 Jun 2021)_
|
||||
|
||||
- 🌟 Added the ability to test building wheels on CPython 3.10! Because CPython 3.10 is in beta, these wheels should not be distributed, because they might not be compatible with the final release, but it's available to build for testing purposes. Use the flag [`--prerelease-pythons` or `CIBW_PRERELEASE_PYTHONS`](https://cibuildwheel.readthedocs.io/en/latest/options/#prerelease-pythons) to test. (#675)
|
||||
- ✨ Added the ability to build CPython 3.8 wheels on Apple Silicon. (#704)
|
||||
- ✨ Added the ability to build CPython 3.8 wheels for Apple Silicon. (#704)
|
||||
- 🛠 Update to the latest build dependencies, including auditwheel 4. (#633)
|
||||
- 🛠 Use the unified pypa/manylinux images to build PyPy (#671)
|
||||
- ⚠️ Removed support for building Python 2.7 and Python 3.5 wheels, for both CPython and PyPy. If you still need to build on these versions, please use the latest v1.x version. (#596)
|
||||
|
||||
### v1.12.0
|
||||
|
||||
_22 June 2021_
|
||||
|
||||
- ✨ Adds support building macOS universal2/arm64 wheels on Python 3.8.
|
||||
|
||||
### v1.11.1
|
||||
|
||||
|
||||
Executable → Regular
+1
-1
@@ -62,7 +62,7 @@ class Project:
|
||||
print(f"Broken: {self.stars_repo}")
|
||||
raise
|
||||
|
||||
self.num_stars = repo.stargazers_count
|
||||
self.num_stars: int = repo.stargazers_count
|
||||
self.pushed_at = repo.pushed_at
|
||||
if not self.notes:
|
||||
notes = repo.description
|
||||
|
||||
@@ -122,7 +122,7 @@ class PyPyVersions:
|
||||
self.arch = arch_str
|
||||
|
||||
def get_arch_file(self, release: dict[str, Any]) -> str:
|
||||
urls = [
|
||||
urls: list[str] = [
|
||||
rf["download_url"]
|
||||
for rf in release["files"]
|
||||
if "" in rf["platform"] == f"win{self.arch}"
|
||||
@@ -131,7 +131,7 @@ class PyPyVersions:
|
||||
|
||||
def update_version_windows(self, spec: Specifier) -> ConfigWinCP:
|
||||
releases = [r for r in self.releases if spec.contains(r["python_version"])]
|
||||
releases = sorted(releases, key=lambda r: r["pypy_version"])
|
||||
releases = sorted(releases, key=lambda r: r["pypy_version"]) # type: ignore
|
||||
releases = [r for r in releases if self.get_arch_file(r)]
|
||||
|
||||
if not releases:
|
||||
@@ -156,7 +156,7 @@ class PyPyVersions:
|
||||
raise RuntimeError("Other archs not supported yet on macOS")
|
||||
|
||||
releases = [r for r in self.releases if spec.contains(r["python_version"])]
|
||||
releases = sorted(releases, key=lambda r: r["pypy_version"])
|
||||
releases = sorted(releases, key=lambda r: r["pypy_version"]) # type: ignore
|
||||
|
||||
if not releases:
|
||||
raise RuntimeError(f"PyPy macOS {self.arch} not found for {spec}!")
|
||||
|
||||
@@ -1 +1 @@
|
||||
__version__ = "2.0.0a1"
|
||||
__version__ = "2.0.0a4"
|
||||
|
||||
+75
-95
@@ -5,7 +5,7 @@ import textwrap
|
||||
import traceback
|
||||
from configparser import ConfigParser
|
||||
from pathlib import Path
|
||||
from typing import Dict, List, Optional, Set, Union, overload
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
from packaging.specifiers import SpecifierSet
|
||||
|
||||
@@ -16,9 +16,11 @@ import cibuildwheel.util
|
||||
import cibuildwheel.windows
|
||||
from cibuildwheel.architecture import Architecture, allowed_architectures_check
|
||||
from cibuildwheel.environment import EnvironmentParseError, parse_environment
|
||||
from cibuildwheel.options import ConfigOptions
|
||||
from cibuildwheel.projectfiles import get_requires_python_str
|
||||
from cibuildwheel.typing import PLATFORMS, PlatformName, assert_never
|
||||
from cibuildwheel.util import (
|
||||
BuildFrontend,
|
||||
BuildOptions,
|
||||
BuildSelector,
|
||||
DependencyConstraints,
|
||||
@@ -28,39 +30,16 @@ from cibuildwheel.util import (
|
||||
resources_dir,
|
||||
)
|
||||
|
||||
|
||||
@overload
|
||||
def get_option_from_environment(
|
||||
option_name: str, *, platform: Optional[str] = None, default: str
|
||||
) -> str:
|
||||
... # noqa: E704
|
||||
|
||||
|
||||
@overload
|
||||
def get_option_from_environment(
|
||||
option_name: str, *, platform: Optional[str] = None, default: None = None
|
||||
) -> Optional[str]:
|
||||
... # noqa: E704 E302
|
||||
|
||||
|
||||
def get_option_from_environment(
|
||||
option_name: str, *, platform: Optional[str] = None, default: Optional[str] = None
|
||||
) -> Optional[str]: # noqa: E302
|
||||
"""
|
||||
Returns an option from the environment, optionally scoped by the platform.
|
||||
|
||||
Example:
|
||||
get_option_from_environment('CIBW_COLOR', platform='macos')
|
||||
|
||||
This will return the value of CIBW_COLOR_MACOS if it exists, otherwise the value of
|
||||
CIBW_COLOR.
|
||||
"""
|
||||
if platform:
|
||||
option = os.environ.get(f"{option_name}_{platform.upper()}")
|
||||
if option is not None:
|
||||
return option
|
||||
|
||||
return os.environ.get(option_name, default)
|
||||
MANYLINUX_ARCHS = (
|
||||
"x86_64",
|
||||
"i686",
|
||||
"pypy_x86_64",
|
||||
"aarch64",
|
||||
"ppc64le",
|
||||
"s390x",
|
||||
"pypy_aarch64",
|
||||
"pypy_i686",
|
||||
)
|
||||
|
||||
|
||||
def main() -> None:
|
||||
@@ -69,8 +48,9 @@ def main() -> None:
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Build wheels for all the platforms.",
|
||||
epilog="""
|
||||
Most options are supplied via environment variables.
|
||||
See https://github.com/pypa/cibuildwheel#options for info.
|
||||
Most options are supplied via environment variables or in
|
||||
--config-file (pyproject.toml usually). See
|
||||
https://github.com/pypa/cibuildwheel#options for info.
|
||||
""",
|
||||
)
|
||||
|
||||
@@ -104,10 +84,17 @@ def main() -> None:
|
||||
|
||||
parser.add_argument(
|
||||
"--output-dir",
|
||||
default=os.environ.get("CIBW_OUTPUT_DIR", "wheelhouse"),
|
||||
help="Destination folder for the wheels.",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--config-file",
|
||||
help="""
|
||||
TOML config file for cibuildwheel. Defaults to pyproject.toml, but
|
||||
can be overridden with this option.
|
||||
""",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"package_dir",
|
||||
default=".",
|
||||
@@ -176,53 +163,64 @@ def main() -> None:
|
||||
sys.exit(2)
|
||||
|
||||
package_dir = Path(args.package_dir)
|
||||
output_dir = Path(args.output_dir)
|
||||
|
||||
if platform == "linux":
|
||||
repair_command_default = "auditwheel repair -w {dest_dir} {wheel}"
|
||||
elif platform == "macos":
|
||||
repair_command_default = "delocate-listdeps {wheel} && delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}"
|
||||
elif platform == "windows":
|
||||
repair_command_default = ""
|
||||
else:
|
||||
assert_never(platform)
|
||||
manylinux_identifiers = {
|
||||
f"manylinux-{build_platform}-image" for build_platform in MANYLINUX_ARCHS
|
||||
}
|
||||
disallow = {
|
||||
"linux": {"dependency-versions"},
|
||||
"macos": manylinux_identifiers,
|
||||
"windows": manylinux_identifiers,
|
||||
}
|
||||
options = ConfigOptions(package_dir, args.config_file, platform=platform, disallow=disallow)
|
||||
output_dir = Path(
|
||||
args.output_dir
|
||||
if args.output_dir is not None
|
||||
else os.environ.get("CIBW_OUTPUT_DIR", "wheelhouse")
|
||||
)
|
||||
|
||||
build_config = options("build", env_plat=False, sep=" ") or "*"
|
||||
skip_config = options("skip", env_plat=False, sep=" ")
|
||||
test_skip = options("test-skip", env_plat=False, sep=" ")
|
||||
|
||||
archs_config_str = args.archs or options("archs", sep=" ")
|
||||
|
||||
build_frontend_str = options("build-frontend", env_plat=False)
|
||||
environment_config = options("environment", table={"item": '{k}="{v}"', "sep": " "})
|
||||
before_all = options("before-all", sep=" && ")
|
||||
before_build = options("before-build", sep=" && ")
|
||||
repair_command = options("repair-wheel-command", sep=" && ")
|
||||
|
||||
dependency_versions = options("dependency-versions")
|
||||
test_command = options("test-command", sep=" && ")
|
||||
before_test = options("before-test", sep=" && ")
|
||||
test_requires = options("test-requires", sep=" ").split()
|
||||
test_extras = options("test-extras", sep=",")
|
||||
build_verbosity_str = options("build-verbosity")
|
||||
|
||||
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="")
|
||||
before_build = get_option_from_environment("CIBW_BEFORE_BUILD", platform=platform)
|
||||
repair_command = get_option_from_environment(
|
||||
"CIBW_REPAIR_WHEEL_COMMAND", platform=platform, default=repair_command_default
|
||||
)
|
||||
dependency_versions = get_option_from_environment(
|
||||
"CIBW_DEPENDENCY_VERSIONS", platform=platform, default="pinned"
|
||||
)
|
||||
test_command = get_option_from_environment("CIBW_TEST_COMMAND", platform=platform)
|
||||
before_test = get_option_from_environment("CIBW_BEFORE_TEST", platform=platform)
|
||||
test_requires = get_option_from_environment(
|
||||
"CIBW_TEST_REQUIRES", platform=platform, default=""
|
||||
).split()
|
||||
test_extras = get_option_from_environment("CIBW_TEST_EXTRAS", platform=platform, default="")
|
||||
build_verbosity_str = get_option_from_environment(
|
||||
"CIBW_BUILD_VERBOSITY", platform=platform, default=""
|
||||
)
|
||||
prerelease_pythons = args.prerelease_pythons or cibuildwheel.util.strtobool(
|
||||
os.environ.get("CIBW_PRERELEASE_PYTHONS", "0")
|
||||
)
|
||||
|
||||
build_frontend: BuildFrontend
|
||||
if build_frontend_str == "build":
|
||||
build_frontend = "build"
|
||||
elif build_frontend_str == "pip":
|
||||
build_frontend = "pip"
|
||||
else:
|
||||
msg = f"cibuildwheel: Unrecognised build frontend '{build_frontend}', only 'pip' and 'build' are supported"
|
||||
print(msg, file=sys.stderr)
|
||||
sys.exit(2)
|
||||
|
||||
package_files = {"setup.py", "setup.cfg", "pyproject.toml"}
|
||||
|
||||
if not any(package_dir.joinpath(name).exists() for name in package_files):
|
||||
names = ", ".join(sorted(package_files, reverse=True))
|
||||
print(
|
||||
f"cibuildwheel: Could not find any of {{{names}}} at root of package", file=sys.stderr
|
||||
)
|
||||
msg = f"cibuildwheel: Could not find any of {{{names}}} at root of package"
|
||||
print(msg, file=sys.stderr)
|
||||
sys.exit(2)
|
||||
|
||||
# This is not supported in tool.cibuildwheel, as it comes from a standard location.
|
||||
# Passing this in as an environment variable will override pyproject.toml, setup.cfg, or setup.py
|
||||
requires_python_str: Optional[str] = os.environ.get(
|
||||
"CIBW_PROJECT_REQUIRES_PYTHON"
|
||||
@@ -270,13 +268,6 @@ def main() -> None:
|
||||
# This needs to be passed on to the docker container in linux.py
|
||||
os.environ["CIBUILDWHEEL"] = "1"
|
||||
|
||||
if args.archs is not None:
|
||||
archs_config_str = args.archs
|
||||
else:
|
||||
archs_config_str = get_option_from_environment(
|
||||
"CIBW_ARCHS", platform=platform, default="auto"
|
||||
)
|
||||
|
||||
archs = Architecture.parse_config(archs_config_str, platform=platform)
|
||||
|
||||
identifiers = get_build_identifiers(platform, build_selector, archs)
|
||||
@@ -286,7 +277,7 @@ def main() -> None:
|
||||
print(identifier)
|
||||
sys.exit(0)
|
||||
|
||||
manylinux_images: Optional[Dict[str, str]] = None
|
||||
manylinux_images: Dict[str, str] = {}
|
||||
if platform == "linux":
|
||||
pinned_docker_images_file = resources_dir / "pinned_docker_images.cfg"
|
||||
all_pinned_docker_images = ConfigParser()
|
||||
@@ -297,22 +288,10 @@ def main() -> None:
|
||||
# 'pypy_x86_64': {'manylinux2010': '...' }
|
||||
# ... }
|
||||
|
||||
manylinux_images = {}
|
||||
|
||||
for build_platform in [
|
||||
"x86_64",
|
||||
"i686",
|
||||
"pypy_x86_64",
|
||||
"aarch64",
|
||||
"ppc64le",
|
||||
"s390x",
|
||||
"pypy_aarch64",
|
||||
"pypy_i686",
|
||||
]:
|
||||
for build_platform in MANYLINUX_ARCHS:
|
||||
pinned_images = all_pinned_docker_images[build_platform]
|
||||
|
||||
config_name = f"CIBW_MANYLINUX_{build_platform.upper()}_IMAGE"
|
||||
config_value = os.environ.get(config_name)
|
||||
config_value = options(f"manylinux-{build_platform}-image")
|
||||
|
||||
if config_value is None:
|
||||
# default to manylinux2010 if it's available, otherwise manylinux2014
|
||||
@@ -340,7 +319,8 @@ def main() -> None:
|
||||
repair_command=repair_command,
|
||||
environment=environment,
|
||||
dependency_constraints=dependency_constraints,
|
||||
manylinux_images=manylinux_images,
|
||||
manylinux_images=manylinux_images or None,
|
||||
build_frontend=build_frontend,
|
||||
)
|
||||
|
||||
# Python is buffering by default when running on the CI platforms, giving problems interleaving subprocess call output with unflushed calls to 'print'
|
||||
|
||||
+39
-16
@@ -7,7 +7,7 @@ from typing import List, NamedTuple, Set
|
||||
from .architecture import Architecture
|
||||
from .docker_container import DockerContainer
|
||||
from .logger import log
|
||||
from .typing import PathOrStr
|
||||
from .typing import PathOrStr, assert_never
|
||||
from .util import (
|
||||
BuildOptions,
|
||||
BuildSelector,
|
||||
@@ -145,7 +145,7 @@ def build(options: BuildOptions) -> None:
|
||||
env, executor=docker.environment_executor
|
||||
)
|
||||
|
||||
# check config python and pip are still on PATH
|
||||
# check config python is still on PATH
|
||||
which_python = docker.call(
|
||||
["which", "python"], env=env, capture_output=True
|
||||
).strip()
|
||||
@@ -180,18 +180,38 @@ def build(options: BuildOptions) -> None:
|
||||
docker.call(["rm", "-rf", built_wheel_dir])
|
||||
docker.call(["mkdir", "-p", built_wheel_dir])
|
||||
|
||||
docker.call(
|
||||
[
|
||||
"pip",
|
||||
"wheel",
|
||||
container_package_dir,
|
||||
"--wheel-dir",
|
||||
built_wheel_dir,
|
||||
"--no-deps",
|
||||
*get_build_verbosity_extra_flags(options.build_verbosity),
|
||||
],
|
||||
env=env,
|
||||
)
|
||||
verbosity_flags = get_build_verbosity_extra_flags(options.build_verbosity)
|
||||
|
||||
if options.build_frontend == "pip":
|
||||
docker.call(
|
||||
[
|
||||
"python",
|
||||
"-m",
|
||||
"pip",
|
||||
"wheel",
|
||||
container_package_dir,
|
||||
f"--wheel-dir={built_wheel_dir}",
|
||||
"--no-deps",
|
||||
*verbosity_flags,
|
||||
],
|
||||
env=env,
|
||||
)
|
||||
elif options.build_frontend == "build":
|
||||
config_setting = " ".join(verbosity_flags)
|
||||
docker.call(
|
||||
[
|
||||
"python",
|
||||
"-m",
|
||||
"build",
|
||||
container_package_dir,
|
||||
"--wheel",
|
||||
f"--outdir={built_wheel_dir}",
|
||||
f"--config-setting={config_setting}",
|
||||
],
|
||||
env=env,
|
||||
)
|
||||
else:
|
||||
assert_never(options.build_frontend)
|
||||
|
||||
built_wheel = docker.glob(built_wheel_dir, "*.whl")[0]
|
||||
|
||||
@@ -291,8 +311,11 @@ def build(options: BuildOptions) -> None:
|
||||
|
||||
|
||||
def troubleshoot(package_dir: Path, error: Exception) -> None:
|
||||
if isinstance(error, subprocess.CalledProcessError) and error.cmd[0:2] == ["pip", "wheel"]:
|
||||
# the 'pip wheel' step failed.
|
||||
if isinstance(error, subprocess.CalledProcessError) and (
|
||||
error.cmd[0:4] == ["python", "-m", "pip", "wheel"]
|
||||
or error.cmd[0:3] == ["python", "-m", "build"]
|
||||
):
|
||||
# the wheel build step failed
|
||||
print("Checking for common errors...")
|
||||
so_files = list(package_dir.glob("**/*.so"))
|
||||
|
||||
|
||||
+78
-28
@@ -12,13 +12,15 @@ from typing import Any, Dict, List, NamedTuple, Optional, Sequence, Set, Tuple,
|
||||
from .architecture import Architecture
|
||||
from .environment import ParsedEnvironment
|
||||
from .logger import log
|
||||
from .typing import Literal, PathOrStr
|
||||
from .typing import Literal, PathOrStr, assert_never
|
||||
from .util import (
|
||||
BuildFrontend,
|
||||
BuildOptions,
|
||||
BuildSelector,
|
||||
NonPlatformWheelError,
|
||||
download,
|
||||
get_build_verbosity_extra_flags,
|
||||
get_pip_version,
|
||||
install_certifi_script,
|
||||
prepare_command,
|
||||
read_python_configs,
|
||||
@@ -178,7 +180,9 @@ def setup_python(
|
||||
python_configuration: PythonConfiguration,
|
||||
dependency_constraint_flags: Sequence[PathOrStr],
|
||||
environment: ParsedEnvironment,
|
||||
build_frontend: BuildFrontend,
|
||||
) -> Dict[str, str]:
|
||||
|
||||
implementation_id = python_configuration.identifier.split("-")[0]
|
||||
log.step(f"Installing Python {implementation_id}...")
|
||||
|
||||
@@ -308,18 +312,33 @@ def setup_python(
|
||||
env.setdefault("SDKROOT", arm64_compatible_sdks[0])
|
||||
|
||||
log.step("Installing build tools...")
|
||||
call(
|
||||
[
|
||||
"pip",
|
||||
"install",
|
||||
"--upgrade",
|
||||
"setuptools",
|
||||
"wheel",
|
||||
"delocate",
|
||||
*dependency_constraint_flags,
|
||||
],
|
||||
env=env,
|
||||
)
|
||||
if build_frontend == "pip":
|
||||
call(
|
||||
[
|
||||
"pip",
|
||||
"install",
|
||||
"--upgrade",
|
||||
"setuptools",
|
||||
"wheel",
|
||||
"delocate",
|
||||
*dependency_constraint_flags,
|
||||
],
|
||||
env=env,
|
||||
)
|
||||
elif build_frontend == "build":
|
||||
call(
|
||||
[
|
||||
"pip",
|
||||
"install",
|
||||
"--upgrade",
|
||||
"delocate",
|
||||
"build[virtualenv]",
|
||||
*dependency_constraint_flags,
|
||||
],
|
||||
env=env,
|
||||
)
|
||||
else:
|
||||
assert_never(build_frontend)
|
||||
|
||||
return env
|
||||
|
||||
@@ -356,7 +375,12 @@ def build(options: BuildOptions) -> None:
|
||||
options.dependency_constraints.get_for_python_version(config.version),
|
||||
]
|
||||
|
||||
env = setup_python(config, dependency_constraint_flags, options.environment)
|
||||
env = setup_python(
|
||||
config,
|
||||
dependency_constraint_flags,
|
||||
options.environment,
|
||||
options.build_frontend,
|
||||
)
|
||||
|
||||
if options.before_build:
|
||||
log.step("Running before_build...")
|
||||
@@ -370,20 +394,46 @@ def build(options: BuildOptions) -> None:
|
||||
shutil.rmtree(built_wheel_dir)
|
||||
built_wheel_dir.mkdir(parents=True)
|
||||
|
||||
# Path.resolve() is needed. Without it pip wheel may try to fetch package from pypi.org
|
||||
# see https://github.com/pypa/cibuildwheel/pull/369
|
||||
call(
|
||||
[
|
||||
"pip",
|
||||
"wheel",
|
||||
options.package_dir.resolve(),
|
||||
"--wheel-dir",
|
||||
built_wheel_dir,
|
||||
"--no-deps",
|
||||
*get_build_verbosity_extra_flags(options.build_verbosity),
|
||||
],
|
||||
env=env,
|
||||
)
|
||||
verbosity_flags = get_build_verbosity_extra_flags(options.build_verbosity)
|
||||
|
||||
if options.build_frontend == "pip":
|
||||
# Path.resolve() is needed. Without it pip wheel may try to fetch package from pypi.org
|
||||
# see https://github.com/pypa/cibuildwheel/pull/369
|
||||
call(
|
||||
[
|
||||
"python",
|
||||
"-m",
|
||||
"pip",
|
||||
"wheel",
|
||||
options.package_dir.resolve(),
|
||||
f"--wheel-dir={built_wheel_dir}",
|
||||
"--no-deps",
|
||||
*verbosity_flags,
|
||||
],
|
||||
env=env,
|
||||
)
|
||||
elif options.build_frontend == "build":
|
||||
config_setting = " ".join(verbosity_flags)
|
||||
build_env = env.copy()
|
||||
if options.dependency_constraints:
|
||||
build_env["PIP_CONSTRAINT"] = str(
|
||||
options.dependency_constraints.get_for_python_version(config.version)
|
||||
)
|
||||
build_env["VIRTUALENV_PIP"] = get_pip_version(env)
|
||||
call(
|
||||
[
|
||||
"python",
|
||||
"-m",
|
||||
"build",
|
||||
options.package_dir,
|
||||
"--wheel",
|
||||
f"--outdir={built_wheel_dir}",
|
||||
f"--config-setting={config_setting}",
|
||||
],
|
||||
env=build_env,
|
||||
)
|
||||
else:
|
||||
assert_never(options.build_frontend)
|
||||
|
||||
built_wheel = next(built_wheel_dir.glob("*.whl"))
|
||||
|
||||
|
||||
@@ -0,0 +1,171 @@
|
||||
import os
|
||||
from pathlib import Path
|
||||
from typing import Any, Dict, List, Mapping, Optional, Set, Tuple, Union
|
||||
|
||||
import toml
|
||||
|
||||
from .typing import PLATFORMS, TypedDict
|
||||
from .util import resources_dir
|
||||
|
||||
Setting = Union[Dict[str, str], List[str], str]
|
||||
|
||||
|
||||
class TableFmt(TypedDict):
|
||||
item: str
|
||||
sep: str
|
||||
|
||||
|
||||
class ConfigOptionError(KeyError):
|
||||
pass
|
||||
|
||||
|
||||
def _dig_first(*pairs: Tuple[Mapping[str, Any], str]) -> Setting:
|
||||
"""
|
||||
Return the first dict item that matches from pairs of dicts and keys.
|
||||
Final result is will throw a KeyError if missing.
|
||||
|
||||
_dig_first((dict1, "key1"), (dict2, "key2"), ...)
|
||||
"""
|
||||
(dict_like, key), *others = pairs
|
||||
return dict_like.get(key, _dig_first(*others)) if others else dict_like[key]
|
||||
|
||||
|
||||
class ConfigOptions:
|
||||
"""
|
||||
Gets options from the environment, config or defaults, optionally scoped
|
||||
by the platform.
|
||||
|
||||
Example:
|
||||
>>> options = ConfigOptions(package_dir, platform='macos')
|
||||
>>> options('cool-color')
|
||||
|
||||
This will return the value of CIBW_COOL_COLOR_MACOS if it exists,
|
||||
otherwise the value of CIBW_COOL_COLOR, otherwise
|
||||
'tool.cibuildwheel.macos.cool-color' or 'tool.cibuildwheel.cool-color'
|
||||
from pyproject.toml, or from cibuildwheel/resources/defaults.toml. An
|
||||
error is thrown if there are any unexpected keys or sections in
|
||||
tool.cibuildwheel.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
package_path: Path,
|
||||
config_file: Optional[str] = None,
|
||||
*,
|
||||
platform: str,
|
||||
disallow: Optional[Dict[str, Set[str]]] = None,
|
||||
) -> None:
|
||||
self.platform = platform
|
||||
self.disallow = disallow or {}
|
||||
|
||||
# Open defaults.toml, loading both global and platform sections
|
||||
defaults_path = resources_dir / "defaults.toml"
|
||||
self.default_options, self.default_platform_options = self._load_file(defaults_path)
|
||||
|
||||
# load the project config file
|
||||
config_options: Dict[str, Any] = {}
|
||||
config_platform_options: Dict[str, Any] = {}
|
||||
|
||||
if config_file is not None:
|
||||
config_path = Path(config_file.format(package=package_path))
|
||||
config_options, config_platform_options = self._load_file(config_path)
|
||||
else:
|
||||
# load pyproject.toml, if it's available
|
||||
pyproject_toml_path = package_path / "pyproject.toml"
|
||||
if pyproject_toml_path.exists():
|
||||
config_options, config_platform_options = self._load_file(pyproject_toml_path)
|
||||
|
||||
# validate project config
|
||||
for option_name in config_options:
|
||||
if not self._is_valid_global_option(option_name):
|
||||
raise ConfigOptionError(f'Option "{option_name}" not supported in a config file')
|
||||
|
||||
for option_name in config_platform_options:
|
||||
if not self._is_valid_platform_option(option_name):
|
||||
raise ConfigOptionError(
|
||||
f'Option "{option_name}" not supported in the "{self.platform}" section'
|
||||
)
|
||||
|
||||
self.config_options = config_options
|
||||
self.config_platform_options = config_platform_options
|
||||
|
||||
def _is_valid_global_option(self, name: str) -> bool:
|
||||
"""
|
||||
Returns True if an option with this name is allowed in the
|
||||
[tool.cibuildwheel] section of a config file.
|
||||
"""
|
||||
allowed_option_names = self.default_options.keys() | PLATFORMS
|
||||
|
||||
return name in allowed_option_names
|
||||
|
||||
def _is_valid_platform_option(self, name: str) -> bool:
|
||||
"""
|
||||
Returns True if an option with this name is allowed in the
|
||||
[tool.cibuildwheel.<current-platform>] section of a config file.
|
||||
"""
|
||||
disallowed_platform_options = self.disallow.get(self.platform, set())
|
||||
if name in disallowed_platform_options:
|
||||
return False
|
||||
|
||||
allowed_option_names = self.default_options.keys() | self.default_platform_options.keys()
|
||||
|
||||
return name in allowed_option_names
|
||||
|
||||
def _load_file(self, filename: Path) -> Tuple[Dict[str, Any], Dict[str, Any]]:
|
||||
"""
|
||||
Load a toml file, returns global and platform as separate dicts.
|
||||
"""
|
||||
config = toml.load(filename)
|
||||
|
||||
global_options = config.get("tool", {}).get("cibuildwheel", {})
|
||||
platform_options = global_options.get(self.platform, {})
|
||||
|
||||
return global_options, platform_options
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
name: str,
|
||||
*,
|
||||
env_plat: bool = True,
|
||||
sep: Optional[str] = None,
|
||||
table: Optional[TableFmt] = None,
|
||||
) -> str:
|
||||
"""
|
||||
Get and return the value for the named option from environment,
|
||||
configuration file, or the default. If env_plat is False, then don't
|
||||
accept platform versions of the environment variable. If this is an
|
||||
array it will be merged with "sep" before returning. If it is a table,
|
||||
it will be formatted with "table['item']" using {k} and {v} and merged
|
||||
with "table['sep']".
|
||||
"""
|
||||
|
||||
if name not in self.default_options and name not in self.default_platform_options:
|
||||
raise ConfigOptionError(f"{name} must be in cibuildwheel/resources/defaults.toml file")
|
||||
|
||||
# Environment variable form
|
||||
envvar = f"CIBW_{name.upper().replace('-', '_')}"
|
||||
plat_envvar = f"{envvar}_{self.platform.upper()}"
|
||||
|
||||
# get the option from the environment, then the config file, then finally the default.
|
||||
# platform-specific options are preferred, if they're allowed.
|
||||
result = _dig_first(
|
||||
(os.environ if env_plat else {}, plat_envvar), # type: ignore
|
||||
(os.environ, envvar),
|
||||
(self.config_platform_options, name),
|
||||
(self.config_options, name),
|
||||
(self.default_platform_options, name),
|
||||
(self.default_options, name),
|
||||
)
|
||||
|
||||
if isinstance(result, dict):
|
||||
if table is None:
|
||||
raise ConfigOptionError(f"{name} does not accept a table")
|
||||
return table["sep"].join(table["item"].format(k=k, v=v) for k, v in result.items())
|
||||
elif isinstance(result, list):
|
||||
if sep is None:
|
||||
raise ConfigOptionError(f"{name} does not accept a list")
|
||||
return sep.join(result)
|
||||
elif isinstance(result, int):
|
||||
return str(result)
|
||||
else:
|
||||
return result
|
||||
@@ -40,9 +40,9 @@ python_configurations = [
|
||||
{ identifier = "cp39-macosx_x86_64", version = "3.9", url = "https://www.python.org/ftp/python/3.9.5/python-3.9.5-macos11.pkg" },
|
||||
{ identifier = "cp39-macosx_arm64", version = "3.9", url = "https://www.python.org/ftp/python/3.9.5/python-3.9.5-macos11.pkg" },
|
||||
{ identifier = "cp39-macosx_universal2", version = "3.9", url = "https://www.python.org/ftp/python/3.9.5/python-3.9.5-macos11.pkg" },
|
||||
{ identifier = "cp310-macosx_x86_64", version = "3.10", url = "https://www.python.org/ftp/python/3.10.0/python-3.10.0b1-macos11.pkg" },
|
||||
{ identifier = "cp310-macosx_arm64", version = "3.10", url = "https://www.python.org/ftp/python/3.10.0/python-3.10.0b1-macos11.pkg" },
|
||||
{ identifier = "cp310-macosx_universal2", version = "3.10", url = "https://www.python.org/ftp/python/3.10.0/python-3.10.0b1-macos11.pkg" },
|
||||
{ identifier = "cp310-macosx_x86_64", version = "3.10", url = "https://www.python.org/ftp/python/3.10.0/python-3.10.0b3-macos11.pkg" },
|
||||
{ identifier = "cp310-macosx_arm64", version = "3.10", url = "https://www.python.org/ftp/python/3.10.0/python-3.10.0b3-macos11.pkg" },
|
||||
{ identifier = "cp310-macosx_universal2", version = "3.10", url = "https://www.python.org/ftp/python/3.10.0/python-3.10.0b3-macos11.pkg" },
|
||||
{ identifier = "pp37-macosx_x86_64", version = "3.7", url = "https://downloads.python.org/pypy/pypy3.7-v7.3.5-osx64.tar.bz2" },
|
||||
]
|
||||
|
||||
@@ -56,7 +56,7 @@ python_configurations = [
|
||||
{ identifier = "cp38-win_amd64", version = "3.8.10", arch = "64" },
|
||||
{ identifier = "cp39-win32", version = "3.9.5", arch = "32" },
|
||||
{ identifier = "cp39-win_amd64", version = "3.9.5", arch = "64" },
|
||||
{ identifier = "cp310-win32", version = "3.10.0-b1", arch = "32" },
|
||||
{ identifier = "cp310-win_amd64", version = "3.10.0-b1", arch = "64" },
|
||||
{ identifier = "cp310-win32", version = "3.10.0-b3", arch = "32" },
|
||||
{ identifier = "cp310-win_amd64", version = "3.10.0-b3", arch = "64" },
|
||||
{ identifier = "pp37-win_amd64", version = "3.7", arch = "64", url = "https://downloads.python.org/pypy/pypy3.7-v7.3.5-win64.zip" },
|
||||
]
|
||||
|
||||
@@ -8,19 +8,19 @@ appdirs==1.4.4
|
||||
# via virtualenv
|
||||
delocate==0.8.2
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
distlib==0.3.1
|
||||
distlib==0.3.2
|
||||
# via virtualenv
|
||||
filelock==3.0.12
|
||||
# via virtualenv
|
||||
importlib-metadata==4.0.1
|
||||
importlib-metadata==4.5.0
|
||||
# via virtualenv
|
||||
importlib-resources==5.1.3
|
||||
importlib-resources==5.1.4
|
||||
# via virtualenv
|
||||
six==1.16.0
|
||||
# via virtualenv
|
||||
typing-extensions==3.10.0.0
|
||||
# via importlib-metadata
|
||||
virtualenv==20.4.6
|
||||
virtualenv==20.4.7
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
wheel==0.36.2
|
||||
# via
|
||||
@@ -32,7 +32,7 @@ zipp==3.4.1
|
||||
# importlib-resources
|
||||
|
||||
# The following packages are considered to be unsafe in a requirements file:
|
||||
pip==21.1.1
|
||||
pip==21.1.2
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
setuptools==56.2.0
|
||||
setuptools==57.0.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
|
||||
@@ -8,17 +8,17 @@ appdirs==1.4.4
|
||||
# via virtualenv
|
||||
delocate==0.8.2
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
distlib==0.3.1
|
||||
distlib==0.3.2
|
||||
# via virtualenv
|
||||
filelock==3.0.12
|
||||
# via virtualenv
|
||||
importlib-metadata==4.0.1
|
||||
importlib-metadata==4.5.0
|
||||
# via virtualenv
|
||||
six==1.16.0
|
||||
# via virtualenv
|
||||
typing-extensions==3.10.0.0
|
||||
# via importlib-metadata
|
||||
virtualenv==20.4.6
|
||||
virtualenv==20.4.7
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
wheel==0.36.2
|
||||
# via
|
||||
@@ -28,7 +28,7 @@ zipp==3.4.1
|
||||
# via importlib-metadata
|
||||
|
||||
# The following packages are considered to be unsafe in a requirements file:
|
||||
pip==21.1.1
|
||||
pip==21.1.2
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
setuptools==56.2.0
|
||||
setuptools==57.0.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
|
||||
@@ -8,13 +8,13 @@ appdirs==1.4.4
|
||||
# via virtualenv
|
||||
delocate==0.8.2
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
distlib==0.3.1
|
||||
distlib==0.3.2
|
||||
# via virtualenv
|
||||
filelock==3.0.12
|
||||
# via virtualenv
|
||||
six==1.16.0
|
||||
# via virtualenv
|
||||
virtualenv==20.4.6
|
||||
virtualenv==20.4.7
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
wheel==0.36.2
|
||||
# via
|
||||
@@ -22,7 +22,7 @@ wheel==0.36.2
|
||||
# delocate
|
||||
|
||||
# The following packages are considered to be unsafe in a requirements file:
|
||||
pip==21.1.1
|
||||
pip==21.1.2
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
setuptools==56.2.0
|
||||
setuptools==57.0.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
|
||||
@@ -8,13 +8,13 @@ appdirs==1.4.4
|
||||
# via virtualenv
|
||||
delocate==0.8.2
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
distlib==0.3.1
|
||||
distlib==0.3.2
|
||||
# via virtualenv
|
||||
filelock==3.0.12
|
||||
# via virtualenv
|
||||
six==1.16.0
|
||||
# via virtualenv
|
||||
virtualenv==20.4.6
|
||||
virtualenv==20.4.7
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
wheel==0.36.2
|
||||
# via
|
||||
@@ -22,7 +22,7 @@ wheel==0.36.2
|
||||
# delocate
|
||||
|
||||
# The following packages are considered to be unsafe in a requirements file:
|
||||
pip==21.1.1
|
||||
pip==21.1.2
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
setuptools==56.2.0
|
||||
setuptools==57.0.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
|
||||
@@ -8,13 +8,13 @@ appdirs==1.4.4
|
||||
# via virtualenv
|
||||
delocate==0.8.2
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
distlib==0.3.1
|
||||
distlib==0.3.2
|
||||
# via virtualenv
|
||||
filelock==3.0.12
|
||||
# via virtualenv
|
||||
six==1.16.0
|
||||
# via virtualenv
|
||||
virtualenv==20.4.6
|
||||
virtualenv==20.4.7
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
wheel==0.36.2
|
||||
# via
|
||||
@@ -22,7 +22,7 @@ wheel==0.36.2
|
||||
# delocate
|
||||
|
||||
# The following packages are considered to be unsafe in a requirements file:
|
||||
pip==21.1.1
|
||||
pip==21.1.2
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
setuptools==56.2.0
|
||||
setuptools==57.0.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
[tool.cibuildwheel]
|
||||
build = "*"
|
||||
skip = ""
|
||||
test-skip = ""
|
||||
|
||||
archs = ["auto"]
|
||||
build-frontend = "pip"
|
||||
dependency-versions = "pinned"
|
||||
environment = {}
|
||||
build-verbosity = ""
|
||||
|
||||
before-all = ""
|
||||
before-build = ""
|
||||
repair-wheel-command = ""
|
||||
|
||||
test-command = ""
|
||||
before-test = ""
|
||||
test-requires = []
|
||||
test-extras = []
|
||||
|
||||
manylinux-x86_64-image = "manylinux2010"
|
||||
manylinux-i686-image = "manylinux2010"
|
||||
manylinux-aarch64-image = "manylinux2014"
|
||||
manylinux-ppc64le-image = "manylinux2014"
|
||||
manylinux-s390x-image = "manylinux2014"
|
||||
manylinux-pypy_x86_64-image = "manylinux2010"
|
||||
manylinux-pypy_i686-image = "manylinux2010"
|
||||
manylinux-pypy_aarch64-image = "manylinux2014"
|
||||
|
||||
|
||||
[tool.cibuildwheel.linux]
|
||||
repair-wheel-command = "auditwheel repair -w {dest_dir} {wheel}"
|
||||
|
||||
[tool.cibuildwheel.macos]
|
||||
repair-wheel-command = [
|
||||
"delocate-listdeps {wheel}",
|
||||
"delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}",
|
||||
]
|
||||
|
||||
[tool.cibuildwheel.windows]
|
||||
@@ -1,38 +1,38 @@
|
||||
[x86_64]
|
||||
manylinux1 = quay.io/pypa/manylinux1_x86_64:2021-05-24-df68af6
|
||||
manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2021-05-24-84874a2
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2021-05-24-84874a2
|
||||
manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2021-05-24-84874a2
|
||||
manylinux1 = quay.io/pypa/manylinux1_x86_64:2021-05-31-f12b4c4
|
||||
manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2021-06-07-00faba2
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2021-06-07-00faba2
|
||||
manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2021-06-07-00faba2
|
||||
|
||||
[i686]
|
||||
manylinux1 = quay.io/pypa/manylinux1_i686:2021-05-24-df68af6
|
||||
manylinux2010 = quay.io/pypa/manylinux2010_i686:2021-05-24-84874a2
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_i686:2021-05-24-84874a2
|
||||
manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2021-05-24-84874a2
|
||||
manylinux1 = quay.io/pypa/manylinux1_i686:2021-05-31-f12b4c4
|
||||
manylinux2010 = quay.io/pypa/manylinux2010_i686:2021-06-07-00faba2
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_i686:2021-06-07-00faba2
|
||||
manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2021-06-07-00faba2
|
||||
|
||||
[pypy_x86_64]
|
||||
manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2021-05-24-84874a2
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2021-05-24-84874a2
|
||||
manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2021-05-24-84874a2
|
||||
manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2021-06-07-00faba2
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2021-06-07-00faba2
|
||||
manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2021-06-07-00faba2
|
||||
|
||||
[pypy_i686]
|
||||
manylinux2010 = quay.io/pypa/manylinux2010_i686:2021-05-24-84874a2
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_i686:2021-05-24-84874a2
|
||||
manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2021-05-24-84874a2
|
||||
manylinux2010 = quay.io/pypa/manylinux2010_i686:2021-06-07-00faba2
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_i686:2021-06-07-00faba2
|
||||
manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2021-06-07-00faba2
|
||||
|
||||
[aarch64]
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2021-05-24-84874a2
|
||||
manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2021-05-24-84874a2
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2021-06-07-00faba2
|
||||
manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2021-06-07-00faba2
|
||||
|
||||
[ppc64le]
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2021-05-24-84874a2
|
||||
manylinux_2_24 = quay.io/pypa/manylinux_2_24_ppc64le:2021-05-24-84874a2
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2021-06-07-00faba2
|
||||
manylinux_2_24 = quay.io/pypa/manylinux_2_24_ppc64le:2021-06-07-00faba2
|
||||
|
||||
[s390x]
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_s390x:2021-05-24-84874a2
|
||||
manylinux_2_24 = quay.io/pypa/manylinux_2_24_s390x:2021-05-24-84874a2
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_s390x:2021-06-07-00faba2
|
||||
manylinux_2_24 = quay.io/pypa/manylinux_2_24_s390x:2021-06-07-00faba2
|
||||
|
||||
[pypy_aarch64]
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2021-05-24-84874a2
|
||||
manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2021-05-24-84874a2
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2021-06-07-00faba2
|
||||
manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2021-06-07-00faba2
|
||||
|
||||
|
||||
+21
-1
@@ -4,6 +4,8 @@ import itertools
|
||||
import os
|
||||
import re
|
||||
import ssl
|
||||
import subprocess
|
||||
import sys
|
||||
import textwrap
|
||||
import time
|
||||
import urllib.request
|
||||
@@ -20,12 +22,14 @@ from packaging.version import Version
|
||||
|
||||
from .architecture import Architecture
|
||||
from .environment import ParsedEnvironment
|
||||
from .typing import PathOrStr, PlatformName
|
||||
from .typing import Literal, PathOrStr, PlatformName
|
||||
|
||||
resources_dir = Path(__file__).parent / "resources"
|
||||
|
||||
install_certifi_script = resources_dir / "install_certifi.py"
|
||||
|
||||
BuildFrontend = Literal["pip", "build"]
|
||||
|
||||
|
||||
def prepare_command(command: str, **kwargs: PathOrStr) -> str:
|
||||
"""
|
||||
@@ -218,6 +222,7 @@ class BuildOptions(NamedTuple):
|
||||
test_requires: List[str]
|
||||
test_extras: str
|
||||
build_verbosity: int
|
||||
build_frontend: BuildFrontend
|
||||
|
||||
|
||||
class NonPlatformWheelError(Exception):
|
||||
@@ -300,3 +305,18 @@ def print_new_wheels(msg: str, output_dir: Path) -> Iterator[None]:
|
||||
s = time.time() - start_time
|
||||
m = s / 60
|
||||
print(msg.format(n=n, s=s, m=m), *sorted(f" {f.name}" for f in new_contents), sep="\n")
|
||||
|
||||
|
||||
def get_pip_version(env: Dict[str, str]) -> str:
|
||||
# we use shell=True here for windows, even though we don't need a shell due to a bug
|
||||
# https://bugs.python.org/issue8557
|
||||
shell = sys.platform.startswith("win")
|
||||
versions_output_text = subprocess.check_output(
|
||||
["python", "-m", "pip", "freeze", "--all"], universal_newlines=True, shell=shell, env=env
|
||||
)
|
||||
(pip_version,) = (
|
||||
version[5:]
|
||||
for version in versions_output_text.strip().splitlines()
|
||||
if version.startswith("pip==")
|
||||
)
|
||||
return pip_version
|
||||
|
||||
+72
-20
@@ -10,13 +10,15 @@ from zipfile import ZipFile
|
||||
from .architecture import Architecture
|
||||
from .environment import ParsedEnvironment
|
||||
from .logger import log
|
||||
from .typing import PathOrStr
|
||||
from .typing import PathOrStr, assert_never
|
||||
from .util import (
|
||||
BuildFrontend,
|
||||
BuildOptions,
|
||||
BuildSelector,
|
||||
NonPlatformWheelError,
|
||||
download,
|
||||
get_build_verbosity_extra_flags,
|
||||
get_pip_version,
|
||||
prepare_command,
|
||||
read_python_configs,
|
||||
)
|
||||
@@ -114,7 +116,9 @@ def setup_python(
|
||||
python_configuration: PythonConfiguration,
|
||||
dependency_constraint_flags: Sequence[PathOrStr],
|
||||
environment: ParsedEnvironment,
|
||||
build_frontend: BuildFrontend,
|
||||
) -> Dict[str, str]:
|
||||
|
||||
nuget = Path("C:\\cibw\\nuget.exe")
|
||||
if not nuget.exists():
|
||||
log.step("Downloading nuget...")
|
||||
@@ -214,10 +218,26 @@ def setup_python(
|
||||
sys.exit(1)
|
||||
|
||||
call(["pip", "--version"], env=env)
|
||||
call(
|
||||
["pip", "install", "--upgrade", "setuptools", "wheel", *dependency_constraint_flags],
|
||||
env=env,
|
||||
)
|
||||
|
||||
if build_frontend == "pip":
|
||||
call(
|
||||
[
|
||||
"pip",
|
||||
"install",
|
||||
"--upgrade",
|
||||
"setuptools",
|
||||
"wheel",
|
||||
*dependency_constraint_flags,
|
||||
],
|
||||
env=env,
|
||||
)
|
||||
elif build_frontend == "build":
|
||||
call(
|
||||
["pip", "install", "--upgrade", "build[virtualenv]", *dependency_constraint_flags],
|
||||
env=env,
|
||||
)
|
||||
else:
|
||||
assert_never(build_frontend)
|
||||
|
||||
return env
|
||||
|
||||
@@ -251,7 +271,12 @@ def build(options: BuildOptions) -> None:
|
||||
]
|
||||
|
||||
# install Python
|
||||
env = setup_python(config, dependency_constraint_flags, options.environment)
|
||||
env = setup_python(
|
||||
config,
|
||||
dependency_constraint_flags,
|
||||
options.environment,
|
||||
options.build_frontend,
|
||||
)
|
||||
|
||||
# run the before_build command
|
||||
if options.before_build:
|
||||
@@ -265,20 +290,47 @@ def build(options: BuildOptions) -> None:
|
||||
if built_wheel_dir.exists():
|
||||
shutil.rmtree(built_wheel_dir)
|
||||
built_wheel_dir.mkdir(parents=True)
|
||||
# Path.resolve() is needed. Without it pip wheel may try to fetch package from pypi.org
|
||||
# see https://github.com/pypa/cibuildwheel/pull/369
|
||||
call(
|
||||
[
|
||||
"pip",
|
||||
"wheel",
|
||||
options.package_dir.resolve(),
|
||||
"-w",
|
||||
built_wheel_dir,
|
||||
"--no-deps",
|
||||
*get_build_verbosity_extra_flags(options.build_verbosity),
|
||||
],
|
||||
env=env,
|
||||
)
|
||||
|
||||
verbosity_flags = get_build_verbosity_extra_flags(options.build_verbosity)
|
||||
|
||||
if options.build_frontend == "pip":
|
||||
# Path.resolve() is needed. Without it pip wheel may try to fetch package from pypi.org
|
||||
# see https://github.com/pypa/cibuildwheel/pull/369
|
||||
call(
|
||||
[
|
||||
"python",
|
||||
"-m",
|
||||
"pip",
|
||||
"wheel",
|
||||
options.package_dir.resolve(),
|
||||
f"--wheel-dir={built_wheel_dir}",
|
||||
"--no-deps",
|
||||
*get_build_verbosity_extra_flags(options.build_verbosity),
|
||||
],
|
||||
env=env,
|
||||
)
|
||||
elif options.build_frontend == "build":
|
||||
config_setting = " ".join(verbosity_flags)
|
||||
build_env = env.copy()
|
||||
if options.dependency_constraints:
|
||||
build_env["PIP_CONSTRAINT"] = str(
|
||||
options.dependency_constraints.get_for_python_version(config.version)
|
||||
)
|
||||
build_env["VIRTUALENV_PIP"] = get_pip_version(env)
|
||||
call(
|
||||
[
|
||||
"python",
|
||||
"-m",
|
||||
"build",
|
||||
options.package_dir,
|
||||
"--wheel",
|
||||
f"--outdir={built_wheel_dir}",
|
||||
f"--config-setting={config_setting}",
|
||||
],
|
||||
env=build_env,
|
||||
)
|
||||
else:
|
||||
assert_never(options.build_frontend)
|
||||
|
||||
built_wheel = next(built_wheel_dir.glob("*.whl"))
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" role="img" viewBox="0 0 24 24" width="16px" fill="#606060"><title>Azure Pipelines icon</title><path d="M1.8 18H0v6h6v-1.8H1.8zM23 0h-8.93a2 2 0 0 0-1.67.89L9 5.99H1a1 1 0 0 0-1 1v5.5l3.5 3.61 1.2-1.29 1.5 1.5L5 17.53l1.48 1.48 1.22-1.22 1.5 1.51L8 20.5l3.5 3.5H17a1 1 0 0 0 1-1v-8l5.11-3.4A2 2 0 0 0 24 9.92V1a1 1 0 0 0-1-1zm-5 9a3 3 0 1 1 0-6 3 3 0 0 1 0 6z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" role="img" viewBox="0 0 24 24" width="16px" fill="#606060"><title>Azure Pipelines icon</title><path d="M1.7997 22.1998h4.2001V24H.0004v-6.0002h1.7993v4.2zM12.6229 9.8975l-7.6353 7.6353 1.4792 1.4792 7.6345-7.6362-1.4784-1.4783zM4.365 15.1793l-.391-.3908c-.5042-.5042-.5828-1.3004-.1869-1.8934l4.6036-6.8958H.9979c-.5513.0014-.9975.4487-.9975 1v5.5002l3.5021 3.6036.8625-.9238zM23.9996.9999v8.9306a2 2 0 0 1-.8893 1.6632l-12.2834 8.2005a.9999.9999 0 0 1-1.2622-.1246L8.04 18.1457c.3313-.3313 6.4656-6.4672 6.7684-6.7698l-2.1855-2.1855L5.8533 15.96l-1.5258-1.525a1.0001 1.0001 0 0 1-.1246-1.2623L12.4034.8893A2 2 0 0 1 14.0666 0h8.9331c.5522 0 .9999.4477.9999.9999zm-2.9997 5.0003c0-1.6567-1.343-2.9997-2.9997-2.9997s-2.9997 1.343-2.9997 2.9997 1.343 2.9997 2.9997 2.9997 2.9997-1.343 2.9997-2.9997zM10.272 20.4625c-.4008 0-.7776-.156-1.0609-.4392l-.368-.3679-.8435.8417 3.4996 3.4996h5.5003c.5522 0 .9999-.4477.9999-.9999v-7.3899L11.1045 20.21a1.4944 1.4944 0 0 1-.8325.2525z"/></svg>
|
||||
|
Before Width: | Height: | Size: 407 B After Width: | Height: | Size: 1023 B |
+73
-8
@@ -1,6 +1,10 @@
|
||||
|
||||
/* Global styles */
|
||||
|
||||
body {
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-bottom: 12px;
|
||||
line-height: 26px;
|
||||
@@ -20,9 +24,9 @@ code, pre, tt {
|
||||
font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
|
||||
}
|
||||
|
||||
.hljs {
|
||||
padding: 1em;
|
||||
background-color: #f6f8fa;
|
||||
pre code, pre code.hljs {
|
||||
padding: 1em;
|
||||
background-color: #f6f8fa;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
@@ -112,7 +116,21 @@ h1, h2, h3, h4, h5, h6 {
|
||||
background-color: white;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
border-bottom: 2px solid #ccc;
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
position: relative;
|
||||
}
|
||||
.tabs-header::before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 2px;
|
||||
background: #ccc;
|
||||
}
|
||||
.tabs-header > * {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* Style the buttons that are used to open the tab content */
|
||||
@@ -126,15 +144,13 @@ h1, h2, h3, h4, h5, h6 {
|
||||
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;
|
||||
border-bottom: 2px solid #ccc;
|
||||
}
|
||||
|
||||
.tabs-header button:focus-visible {
|
||||
/* preserve an outline for accesibility purposes */
|
||||
outline: 1px solid currentColor;
|
||||
outline-offset: -1px;
|
||||
}
|
||||
|
||||
/* Change background color of buttons on hover */
|
||||
@@ -153,4 +169,53 @@ h1, h2, h3, h4, h5, h6 {
|
||||
background-color: #f1f6fa;
|
||||
padding: 1px 1em;
|
||||
padding-top: 0.8em;
|
||||
|
||||
/* don't collapse inner margins */
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
/* Examples tabs styling */
|
||||
|
||||
.tabs.examples .tabs-header {
|
||||
justify-content: flex-end;
|
||||
background-color: transparent;
|
||||
border-bottom-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
.tabs.examples .tabs-header::before {
|
||||
height: 0;
|
||||
}
|
||||
.tabs.examples .tabs-header button {
|
||||
padding: 6px 12px;
|
||||
border-bottom: none;
|
||||
color: rgba(0, 0, 0, 0.3);
|
||||
font-size: 0.8em;
|
||||
border-top-left-radius: 4px;
|
||||
border-top-right-radius: 4px;
|
||||
}
|
||||
.tabs-header button:hover {
|
||||
background-color: unset;
|
||||
}
|
||||
|
||||
.tabs.examples .tabs-header button.active {
|
||||
border-bottom-style: none;
|
||||
background: #f6f8fa;
|
||||
color: inherit;
|
||||
}
|
||||
.tabs.examples .tabs-content {
|
||||
padding: 0;
|
||||
background-color: transparent;
|
||||
background-color: #f6f8fa;
|
||||
}
|
||||
.tabs.examples .tabs-content .tab > * {
|
||||
padding-left: 0.8em;
|
||||
padding-right: 0.8em;
|
||||
}
|
||||
.tabs.examples .tabs-content .tab > pre {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
.tabs.examples pre:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
@@ -20,6 +20,17 @@ while (true) {
|
||||
tabContainer.insertBefore(firstTab);
|
||||
tabContainer.append(headerContainer, contentContainer)
|
||||
|
||||
// add extra classes from the first tab to the container
|
||||
const classes = Array.from(firstTab[0].classList)
|
||||
|
||||
for (let i = 0; i < classes.length; i++) {
|
||||
const element = classes[i];
|
||||
if (element == 'tab' || element == 'admonition') {
|
||||
continue
|
||||
}
|
||||
tabContainer.addClass(element)
|
||||
}
|
||||
|
||||
const selectTab = function (index) {
|
||||
headerContainer.children().removeClass('active')
|
||||
headerContainer.children().eq(index).addClass('active')
|
||||
|
||||
+3
-3
@@ -84,7 +84,7 @@ by default, and require opt-in by setting `CIBW_ARCHS_MACOS`.
|
||||
!!! note
|
||||
Your runner needs Xcode Command Line Tools 12.2 or later to build `universal2` or `arm64`.
|
||||
|
||||
So far, only CPython 3.9 supports `universal2` and `arm64` wheels.
|
||||
Only CPython 3.8 and newer support `universal2` and `arm64` wheels.
|
||||
|
||||
Here's an example GitHub Actions workflow with a job that builds for Apple Silicon:
|
||||
|
||||
@@ -210,7 +210,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: pypa/cibuildwheel@v2.0.0a1
|
||||
uses: pypa/cibuildwheel@v2.0.0a4
|
||||
```
|
||||
|
||||
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.
|
||||
@@ -236,7 +236,7 @@ The second option, and the only one that supports other CI systems, is using a `
|
||||
|
||||
```bash
|
||||
# requirements-cibw.txt
|
||||
cibuildwheel==2.0.0a1
|
||||
cibuildwheel==2.0.0a4
|
||||
```
|
||||
|
||||
Then your install step would have `python -m pip install -r requirements-cibw.txt` in it. Your `dependabot.yml` file could look like this:
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
import subprocess
|
||||
from typing import Any
|
||||
|
||||
# Requires Python 3.7+
|
||||
|
||||
|
||||
def define_env(env: Any) -> None:
|
||||
"Hook function for mkdocs-macros"
|
||||
|
||||
@env.macro
|
||||
def subprocess_run(*args: str) -> str:
|
||||
"Run a subprocess and return the stdout"
|
||||
return subprocess.run(args, check=True, capture_output=True, text=True).stdout
|
||||
+591
-213
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -46,7 +46,7 @@ To build Linux, Mac, and Windows wheels using GitHub Actions, create a `.github/
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Build wheels
|
||||
run: pipx run cibuildwheel==2.0.0a1
|
||||
run: pipx run cibuildwheel==2.0.0a4
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
@@ -81,7 +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==2.0.0a1
|
||||
run: python -m pip install cibuildwheel==2.0.0a4
|
||||
|
||||
- name: Build wheels
|
||||
run: python -m cibuildwheel --output-dir wheelhouse
|
||||
|
||||
@@ -12,7 +12,7 @@ stack: python 3.7
|
||||
init:
|
||||
- cmd: set PATH=C:\Python37;C:\Python37\Scripts;%PATH%
|
||||
|
||||
install: python -m pip install cibuildwheel==2.0.0a1
|
||||
install: python -m pip install cibuildwheel==2.0.0a4
|
||||
|
||||
build_script: python -m cibuildwheel --output-dir wheelhouse
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ jobs:
|
||||
- bash: |
|
||||
set -o errexit
|
||||
python3 -m pip install --upgrade pip
|
||||
pip3 install cibuildwheel==2.0.0a1
|
||||
pip3 install cibuildwheel==2.0.0a4
|
||||
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==2.0.0a1
|
||||
python3 -m pip install cibuildwheel==2.0.0a4
|
||||
displayName: Install dependencies
|
||||
- bash: cibuildwheel --output-dir wheelhouse .
|
||||
displayName: Build wheels
|
||||
@@ -34,7 +34,7 @@ jobs:
|
||||
- bash: |
|
||||
set -o errexit
|
||||
python -m pip install --upgrade pip
|
||||
pip install cibuildwheel==2.0.0a1
|
||||
pip install cibuildwheel==2.0.0a4
|
||||
displayName: Install dependencies
|
||||
- bash: cibuildwheel --output-dir wheelhouse .
|
||||
displayName: Build wheels
|
||||
|
||||
@@ -11,7 +11,7 @@ jobs:
|
||||
- run:
|
||||
name: Build the Linux wheels.
|
||||
command: |
|
||||
pip3 install --user cibuildwheel==2.0.0a1
|
||||
pip3 install --user cibuildwheel==2.0.0a4
|
||||
cibuildwheel --output-dir wheelhouse
|
||||
- store_artifacts:
|
||||
path: wheelhouse/
|
||||
@@ -25,7 +25,7 @@ jobs:
|
||||
- run:
|
||||
name: Build the OS X wheels.
|
||||
command: |
|
||||
pip3 install cibuildwheel==2.0.0a1
|
||||
pip3 install cibuildwheel==2.0.0a4
|
||||
cibuildwheel --output-dir wheelhouse
|
||||
- store_artifacts:
|
||||
path: wheelhouse/
|
||||
|
||||
@@ -10,7 +10,7 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Build wheels
|
||||
uses: pypa/cibuildwheel@v2.0.0a1
|
||||
uses: pypa/cibuildwheel@v2.0.0a4
|
||||
env:
|
||||
CIBW_ARCHS_MACOS: x86_64 universal2
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ jobs:
|
||||
python-version: '3.8'
|
||||
|
||||
- name: Build wheels
|
||||
uses: pypa/cibuildwheel@v2.0.0a1
|
||||
uses: pypa/cibuildwheel@v2.0.0a4
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
|
||||
@@ -14,7 +14,7 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Build wheels
|
||||
uses: pypa/cibuildwheel@v2.0.0a1
|
||||
uses: pypa/cibuildwheel@v2.0.0a4
|
||||
# to supply options, put them in 'env', like:
|
||||
# env:
|
||||
# CIBW_SOME_OPTION: value
|
||||
|
||||
@@ -25,7 +25,7 @@ jobs:
|
||||
platforms: all
|
||||
|
||||
- name: Build wheels
|
||||
uses: pypa/cibuildwheel@v2.0.0a1
|
||||
uses: pypa/cibuildwheel@v2.0.0a4
|
||||
env:
|
||||
# configure cibuildwheel to build native archs ('auto'), and some
|
||||
# emulated ones
|
||||
|
||||
@@ -12,7 +12,7 @@ linux:
|
||||
DOCKER_TLS_CERTDIR: ""
|
||||
script:
|
||||
- curl -sSL https://get.docker.com/ | sh
|
||||
- python -m pip install cibuildwheel==2.0.0a1
|
||||
- python -m pip install cibuildwheel==2.0.0a4
|
||||
- cibuildwheel --output-dir wheelhouse
|
||||
artifacts:
|
||||
paths:
|
||||
|
||||
@@ -19,7 +19,7 @@ jobs:
|
||||
- ln -s /c/Python38/python.exe /c/Python38/python3.exe
|
||||
|
||||
install:
|
||||
- python3 -m pip install cibuildwheel==2.0.0a1
|
||||
- python3 -m pip install cibuildwheel==2.0.0a4
|
||||
|
||||
script:
|
||||
# build the wheels, put them into './wheelhouse'
|
||||
|
||||
@@ -25,7 +25,7 @@ jobs:
|
||||
- ln -s /c/Python38/python.exe /c/Python38/python3.exe
|
||||
|
||||
install:
|
||||
- python3 -m pip install cibuildwheel==2.0.0a1
|
||||
- python3 -m pip install cibuildwheel==2.0.0a4
|
||||
|
||||
script:
|
||||
# build the wheels, put them into './wheelhouse'
|
||||
|
||||
@@ -57,7 +57,7 @@ jobs:
|
||||
- stage: deploy
|
||||
name: Build and deploy Linux wheels
|
||||
services: docker
|
||||
install: python3 -m pip install cibuildwheel==2.0.0a1
|
||||
install: python3 -m pip install cibuildwheel==2.0.0a4
|
||||
script: python3 -m cibuildwheel --output-dir wheelhouse
|
||||
after_success: |
|
||||
python3 -m pip install twine
|
||||
@@ -67,7 +67,7 @@ jobs:
|
||||
name: Build and deploy Windows wheels
|
||||
os: windows
|
||||
language: shell
|
||||
install: python3 -m pip install cibuildwheel==2.0.0a1
|
||||
install: python3 -m pip install cibuildwheel==2.0.0a4
|
||||
script: python3 -m cibuildwheel --output-dir wheelhouse
|
||||
after_success: |
|
||||
python3 -m pip install twine
|
||||
|
||||
@@ -41,3 +41,7 @@ markdown_extensions:
|
||||
plugins:
|
||||
- include-markdown
|
||||
- search
|
||||
- macros:
|
||||
module_name: docs/main
|
||||
j2_variable_start_string: «
|
||||
j2_variable_end_string: »
|
||||
|
||||
+3
-3
@@ -48,7 +48,7 @@ def update_pins(session):
|
||||
"""
|
||||
Update the python and docker pins version inplace.
|
||||
"""
|
||||
session.install("-e", ".[dev]")
|
||||
session.install("-e", ".[bin]")
|
||||
session.run("python", "bin/update_pythons.py", "--force")
|
||||
session.run("python", "bin/update_docker.py")
|
||||
|
||||
@@ -58,8 +58,8 @@ def update_proj(session):
|
||||
"""
|
||||
Update the README inplace.
|
||||
"""
|
||||
session.install("-e", ".[dev]")
|
||||
session.run("./bin/projects.py", "docs/data/projects.yml", "--readme=README.md")
|
||||
session.install("-e", ".[bin]")
|
||||
session.run("python", "bin/projects.py", "docs/data/projects.yml", "--readme=README.md")
|
||||
|
||||
|
||||
@nox.session
|
||||
|
||||
@@ -6,6 +6,62 @@ requires = [
|
||||
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
|
||||
[tool.black]
|
||||
line-length = 100
|
||||
target-version = ['py36', 'py37', 'py38', 'py39']
|
||||
|
||||
|
||||
[tool.isort]
|
||||
profile = "black"
|
||||
multi_line_output = 3
|
||||
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
minversion = 6.0
|
||||
junit_family = "xunit2"
|
||||
testpaths = [
|
||||
"test",
|
||||
"unit_test",
|
||||
]
|
||||
|
||||
|
||||
[tool.mypy]
|
||||
python_version = 3.7
|
||||
files = [
|
||||
"cibuildwheel/*.py",
|
||||
"test/**/*.py",
|
||||
"unit_test/**/*.py",
|
||||
"bin/*.py"
|
||||
]
|
||||
warn_unused_configs = true
|
||||
warn_redundant_casts = true
|
||||
no_implicit_reexport = true
|
||||
strict_equality = true
|
||||
warn_unused_ignores = true
|
||||
check_untyped_defs = true
|
||||
|
||||
disallow_subclassing_any = true
|
||||
disallow_any_generics = true
|
||||
warn_return_any = true
|
||||
no_implicit_optional = true
|
||||
|
||||
[[tool.mypy.overrides]]
|
||||
module = "cibuildwheel.*"
|
||||
disallow_untyped_defs = true
|
||||
disallow_untyped_calls = true
|
||||
disallow_incomplete_defs = true
|
||||
disallow_untyped_decorators = true
|
||||
|
||||
[[tool.mypy.overrides]]
|
||||
module = [
|
||||
"setuptools",
|
||||
"pytest", # ignored in pre-commit to speed up check
|
||||
"bashlex",
|
||||
"toml.encoder", # encoder missing from stub package
|
||||
"bracex",
|
||||
"importlib_resources",
|
||||
"nox",
|
||||
"github",
|
||||
]
|
||||
ignore_missing_imports = true
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[metadata]
|
||||
name = cibuildwheel
|
||||
version = 2.0.0a1
|
||||
version = 2.0.0a4
|
||||
description = Build Python wheels on CI with minimal configuration.
|
||||
long_description = file: README.md
|
||||
long_description_content_type = text/markdown
|
||||
@@ -65,57 +65,3 @@ exclude =
|
||||
env??/,
|
||||
.venv/,
|
||||
site/
|
||||
|
||||
[tool:pytest]
|
||||
junit_family = xunit2
|
||||
testpaths =
|
||||
test
|
||||
unit_test
|
||||
|
||||
[mypy]
|
||||
python_version = 3.7
|
||||
files = cibuildwheel/*.py,test/**/*.py,unit_test/**/*.py,bin/*.py
|
||||
warn_unused_configs = True
|
||||
warn_redundant_casts = True
|
||||
|
||||
[mypy-test.*,mypy-unit_test.*]
|
||||
check_untyped_defs = True
|
||||
|
||||
[mypy-cibuildwheel.*]
|
||||
disallow_any_generics = True
|
||||
disallow_subclassing_any = True
|
||||
disallow_untyped_calls = True
|
||||
disallow_untyped_defs = True
|
||||
disallow_incomplete_defs = True
|
||||
check_untyped_defs = True
|
||||
disallow_untyped_decorators = True
|
||||
no_implicit_optional = True
|
||||
warn_unused_ignores = True
|
||||
warn_return_any = True
|
||||
no_implicit_reexport = True
|
||||
strict_equality = True
|
||||
|
||||
[mypy-setuptools.*]
|
||||
ignore_missing_imports = True
|
||||
|
||||
# Ignored for pre-commit to speed up check
|
||||
# Not ignored if manually running and pytest installed
|
||||
[mypy-pytest.*]
|
||||
ignore_missing_imports = True
|
||||
|
||||
[mypy-bashlex.*]
|
||||
ignore_missing_imports = True
|
||||
|
||||
# Has type stubs, but no pyproject.toml or .pyi files in the wheel.
|
||||
[mypy-toml.*]
|
||||
ignore_missing_imports = True
|
||||
|
||||
[mypy-bracex.*]
|
||||
ignore_missing_imports = True
|
||||
|
||||
[mypy-importlib_resources.*]
|
||||
ignore_missing_imports = True
|
||||
|
||||
[tool:isort]
|
||||
profile = black
|
||||
multi_line_output = 3
|
||||
|
||||
@@ -5,27 +5,42 @@ extras = {
|
||||
"mkdocs-include-markdown-plugin==2.8.0",
|
||||
"mkdocs==1.0.4",
|
||||
"pymdown-extensions",
|
||||
"mkdocs-macros-plugin",
|
||||
],
|
||||
"test": [
|
||||
"jinja2",
|
||||
"pytest>=4",
|
||||
"pytest>=6",
|
||||
"pytest-timeout",
|
||||
],
|
||||
"dev": [
|
||||
"bin": [
|
||||
"click",
|
||||
"ghapi",
|
||||
"mypy>=0.800",
|
||||
"packaging>=20.8",
|
||||
"pip-tools",
|
||||
"pygithub",
|
||||
"pyyaml",
|
||||
"requests",
|
||||
"rich>=9.6",
|
||||
"typing-extensions",
|
||||
"packaging>=20.8",
|
||||
],
|
||||
"mypy": [
|
||||
"mypy>=0.901",
|
||||
"types-jinja2",
|
||||
"types-certifi",
|
||||
"types-toml",
|
||||
"types-jinja2",
|
||||
"types-pyyaml",
|
||||
"types-click",
|
||||
"types-requests",
|
||||
"types-toml",
|
||||
],
|
||||
}
|
||||
|
||||
extras["dev"] = [
|
||||
*extras["mypy"],
|
||||
*extras["test"],
|
||||
*extras["bin"],
|
||||
]
|
||||
|
||||
extras["all"] = sum(extras.values(), [])
|
||||
extras["dev"] += extras["test"]
|
||||
|
||||
setup(extras_require=extras)
|
||||
|
||||
+11
-2
@@ -1,7 +1,9 @@
|
||||
from typing import Dict
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
def pytest_addoption(parser):
|
||||
def pytest_addoption(parser) -> None:
|
||||
parser.addoption(
|
||||
"--run-emulation", action="store_true", default=False, help="run emulation tests"
|
||||
)
|
||||
@@ -11,7 +13,7 @@ def pytest_configure(config):
|
||||
config.addinivalue_line("markers", "emulation: mark test requiring qemu binfmt_misc to run")
|
||||
|
||||
|
||||
def pytest_collection_modifyitems(config, items):
|
||||
def pytest_collection_modifyitems(config, items) -> None:
|
||||
if config.getoption("--run-emulation"):
|
||||
# --run-emulation given in cli: do not skip emulation tests
|
||||
return
|
||||
@@ -19,3 +21,10 @@ def pytest_collection_modifyitems(config, items):
|
||||
for item in items:
|
||||
if "emulation" in item.keywords:
|
||||
item.add_marker(skip_emulation)
|
||||
|
||||
|
||||
@pytest.fixture(
|
||||
params=[{"CIBW_BUILD_FRONTEND": "pip"}, {"CIBW_BUILD_FRONTEND": "build"}], ids=["pip", "build"]
|
||||
)
|
||||
def build_frontend_env(request) -> Dict[str, str]:
|
||||
return request.param # type: ignore
|
||||
|
||||
@@ -18,12 +18,12 @@ basic_project = test_projects.new_c_project(
|
||||
)
|
||||
|
||||
|
||||
def test(tmp_path):
|
||||
def test(tmp_path, build_frontend_env):
|
||||
project_dir = tmp_path / "project"
|
||||
basic_project.generate(project_dir)
|
||||
|
||||
# build the wheels
|
||||
actual_wheels = utils.cibuildwheel_run(project_dir)
|
||||
actual_wheels = utils.cibuildwheel_run(project_dir, add_env=build_frontend_env)
|
||||
|
||||
# check that the expected wheels are produced
|
||||
expected_wheels = utils.expected_wheels("spam", "0.1.0")
|
||||
|
||||
@@ -25,8 +25,13 @@ project_with_before_build_asserts = test_projects.new_c_project(
|
||||
stored_executable = f.read()
|
||||
print('stored_executable', stored_executable)
|
||||
print('sys.executable', sys.executable)
|
||||
|
||||
# windows/mac are case insensitive
|
||||
assert os.path.realpath(stored_executable).lower() == os.path.realpath(sys.executable).lower()
|
||||
stored_path = os.path.realpath(stored_executable).lower()
|
||||
current_path = os.path.realpath(sys.executable).lower()
|
||||
|
||||
# TODO: This is not valid in an virtual environment
|
||||
assert stored_path == current_path, '{0} != {1}'.format(stored_path, current_path)
|
||||
"""
|
||||
)
|
||||
)
|
||||
|
||||
@@ -48,7 +48,7 @@ def get_versions_from_constraint_file(constraint_file):
|
||||
|
||||
|
||||
@pytest.mark.parametrize("python_version", ["3.6", "3.8", "3.9"])
|
||||
def test_pinned_versions(tmp_path, python_version):
|
||||
def test_pinned_versions(tmp_path, python_version, build_frontend_env):
|
||||
if utils.platform == "linux":
|
||||
pytest.skip("linux doesn't pin individual tool versions, it pins manylinux images instead")
|
||||
|
||||
@@ -85,6 +85,7 @@ def test_pinned_versions(tmp_path, python_version):
|
||||
add_env={
|
||||
"CIBW_BUILD": build_pattern,
|
||||
"CIBW_ENVIRONMENT": cibw_environment_option,
|
||||
**build_frontend_env,
|
||||
},
|
||||
)
|
||||
|
||||
@@ -107,7 +108,7 @@ def test_pinned_versions(tmp_path, python_version):
|
||||
assert set(actual_wheels) == set(expected_wheels)
|
||||
|
||||
|
||||
def test_dependency_constraints_file(tmp_path):
|
||||
def test_dependency_constraints_file(tmp_path, build_frontend_env):
|
||||
if utils.platform == "linux":
|
||||
pytest.skip("linux doesn't pin individual tool versions, it pins manylinux images instead")
|
||||
|
||||
@@ -118,7 +119,7 @@ def test_dependency_constraints_file(tmp_path):
|
||||
"pip": "20.0.2",
|
||||
"setuptools": "53.0.0",
|
||||
"wheel": "0.34.2",
|
||||
"virtualenv": "20.0.10",
|
||||
"virtualenv": "20.0.35",
|
||||
}
|
||||
|
||||
constraints_file = tmp_path / "constraints.txt"
|
||||
@@ -129,6 +130,7 @@ def test_dependency_constraints_file(tmp_path):
|
||||
setuptools=={setuptools}
|
||||
wheel=={wheel}
|
||||
virtualenv=={virtualenv}
|
||||
importlib-metadata<3,>=0.12; python_version < "3.8"
|
||||
""".format(
|
||||
**tool_versions
|
||||
)
|
||||
@@ -149,6 +151,7 @@ def test_dependency_constraints_file(tmp_path):
|
||||
add_env={
|
||||
"CIBW_ENVIRONMENT": cibw_environment_option,
|
||||
"CIBW_DEPENDENCY_VERSIONS": str(constraints_file),
|
||||
**build_frontend_env,
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
@@ -42,13 +42,9 @@ def test(tmp_path):
|
||||
)
|
||||
|
||||
# also check that we got the right wheels built
|
||||
# there's no auditwheel 4+ on dockcross image
|
||||
# remove manylinux1 wheels from the list of actual_wheels
|
||||
# and restrict expected_wheels to manylinux2010 wheels
|
||||
actual_wheels = [w for w in actual_wheels if "-manylinux1" not in w]
|
||||
expected_wheels = [
|
||||
w
|
||||
for w in utils.expected_wheels("spam", "0.1.0", manylinux_versions=["manylinux2010"])
|
||||
for w in utils.expected_wheels("spam", "0.1.0")
|
||||
if "-cp36-" in w or "-cp37-" in w or "-cp38-" in w or "-cp39-" in w
|
||||
]
|
||||
assert set(actual_wheels) == set(expected_wheels)
|
||||
|
||||
+11
-4
@@ -1,4 +1,3 @@
|
||||
import os
|
||||
import textwrap
|
||||
|
||||
from . import test_projects, utils
|
||||
@@ -33,13 +32,13 @@ build-backend = "setuptools.build_meta"
|
||||
"""
|
||||
|
||||
|
||||
def test_pep518(tmp_path):
|
||||
def test_pep518(tmp_path, build_frontend_env):
|
||||
|
||||
project_dir = tmp_path / "project"
|
||||
basic_project.generate(project_dir)
|
||||
|
||||
# build the wheels
|
||||
actual_wheels = utils.cibuildwheel_run(project_dir)
|
||||
actual_wheels = utils.cibuildwheel_run(project_dir, add_env=build_frontend_env)
|
||||
|
||||
# check that the expected wheels are produced
|
||||
expected_wheels = utils.expected_wheels("spam", "0.1.0")
|
||||
@@ -50,4 +49,12 @@ def test_pep518(tmp_path):
|
||||
assert not (project_dir / "42").exists()
|
||||
assert not (project_dir / "4.1.2").exists()
|
||||
|
||||
assert len(os.listdir(project_dir)) == len(basic_project.files)
|
||||
# pypa/build creates a "build" folder & a "*.egg-info" folder for the wheel being built,
|
||||
# this should be harmless so remove them
|
||||
contents = [
|
||||
item
|
||||
for item in project_dir.iterdir()
|
||||
if item.name != "build" and not item.name.endswith(".egg-info")
|
||||
]
|
||||
|
||||
assert len(contents) == len(basic_project.files)
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
from .base import TestProject # noqa
|
||||
from .c import new_c_project # noqa
|
||||
from .base import TestProject
|
||||
from .c import new_c_project
|
||||
|
||||
__all__ = ("TestProject", "new_c_project")
|
||||
|
||||
@@ -16,7 +16,7 @@ raise Exception('this build will fail')
|
||||
"""
|
||||
|
||||
|
||||
def test_failed_project_with_so_files(tmp_path, capfd):
|
||||
def test_failed_project_with_so_files(tmp_path, capfd, build_frontend_env):
|
||||
if utils.platform != "linux":
|
||||
pytest.skip("this test is only relevant to the linux build")
|
||||
|
||||
@@ -24,7 +24,7 @@ def test_failed_project_with_so_files(tmp_path, capfd):
|
||||
so_file_project.generate(project_dir)
|
||||
|
||||
with pytest.raises(subprocess.CalledProcessError):
|
||||
utils.cibuildwheel_run(project_dir)
|
||||
utils.cibuildwheel_run(project_dir, add_env=build_frontend_env)
|
||||
|
||||
captured = capfd.readouterr()
|
||||
print("out", captured.out)
|
||||
|
||||
@@ -11,7 +11,7 @@ def test_compare_configs():
|
||||
|
||||
dict_txt = toml.loads(txt)
|
||||
|
||||
new_txt = toml.dumps(dict_txt, encoder=InlineArrayDictEncoder())
|
||||
new_txt = toml.dumps(dict_txt, encoder=InlineArrayDictEncoder()) # type: ignore
|
||||
print(new_txt)
|
||||
|
||||
assert new_txt == txt
|
||||
@@ -35,6 +35,6 @@ python_configurations = [
|
||||
]
|
||||
"""
|
||||
|
||||
output = toml.dumps(example, encoder=InlineArrayDictEncoder())
|
||||
output = toml.dumps(example, encoder=InlineArrayDictEncoder()) # type: ignore
|
||||
print(output)
|
||||
assert output == result
|
||||
|
||||
@@ -63,6 +63,7 @@ def test_container_removed():
|
||||
stdout=subprocess.PIPE,
|
||||
universal_newlines=True,
|
||||
).stdout
|
||||
assert container.name is not None
|
||||
assert container.name in docker_containers_listing
|
||||
old_container_name = container.name
|
||||
|
||||
|
||||
@@ -200,7 +200,7 @@ def test_test_command(
|
||||
|
||||
main()
|
||||
|
||||
assert intercepted_build_args.args[0].test_command == test_command
|
||||
assert intercepted_build_args.args[0].test_command == (test_command or "")
|
||||
|
||||
|
||||
@pytest.mark.parametrize("before_build", [None, "before --build"])
|
||||
@@ -217,7 +217,7 @@ def test_before_build(
|
||||
|
||||
main()
|
||||
|
||||
assert intercepted_build_args.args[0].before_build == before_build
|
||||
assert intercepted_build_args.args[0].before_build == (before_build or "")
|
||||
|
||||
|
||||
@pytest.mark.parametrize("build_verbosity", [None, 0, 2, -2, 4, -4])
|
||||
@@ -286,7 +286,4 @@ def test_before_all(before_all, platform_specific, platform, intercepted_build_a
|
||||
|
||||
main()
|
||||
|
||||
if before_all is None:
|
||||
before_all = ""
|
||||
|
||||
assert intercepted_build_args.args[0].before_all == before_all
|
||||
assert intercepted_build_args.args[0].before_all == (before_all or "")
|
||||
|
||||
@@ -0,0 +1,190 @@
|
||||
import pytest
|
||||
|
||||
from cibuildwheel.options import ConfigOptionError, ConfigOptions
|
||||
|
||||
PYPROJECT_1 = """
|
||||
[tool.cibuildwheel]
|
||||
build = "cp39*"
|
||||
environment = {THING = "OTHER", FOO="BAR"}
|
||||
|
||||
test-command = "pyproject"
|
||||
test-requires = "something"
|
||||
test-extras = ["one", "two"]
|
||||
|
||||
manylinux-x86_64-image = "manylinux1"
|
||||
|
||||
[tool.cibuildwheel.macos]
|
||||
test-requires = "else"
|
||||
|
||||
[tool.cibuildwheel.linux]
|
||||
test-requires = ["other", "many"]
|
||||
"""
|
||||
|
||||
|
||||
@pytest.fixture(params=["linux", "macos", "windows"])
|
||||
def platform(request):
|
||||
return request.param
|
||||
|
||||
|
||||
@pytest.mark.parametrize("fname", ["pyproject.toml", "cibuildwheel.toml"])
|
||||
def test_simple_settings(tmp_path, platform, fname):
|
||||
with tmp_path.joinpath(fname).open("w") as f:
|
||||
f.write(PYPROJECT_1)
|
||||
|
||||
options = ConfigOptions(tmp_path, f"{{package}}/{fname}", platform=platform)
|
||||
|
||||
assert options("build", env_plat=False, sep=" ") == "cp39*"
|
||||
|
||||
assert options("test-command") == "pyproject"
|
||||
assert options("archs", sep=" ") == "auto"
|
||||
assert (
|
||||
options("test-requires", sep=" ")
|
||||
== {"windows": "something", "macos": "else", "linux": "other many"}[platform]
|
||||
)
|
||||
|
||||
# Also testing options for support for both lists and tables
|
||||
assert (
|
||||
options("environment", table={"item": '{k}="{v}"', "sep": " "}) == 'THING="OTHER" FOO="BAR"'
|
||||
)
|
||||
assert (
|
||||
options("environment", sep="x", table={"item": '{k}="{v}"', "sep": " "})
|
||||
== 'THING="OTHER" FOO="BAR"'
|
||||
)
|
||||
assert options("test-extras", sep=",") == "one,two"
|
||||
assert options("test-extras", sep=",", table={"item": '{k}="{v}"', "sep": " "}) == "one,two"
|
||||
|
||||
assert options("manylinux-x86_64-image") == "manylinux1"
|
||||
assert options("manylinux-i686-image") == "manylinux2010"
|
||||
|
||||
with pytest.raises(ConfigOptionError):
|
||||
options("environment", sep=" ")
|
||||
|
||||
with pytest.raises(ConfigOptionError):
|
||||
options("test-extras", table={"item": '{k}="{v}"', "sep": " "})
|
||||
|
||||
|
||||
def test_envvar_override(tmp_path, platform, monkeypatch):
|
||||
monkeypatch.setenv("CIBW_BUILD", "cp38*")
|
||||
monkeypatch.setenv("CIBW_MANYLINUX_X86_64_IMAGE", "manylinux2014")
|
||||
monkeypatch.setenv("CIBW_TEST_COMMAND", "mytest")
|
||||
monkeypatch.setenv("CIBW_TEST_REQUIRES", "docs")
|
||||
monkeypatch.setenv("CIBW_TEST_REQUIRES_LINUX", "scod")
|
||||
|
||||
with tmp_path.joinpath("pyproject.toml").open("w") as f:
|
||||
f.write(PYPROJECT_1)
|
||||
|
||||
options = ConfigOptions(tmp_path, platform=platform)
|
||||
|
||||
assert options("archs", sep=" ") == "auto"
|
||||
|
||||
assert options("build", sep=" ") == "cp38*"
|
||||
assert options("manylinux-x86_64-image") == "manylinux2014"
|
||||
assert options("manylinux-i686-image") == "manylinux2010"
|
||||
|
||||
assert (
|
||||
options("test-requires", sep=" ")
|
||||
== {"windows": "docs", "macos": "docs", "linux": "scod"}[platform]
|
||||
)
|
||||
assert options("test-command") == "mytest"
|
||||
|
||||
|
||||
def test_project_global_override_default_platform(tmp_path, platform):
|
||||
tmp_path.joinpath("pyproject.toml").write_text(
|
||||
"""
|
||||
[tool.cibuildwheel]
|
||||
repair-wheel-command = "repair-project-global"
|
||||
"""
|
||||
)
|
||||
options = ConfigOptions(tmp_path, platform=platform)
|
||||
assert options("repair-wheel-command") == "repair-project-global"
|
||||
|
||||
|
||||
def test_env_global_override_default_platform(tmp_path, platform, monkeypatch):
|
||||
monkeypatch.setenv("CIBW_REPAIR_WHEEL_COMMAND", "repair-env-global")
|
||||
options = ConfigOptions(tmp_path, platform=platform)
|
||||
assert options("repair-wheel-command") == "repair-env-global"
|
||||
|
||||
|
||||
def test_env_global_override_project_platform(tmp_path, platform, monkeypatch):
|
||||
monkeypatch.setenv("CIBW_REPAIR_WHEEL_COMMAND", "repair-env-global")
|
||||
tmp_path.joinpath("pyproject.toml").write_text(
|
||||
"""
|
||||
[tool.cibuildwheel.linux]
|
||||
repair-wheel-command = "repair-project-linux"
|
||||
[tool.cibuildwheel.windows]
|
||||
repair-wheel-command = "repair-project-windows"
|
||||
[tool.cibuildwheel.macos]
|
||||
repair-wheel-command = "repair-project-macos"
|
||||
"""
|
||||
)
|
||||
options = ConfigOptions(tmp_path, platform=platform)
|
||||
assert options("repair-wheel-command") == "repair-env-global"
|
||||
|
||||
|
||||
def test_global_platform_order(tmp_path, platform):
|
||||
tmp_path.joinpath("pyproject.toml").write_text(
|
||||
"""
|
||||
[tool.cibuildwheel.linux]
|
||||
repair-wheel-command = "repair-project-linux"
|
||||
[tool.cibuildwheel.windows]
|
||||
repair-wheel-command = "repair-project-windows"
|
||||
[tool.cibuildwheel.macos]
|
||||
repair-wheel-command = "repair-project-macos"
|
||||
[tool.cibuildwheel]
|
||||
repair-wheel-command = "repair-project-global"
|
||||
"""
|
||||
)
|
||||
options = ConfigOptions(tmp_path, platform=platform)
|
||||
assert options("repair-wheel-command") == f"repair-project-{platform}"
|
||||
|
||||
|
||||
def test_unexpected_key(tmp_path):
|
||||
# Note that platform contents are only checked when running
|
||||
# for that platform.
|
||||
tmp_path.joinpath("pyproject.toml").write_text(
|
||||
"""
|
||||
[tool.cibuildwheel]
|
||||
repairs-wheel-command = "repair-project-linux"
|
||||
"""
|
||||
)
|
||||
|
||||
with pytest.raises(ConfigOptionError):
|
||||
ConfigOptions(tmp_path, platform="linux")
|
||||
|
||||
|
||||
def test_unexpected_table(tmp_path):
|
||||
tmp_path.joinpath("pyproject.toml").write_text(
|
||||
"""
|
||||
[tool.cibuildwheel.linus]
|
||||
repair-wheel-command = "repair-project-linux"
|
||||
"""
|
||||
)
|
||||
with pytest.raises(ConfigOptionError):
|
||||
ConfigOptions(tmp_path, platform="linux")
|
||||
|
||||
|
||||
def test_unsupported_join(tmp_path):
|
||||
tmp_path.joinpath("pyproject.toml").write_text(
|
||||
"""
|
||||
[tool.cibuildwheel]
|
||||
build = ["1", "2"]
|
||||
"""
|
||||
)
|
||||
options = ConfigOptions(tmp_path, platform="linux")
|
||||
|
||||
assert "1, 2" == options("build", sep=", ")
|
||||
with pytest.raises(ConfigOptionError):
|
||||
options("build")
|
||||
|
||||
|
||||
def test_disallowed_a(tmp_path):
|
||||
tmp_path.joinpath("pyproject.toml").write_text(
|
||||
"""
|
||||
[tool.cibuildwheel.windows]
|
||||
manylinux-x64_86-image = "manylinux1"
|
||||
"""
|
||||
)
|
||||
disallow = {"windows": {"manylinux-x64_86-image"}}
|
||||
ConfigOptions(tmp_path, platform="linux", disallow=disallow)
|
||||
with pytest.raises(ConfigOptionError):
|
||||
ConfigOptions(tmp_path, platform="windows", disallow=disallow)
|
||||
Reference in New Issue
Block a user