Skip to content

Commit

Permalink
Fix packaging (#148)
Browse files Browse the repository at this point in the history
* fix packaging

* fix cython pin

* Update requirements.txt

* Update setup.py
  • Loading branch information
hmacdope authored Jan 23, 2024
1 parent fb38017 commit 6b159b6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
matrix:
# for now windows pip install builds seem to fail for some reason
os: [ubuntu-latest, macos-latest,]
python: ["3.8", "3.9", "3.10", "3.11"]
python: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
Expand Down
21 changes: 9 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,18 @@
requires = [
"setuptools>=42",
"wheel",
# declaring numpy versions specifically to x86_64
# lowest NumPy we can use for a given Python,
# except for more exotic platform (Mac Arm flavors)
# Also don't allow PyPy builds
"numpy==1.20.0; python_version=='3.8' and platform_machine=='x86_64' and platform_python_implementation != 'PyPy'",
"numpy==1.20.0; python_version=='3.9' and platform_machine=='x86_64' and platform_python_implementation != 'PyPy'",
# As per https://github.com/scipy/oldest-supported-numpy/blob/main/setup.cfg
# safest to build at 1.21.6 for all platforms
"numpy==1.21.6; python_version=='3.10' and platform_machine=='x86_64' and platform_python_implementation != 'PyPy'",
"numpy==1.23.2; python_version=='3.11' and platform_machine=='x86_64' and platform_python_implementation != 'PyPy'",
# default to just numpy for unknown versions of Python
"numpy; python_version>='3.12'",
# In part adapted from: https://github.com/scipy/oldest-supported-numpy/blob/main/setup.cfg
# As per NEP29, we set the minimum version to 1.23.2 for Python <=3.11
# and 1.26.0 (first to support) for Python 3.12
"numpy==1.23.2; python_version<='3.11' and platform_python_implementation != 'PyPy'",
"numpy==1.26.0; python_version=='3.12' 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.13'",
"scikit-build",
"cmake",
"cython>=0.28,<3.0",
"cython",
"versioneer[toml]==0.26",
"ninja; platform_system!='Windows'"
]
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake
cython>=0.28.0,<3.0.0
numpy>=1.20.0
cython
numpy>=1.23
ninja
pytest
scikit-build
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
author=['Hugo MacDermott-Opeskin', "Richard Gowers"],
license="MIT",
packages=['distopia'],
python_requires=">=3.8",
python_requires=">=3.9",
keywords=(
"molecular dynamics distances simulation SIMD"
),
Expand All @@ -47,6 +47,6 @@
"Issue Tracker": "https://github.com/MDAnalysis/distopia/issues",
},
install_requires=[
"numpy>=1.20.0"
"numpy>=1.23"
],
)

0 comments on commit 6b159b6

Please sign in to comment.