Skip to content

Commit

Permalink
Add support for Python 3.11, require NumPy 1.23+ (#1348)
Browse files Browse the repository at this point in the history
Contributes to rapidsai/build-planning#3

This PR adds support for Python 3.11.

It also proposes:

* declaring `numpy` as a runtime dependency, as `cuspatial` does import it directly
* a floor on `NumPy` of `numpy>=1.23` in tests, see rapidsai/build-planning#3 (comment)

## Notes for Reviewers

This is part of ongoing work to add Python 3.11 support across RAPIDS.

The Python 3.11 CI workflows introduced in rapidsai/shared-workflows#176 are *optional*... they are not yet required to run successfully for PRs to be merged.

This PR can be merged once all jobs are running successfully (including the non-required jobs for Python 3.11). The CI logs should be verified that the jobs are building and testing with Python 3.11.

See rapidsai/shared-workflows#176 for more details.

Authors:
  - James Lamb (https://github.com/jameslamb)
  - Kyle Edwards (https://github.com/KyleFromNVIDIA)

Approvers:
  - Jake Awe (https://github.com/AyodeAwe)
  - Mark Harris (https://github.com/harrism)
  - Kyle Edwards (https://github.com/KyleFromNVIDIA)

URL: #1348
  • Loading branch information
jameslamb authored Feb 29, 2024
1 parent 603d764 commit 59972f6
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 6 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,13 @@ docker run --gpus all --pull always --rm -it \
### Install with Conda

To install via conda:
> **Note** cuSpatial is supported only on Linux or [through WSL](https://rapids.ai/wsl2.html), and with Python versions 3.9 and 3.10
> **Note** cuSpatial is supported only on Linux or [through WSL](https://rapids.ai/wsl2.html), and with Python versions 3.9, 3.10, and 3.11.
cuSpatial can be installed with conda (miniconda, or the full Anaconda distribution) from the rapidsai channel:

```shell
conda install -c rapidsai -c conda-forge -c nvidia \
cuspatial=24.04 python=3.10 cudatoolkit=11.8
cuspatial=24.04 python=3.11 cudatoolkit=11.8
```
We also provide nightly Conda packages built from the HEAD of our latest development branch.

Expand All @@ -134,7 +134,7 @@ See the [RAPIDS installation documentation](https://docs.rapids.ai/install) for
### Install with pip

To install via pip:
> **Note** cuSpatial is supported only on Linux or [through WSL](https://rapids.ai/wsl2.html), and with Python versions 3.9 and 3.10
> **Note** cuSpatial is supported only on Linux or [through WSL](https://rapids.ai/wsl2.html), and with Python versions 3.9, 3.10, and 3.11.
The cuSpatial pip packages can be installed from NVIDIA's PyPI index. pip installations require using the matching wheel to the system's installed CUDA toolkit.
- For CUDA 11 toolkits, install the `-cu11` wheels
Expand Down
3 changes: 2 additions & 1 deletion conda/environments/all_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ dependencies:
- nbsphinx
- ninja
- notebook
- numpy>=1.23
- numpydoc
- nvcc_linux-64=11.8
- pre-commit
Expand All @@ -39,7 +40,7 @@ dependencies:
- pytest
- pytest-cov
- pytest-xdist
- python>=3.9,<3.11
- python>=3.9,<3.12
- rmm==24.4.*
- scikit-build-core>=0.7.0
- scikit-image
Expand Down
3 changes: 2 additions & 1 deletion conda/environments/all_cuda-122_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ dependencies:
- nbsphinx
- ninja
- notebook
- numpy>=1.23
- numpydoc
- pre-commit
- proj
Expand All @@ -41,7 +42,7 @@ dependencies:
- pytest
- pytest-cov
- pytest-xdist
- python>=3.9,<3.11
- python>=3.9,<3.12
- rmm==24.4.*
- scikit-build-core>=0.7.0
- scikit-image
Expand Down
1 change: 1 addition & 0 deletions conda/recipes/cuspatial/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ requirements:
- {{ pin_compatible('cuda-version', max_pin='x', min_pin='x') }}
- cudf ={{ minor_version }}
- geopandas >=0.11.0
- numpy >=1.23
- python
- rmm ={{ minor_version }}

Expand Down
8 changes: 7 additions & 1 deletion dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -324,13 +324,18 @@ dependencies:
packages:
- python=3.10
- matrix:
py: "3.11"
packages:
- python>=3.9,<3.11
- python=3.11
- matrix:
packages:
- python>=3.9,<3.12
run_python_cuspatial:
common:
- output_types: [conda, requirements, pyproject]
packages:
- geopandas>=0.11.0
- &numpy numpy>=1.23
test_python_cuspatial:
common:
- output_types: [conda, requirements, pyproject]
Expand All @@ -342,6 +347,7 @@ dependencies:
common:
- output_types: [conda, requirements, pyproject]
packages:
- *numpy
- pytest
- pytest-cov
- pytest-xdist
Expand Down
2 changes: 2 additions & 0 deletions python/cuproj/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,14 @@ classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]

[project.optional-dependencies]
test = [
"cuspatial==24.4.*",
"geopandas>=0.11.0",
"numpy>=1.23",
"pyproj>=3.6.0,<3.7a0",
"pytest",
"pytest-cov",
Expand Down
2 changes: 2 additions & 0 deletions python/cuspatial/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ requires-python = ">=3.9"
dependencies = [
"cudf==24.4.*",
"geopandas>=0.11.0",
"numpy>=1.23",
"rmm==24.4.*",
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`.
classifiers = [
Expand All @@ -48,6 +49,7 @@ classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]

[project.optional-dependencies]
Expand Down

0 comments on commit 59972f6

Please sign in to comment.