Skip to content

Commit

Permalink
Merge pull request #168 from djhoese/build-np2rc1
Browse files Browse the repository at this point in the history
Build against numpy 2.0rc1
  • Loading branch information
djhoese committed Apr 15, 2024
2 parents b137ced + c77b830 commit 1a15876
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/ci.yaml
Expand Up @@ -13,7 +13,7 @@ jobs:
python-version: ["3.9", "3.11", "3.12"]
experimental: [false]
include:
- python-version: "3.11"
- python-version: "3.12"
os: "ubuntu-latest"
experimental: true

Expand Down Expand Up @@ -43,20 +43,25 @@ jobs:
if: matrix.experimental == true
shell: bash -l {0}
run: |
python -m pip install versioneer pkgconfig setuptools-scm; \
conda uninstall --force-remove -y numpy pandas xarray pyresample pykdtree; \
python -m pip install \
-f https://pypi.anaconda.org/scientific-python-nightly-wheels/simple/ \
--trusted-host pypi.anaconda.org \
--no-deps --pre --upgrade \
numpy \
pandas; \
python -m pip install \
--no-deps --upgrade \
--no-deps --upgrade --pre --no-build-isolation \
git+https://github.com/storpipfugl/pykdtree \
git+https://github.com/pytroll/pyresample \
git+https://github.com/dask/dask \
git+https://github.com/dask/distributed \
git+https://github.com/Unidata/cftime \
git+https://github.com/mapbox/rasterio \
git+https://github.com/rasterio/rasterio \
git+https://github.com/pydata/bottleneck \
git+https://github.com/zarr-developers/zarr \
git+https://github.com/pydata/xarray;
python -m pip install -e . --no-deps --no-build-isolation;
- name: Install trollimage
shell: bash -l {0}
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/deploy.yaml
Expand Up @@ -64,9 +64,6 @@ jobs:
CIBW_SKIP: "cp36-* cp37-* cp38-* pp* *-manylinux_i686 *-musllinux_i686 *-musllinux_aarch64 *-win32"
CIBW_ARCHS: "${{ matrix.cibw_archs }}"
CIBW_TEST_SKIP: "*_arm64 *_universal2:arm64"
# below only for building against unstable numpy
CIBW_BUILD_FRONTEND: "pip; args: --no-build-isolation"
CIBW_BEFORE_BUILD: "pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy cython setuptools versioneer"

- uses: actions/upload-artifact@v4
with:
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
@@ -1,8 +1,7 @@
[build-system]
requires = [
"wheel",
'numpy; python_full_version<"3.12.0rc1"',
'numpy>=1.26.0rc1; python_full_version>="3.12.0rc1"',
"numpy>=2.0.0rc1,<2.3",
"setuptools>=42",
"versioneer",
"Cython>=3.0.0"
Expand Down
2 changes: 1 addition & 1 deletion trollimage/_colorspaces.pyx
Expand Up @@ -18,7 +18,7 @@ np.import_array()
# bint npy_isnan(np.float32_t x) nogil

# Function pointer type to allow for generic high-level functions
ctypedef void (*CONVERT_FUNC)(floating[:] comp1, floating[:] comp2, floating[:] comp3, floating[:, ::1] out) nogil
ctypedef void (*CONVERT_FUNC)(floating[:] comp1, floating[:] comp2, floating[:] comp3, floating[:, ::1] out) noexcept nogil


cdef:
Expand Down

0 comments on commit 1a15876

Please sign in to comment.