Skip to content

Commit b240b3f

Browse files
authored
Relax numpy constraints (#88)
* relax numpy constraints * relax numpy constraints * CI * ci * ci * ci * ci
1 parent d3ae27e commit b240b3f

File tree

4 files changed

+24
-29
lines changed

4 files changed

+24
-29
lines changed

.github/workflows/python-module.yml

+20-19
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
4545
- uses: actions/upload-artifact@v3
4646
with:
47-
name: wheels
47+
name: wheels-lin
4848
path: ./python/dist/*.whl
4949

5050
- name: Make sdist
@@ -61,11 +61,11 @@ jobs:
6161
path: ./python/dist/*.tar.gz
6262

6363
build_mac:
64-
runs-on: macos-12
64+
runs-on: macos-13
6565
strategy:
6666
max-parallel: 4
6767
matrix:
68-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
68+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
6969
steps:
7070
- uses: actions/checkout@v3
7171
- name: Set up Python ${{ matrix.python-version }}
@@ -83,7 +83,7 @@ jobs:
8383
run: |
8484
cd python
8585
export PATH=$PATH:$HOME/.cargo/bin
86-
pip install wheel
86+
pip install wheel setuptools
8787
python setup.py bdist_wheel -p macosx-10.9-universal2
8888
pip install dist/*.whl
8989
- name: Test
@@ -93,9 +93,9 @@ jobs:
9393
pip install pytest
9494
pytest tests
9595
96-
- uses: actions/upload-artifact@v3
96+
- uses: actions/upload-artifact@v4
9797
with:
98-
name: wheels
98+
name: wheels-mac-py${{ matrix.python-version }}
9999
path: ./python/dist/*.whl
100100

101101
build_win:
@@ -106,18 +106,18 @@ jobs:
106106
strategy:
107107
max-parallel: 4
108108
matrix:
109-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
109+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
110110
steps:
111-
- uses: actions/checkout@v3
111+
- uses: actions/checkout@v4
112112
- name: Set up Python ${{ matrix.python-version }}
113-
uses: actions/setup-python@v4
113+
uses: actions/setup-python@v5
114114
with:
115115
python-version: ${{ matrix.python-version }}
116116
architecture: "x64" # (x64 or x86)
117117
- name: Build
118118
run: |
119119
cd python
120-
pip install wheel
120+
pip install wheel setuptools
121121
python setup.py bdist_wheel -p $(python -c "import distutils.util; print(distutils.util.get_platform())")
122122
pip install dist/*.whl
123123
- name: Test
@@ -133,9 +133,9 @@ jobs:
133133
python -c "import wkw"
134134
pytest tests -k "not big_read"
135135
136-
- uses: actions/upload-artifact@v3
136+
- uses: actions/upload-artifact@v4
137137
with:
138-
name: wheels
138+
name: wheels-win-py${{ matrix.python-version }}
139139
path: ./python/dist/*.whl
140140

141141
publish:
@@ -147,20 +147,21 @@ jobs:
147147
runs-on: ubuntu-latest
148148
if: startsWith(github.event.ref, 'refs/tags')
149149
steps:
150-
- uses: actions/checkout@v3
150+
- uses: actions/checkout@v4
151151
with:
152152
fetch-depth: "0"
153-
- name: Set up Python ${{ matrix.python-version }}
154-
uses: actions/setup-python@v4
153+
- name: Set up Python
154+
uses: actions/setup-python@v5
155155
with:
156-
python-version: "3.10"
156+
python-version: "3.11"
157157
- name: Get wheels
158-
uses: actions/download-artifact@v3
158+
uses: actions/download-artifact@v4
159159
with:
160-
name: wheels
160+
pattern: wheels-*
161+
merge-multiple: true
161162
path: dist
162163
- name: Get tar.gz
163-
uses: actions/download-artifact@v3
164+
uses: actions/download-artifact@v4
164165
with:
165166
name: targz
166167
path: dist

python/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM quay.io/pypa/manylinux2014_x86_64
33
ENV RUSTUP_HOME=/usr/local/rustup \
44
CARGO_HOME=/usr/local/cargo \
55
PATH=/usr/local/cargo/bin:$PATH \
6-
PYBIN=/opt/python/cp37-cp37m/bin
6+
PYBIN=/opt/python/cp312-cp312/bin
77

88
RUN git config --global --add safe.directory /app
99

@@ -13,7 +13,7 @@ RUN curl https://sh.rustup.rs -sSf | sh -s -- --no-modify-path -y; \
1313
cargo --version; \
1414
rustc --version;
1515

16-
RUN for PYBIN in /opt/python/{cp37-cp37m,cp38-cp38,cp39-cp39,cp310-cp310,cp311-cp311}/bin; do \
16+
RUN for PYBIN in /opt/python/{cp38-cp38,cp39-cp39,cp310-cp310,cp311-cp311,cp312-cp312}/bin; do \
1717
echo "--> $PYBIN"; \
1818
$PYBIN/pip install \
1919
numpy \

python/requirements.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
cffi
2-
numpy>=1.15,==1.*
3-
numpy<1.22; python_version < '3.8'
2+
numpy>=1.15

python/setup.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,6 @@ def run(self):
8888
packages=find_packages(),
8989
include_package_data=True,
9090
license="MIT",
91-
install_requires=["cffi", "numpy>=1.15,==1.*"],
92-
extras_require={
93-
':python_version < "3.8"': [
94-
"numpy<1.22",
95-
],
96-
},
91+
install_requires=["cffi", "numpy>=1.15"],
9792
cmdclass={"build_py": BuildPyCommand},
9893
)

0 commit comments

Comments
 (0)