diff options
author | Matthieu Darbois <mayeut@users.noreply.github.com> | 2022-10-18 20:05:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-18 20:05:17 +0200 |
commit | 3f81c62ecb37098318fd1f80eebb0bdffc8f097c (patch) | |
tree | 0acb3a837cdbb293a7165b2ce66cebbbe74ea46d | |
parent | 0707c16339c3918f77eeb83cb1d6047cdb2f0e10 (diff) | |
download | psutil-3f81c62ecb37098318fd1f80eebb0bdffc8f097c.tar.gz |
fix #2021, fix #1954, provide OSX arm64 bins + add pyproject.toml (#2040)
This commit updates the build workflow to use the latest cibuildwheel as a GitHub Action.
cibuildwheel configuration is now in its own file (as there's no `pyproject.toml` yet)
Signed-off-by: mayeut <mayeut@users.noreply.github.com>
-rw-r--r-- | .github/workflows/build.yml | 29 | ||||
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | pyproject.toml | 15 |
3 files changed, 18 insertions, 27 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e7d3c422..4c0ef79b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,17 +28,7 @@ jobs: strategy: fail-fast: false matrix: - # os: [ubuntu-latest, macos-latest, windows-latest] os: [ubuntu-latest, macos-12] - include: - - {name: Linux, python: '3.9', os: ubuntu-latest} - env: - CIBW_TEST_COMMAND: - PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_DEBUG=1 python {project}/psutil/tests/runner.py && - PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_DEBUG=1 python {project}/psutil/tests/test_memleaks.py - CIBW_TEST_EXTRAS: test - CIBW_BUILD: 'cp36-* cp37-* cp38-* cp39-* cp310-*' - CIBW_SKIP: '*-musllinux_*' steps: - name: Cancel previous runs @@ -53,16 +43,8 @@ jobs: cache: pip cache-dependency-path: .github/workflows/build.yml - - name: Install cibuildwheel - run: pip install cibuildwheel - - # - name: (Windows) install Visual C++ for Python 2.7 - # if: matrix.os == 'windows-latest' - # run: | - # choco install vcpython27 -f -y - - name: Run tests - run: cibuildwheel . + uses: pypa/cibuildwheel@v2.11.1 - name: Create wheels uses: actions/upload-artifact@v3 @@ -87,16 +69,12 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-12] - include: - - {name: Linux, python: '3.9', os: ubuntu-latest} env: - CIBW_ARCHS_LINUX: 'x86_64 i686' CIBW_TEST_COMMAND: PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_DEBUG=1 python {project}/psutil/tests/runner.py && PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_DEBUG=1 python {project}/psutil/tests/test_memleaks.py CIBW_TEST_EXTRAS: test CIBW_BUILD: 'cp27-*' - CIBW_SKIP: '*-musllinux_*' steps: - name: Cancel previous runs @@ -111,11 +89,8 @@ jobs: cache: pip cache-dependency-path: .github/workflows/build.yml - - name: Install cibuildwheel - run: pip install cibuildwheel==1.12.0 - - name: Run tests - run: cibuildwheel . + uses: pypa/cibuildwheel@v1.12.0 - name: Create wheels uses: actions/upload-artifact@v3 @@ -17,3 +17,4 @@ syntax: glob .tox/ build/ dist/ +wheelhouse/ diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..47031d26 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,15 @@ +[build-system] +requires = ["setuptools>=43"] +build-backend = "setuptools.build_meta" + +[tool.cibuildwheel] +build = ["cp36-*", "cp37-*", "cp38-*", "cp39-*", "cp310-*"] +skip = ["*-musllinux*"] +test-extras = "test" +test-command = [ + "PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_DEBUG=1 python {project}/psutil/tests/runner.py", + "PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_DEBUG=1 python {project}/psutil/tests/test_memleaks.py" +] + +[tool.cibuildwheel.macos] +archs = ["x86_64", "arm64"] |