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

Revert numpy build pinning changes #4261

Merged
merged 1 commit into from
Aug 28, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .github/actions/build-src/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ inputs:
# example, when we use nightly wheels of NumPy.
descriptions: 'Use build isolation for pip installs, if false `--no-build-isolation` is used. '
required: true
default: false
default: true


runs:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/gh-ci-cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ jobs:
with:
build-tests: true
build-docs: false
# We don't use build isolation because we want to ensure that we
# test building with brand new versions of NumPy here.
isolation: false

- name: run_tests
Expand Down Expand Up @@ -119,7 +121,7 @@ jobs:
with:
build-tests: true
build-docs: false
isolation: false
isolation: true

- name: run_tests
run: |
Expand Down Expand Up @@ -167,7 +169,7 @@ jobs:
with:
build-tests: true
build-docs: false
isolation: false
isolation: true

- name: run_tests
run: |
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/gh-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,11 @@ jobs:
with:
build-tests: true
build-docs: false
# If we specifically define an old NumPy version then we isolate the
# the build, i.e. make sure that we build with NumPy 1.25+ but we keep
# the old version of NumPy as what we use for runtime testing
isolation: ${{ matrix.numpy != '' }}
# The standard mdanalysis deployment is to build with the
# oldest supported numpy version and then use whatever new
# numpy version we want at runtime. To do this we ensure
# that we use build isolation
isolation: true

- name: check_deps
run: |
Expand Down Expand Up @@ -161,7 +162,7 @@ jobs:
with:
build-tests: true
build-docs: true
isolation: false
isolation: true

- name: doctests
if: github.event_name == 'pull_request'
Expand Down
2 changes: 2 additions & 0 deletions package/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Fixes
Enhancements

Changes
* Reverts PR #4108, builds are now again made using the oldest
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would just cut a bugfix release out of the current state of 2.7.0, rather than cherry pick - everything here seems like sensible bug fixes imho.

supported Python version.
* NumPy `in1d` replaced with `isin` in preparation for NumPy
`2.0` (PR #4255)
* Update documentation for SurvivalProbabilty to be more clear
Expand Down
19 changes: 14 additions & 5 deletions package/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,20 @@
requires = [
"Cython>=0.28",
"packaging",
# NumPy 1.25+ offers backwards compatibility that tracks with greater
# than NEP29 (see: https://numpy.org/doc/stable/dev/depending_on_numpy.html#adding-a-dependency-on-numpy)
# We pin our wheel installation to that and a maximum of numpy 2.0 since
# this will likely involve several breaking changes
"numpy>=1.25,<2.0; python_version>='3.9'",
# lowest NumPy we can use for a given Python,
# In part adapted from: https://github.com/scipy/oldest-supported-numpy/blob/main/setup.cfg
# except for more exotic platform (Mac Arm flavors)
# aarch64, AIX, s390x, and arm64 all support 1.21 so we can safely pin to this
# Note: MDA does not build with PyPy so we do not support it in the build system
# Scipy: On windows avoid 1.21.6, 1.22.0, and 1.22.1 because they were built on vc142
# Let's set everything to this version to make things clean, also avoids other issues
# on other archs
"numpy==1.22.3; python_version=='3.9' and platform_python_implementation != 'PyPy'",
"numpy==1.22.3; python_version=='3.10' and platform_python_implementation != 'PyPy'",
"numpy==1.23.2; python_version=='3.11' and platform_python_implementation != 'PyPy'",
# For unreleased versions of Python there is currently no known supported
# NumPy version. In that case we just let it be a bare NumPy install
"numpy<2.0; python_version>='3.12'",
"setuptools",
"wheel",
]
Expand Down