Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update of the build process #659

Merged
merged 4 commits into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 6 additions & 16 deletions .github/workflows/build-python-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, macos-11, windows-2019]
os: [ubuntu-22.04, macos-12, windows-2022]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
# Necessary to fetch tags and allow setuptools_scm
# see: https://github.com/pypa/setuptools_scm/issues/480
Expand All @@ -27,21 +27,11 @@ jobs:
with:
python-version: '3.9'

- name: Get version
# Get the version before modifying the repository
shell: bash
run: |
python -m pip install setuptools-scm
echo "SETUPTOOLS_SCM_PRETEND_VERSION=$(python -m setuptools_scm)" >> $GITHUB_ENV

- name: Set build configuration
run: cp githubproject.toml pyproject.toml

- name: Build wheels
uses: pypa/cibuildwheel@v2.3.1
uses: pypa/cibuildwheel@v2.16.0

- name: Upload wheels
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: wheels
path: ./wheelhouse/*.whl
Expand All @@ -51,7 +41,7 @@ jobs:
runs-on: ubuntu-20.04
MJGaughran marked this conversation as resolved.
Show resolved Hide resolved

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
# Necessary to fetch tags and allow setuptools_scm
# see: https://github.com/pypa/setuptools_scm/issues/480
Expand All @@ -69,7 +59,7 @@ jobs:
run: python -m build --sdist

- name: Upload sdist
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: tar.gz
path: ./dist/*.tar.gz
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ on:
workflow_dispatch:

jobs:
build_and_run_tests:
build_and_publish_doc:

runs-on: ubuntu-latest

steps:

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
# Necessary to fetch tags and allow setuptools_scm
# see: https://github.com/pypa/setuptools_scm/issues/480
Expand All @@ -32,7 +32,7 @@ jobs:
working-directory: docs

- name: Publish Docs to gh-pages
uses: peaceiris/actions-gh-pages@068dc23d9710f1ba62e86896f84735d869951305
uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/html
2 changes: 1 addition & 1 deletion .github/workflows/matlab-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

steps:

- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up python 3.9
uses: actions/setup-python@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

steps:

- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
Expand Down
84 changes: 0 additions & 84 deletions githubproject.toml

This file was deleted.

15 changes: 6 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
[build-system]
requires = [
"numpy >= 1.16.6;python_version<'3.8'",
MJGaughran marked this conversation as resolved.
Show resolved Hide resolved
"numpy >= 1.17.3;python_version=='3.8'",
"numpy >= 1.19.3;python_version=='3.9'",
"numpy >= 1.21.3;python_version=='3.10'",
"numpy >= 1.23.4;python_version>='3.11'",
"setuptools >= 62",
"setuptools_scm >= 7",
"oldest-supported-numpy",
"mpi4py; extra=='mpi'", # Does not work yet, so we need in-tree backend
"wheel",
]
Expand Down Expand Up @@ -61,17 +57,18 @@ doc = ["Sphinx ~= 5.3", "myst-parser", "pydata-sphinx-theme ~= 0.11.0", "sphinx-

[tool.cibuildwheel]
# Pypy does not have Scipy so we cannot support it.
build = ["cp3{7,8,9}*", "cp31{0, 1}*"]
build = ["cp3{7,8,9,10,11}*"]
#skip = ["*-musllinux*", "*_i686", "*win32"]
build-verbosity = "1"
# "build" frontend fails on windows
# build-frontend = "build"

[tool.cibuildwheel.macos]
archs = ["x86_64", "arm64"]

[tool.cibuildwheel.linux]
# Pass the detected PyAT version to the linux docker containers
environment-pass = ["SETUPTOOLS_SCM_PRETEND_VERSION"]
#[tool.cibuildwheel.linux]
## Pass the detected PyAT version to the linux docker containers
#environment-pass = ["SETUPTOOLS_SCM_PRETEND_VERSION"]

[tool.setuptools_scm]
write_to = "pyat/at/_version.py"
Expand Down