Skip to content

Commit

Permalink
MAINT: update pyproject.toml for compatibility with numpy 2
Browse files Browse the repository at this point in the history
  • Loading branch information
nghi-truyen committed Jun 28, 2024
1 parent f47b00e commit bafb803
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 24 deletions.
10 changes: 9 additions & 1 deletion doc/source/contributor_guide/development_process_details.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ System-level dependencies
`smash` uses compiled code for speed, which means you need compilers and some other system-level
(i.e, non-Python / non-PyPI) dependencies to build it on your system.

Anaconda (recommanded)
Anaconda (recommended)
''''''''''''''''''''''

If you are using `Conda <https://www.anaconda.com/>`__, all the dependencies will be installed
Expand All @@ -35,6 +35,14 @@ It will create a Conda environment called ``smash-dev`` that can be activated as
conda activate smash-dev
Once ``smash-dev`` is created, it is recomended to update pip and your Conda environment
to ensure you have the latest package versions and to prevent any conflicts:

.. code-block:: none
(smash-dev) python3 -m pip install --upgrade pip
(smash-dev) conda update --all
Linux
'''''

Expand Down
8 changes: 2 additions & 6 deletions environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,8 @@ dependencies:
- meson
- meson-python
- ninja

# numpy requirement for wheel builds for distribution on PyPI - building
# against 2.x yields wheels that are also compatible with numpy 1.x at
# runtime.
- numpy>=2.0.0
- f90wrap>=0.2.15
- numpy
- f90wrap
- versioneer[toml]
- rasterio
- pandas
Expand Down
18 changes: 7 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
[build-system]
requires = [
"meson-python",

# numpy requirement for wheel builds for distribution on PyPI - building
# against 2.x yields wheels that are also compatible with numpy 1.x at
# runtime.
"numpy>=2.0.0",
"numpy>=1.24",
"f90wrap>=0.2.15",
"versioneer[toml]"
]
Expand All @@ -22,13 +18,13 @@ authors = [
license = {text = "GPL-3.0"}
requires-python = ">=3.9"
dependencies = [
"numpy",
"numpy>=1.24",
"f90wrap>=0.2.15",
"rasterio",
"pandas",
"h5py",
"rasterio>=1.3.10",
"pandas>=2.2.2",
"h5py>=3.11",
"tqdm",
"scipy",
"scipy>=1.13",
"pyyaml",
"terminaltables",
]
Expand Down Expand Up @@ -62,7 +58,7 @@ doc = [
"sphinxcontrib-bibtex",
"sphinx-design",
"sphinx-autosummary-accessors",
"matplotlib"
"matplotlib>=3.8.4"
]
dev = [
"ruff",
Expand Down
8 changes: 2 additions & 6 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@
meson
meson-python
ninja

# numpy requirement for wheel builds for distribution on PyPI - building
# against 2.x yields wheels that are also compatible with numpy 1.x at
# runtime.
numpy>=2.0.0
f90wrap>=0.2.15
numpy
f90wrap
versioneer[toml]
rasterio
pandas
Expand Down

0 comments on commit bafb803

Please sign in to comment.