Skip to content

Commit

Permalink
Build against numpy 2.0 and update versions according to NEP29
Browse files Browse the repository at this point in the history
  • Loading branch information
mstimberg committed Apr 18, 2024
1 parent 668c4a3 commit e227f5d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ jobs:
- name: Build source tarball
run: |
python -m pip install --upgrade pip build
python -m pip install "cython>=0.29" oldest-supported-numpy "setuptools>=61" "setuptools_scm[toml]>=6.2"
python -m build --sdist --config-setting=--formats=gztar --config-setting=--with-cython --config-setting=--fail-on-error
if: ${{ matrix.arch == 'auto64' }}
- name: Set up QEMU
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ Try out Brian on the [mybinder](https://mybinder.org/) service:
## Dependencies
The following packages need to be installed to use Brian 2 (cf. [`pyproject.toml`](pyproject.toml)):

* Python >= 3.9
* NumPy >=1.21
* Python >= 3.10
* NumPy >=1.23
* SymPy >= 1.2
* Cython >= 0.29.21
* PyParsing
Expand Down
9 changes: 5 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ authors = [
{name = 'Dan Goodman'},
{name ='Romain Brette'}
]
requires-python = '>=3.9'
requires-python = '>=3.10'
dependencies = [
'numpy>=1.21',
'numpy>=1.23.5',
'cython>=0.29.21',
'sympy>=1.2',
'pyparsing',
Expand Down Expand Up @@ -60,10 +60,11 @@ fallback_version = 'unknown'
[build-system]
requires = [
"setuptools>=61",
"numpy>=1.10",
# By building against numpy 2.0, we make sure that the wheel is compatible with
# both numpy 2.0 and numpy>=1.23
"numpy>=2.0.0rc1",
"wheel",
"Cython",
"oldest-supported-numpy",
"setuptools_scm[toml]>=6.2"
]
build-backend = "setuptools.build_meta"
Expand Down
1 change: 0 additions & 1 deletion versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ This file contains a list of other files where versions of packages are specifie
In the future it would be advantageous to implement an automated way of keep versions synchronised across files e.g. https://github.com/pre-commit/pre-commit/issues/945#issuecomment-527603460 or preferably parsing `.pre-commit-config.yaml` and using it to `pip install` requirements (see discussion here: https://github.com/brian-team/brian2/pull/1449#issuecomment-1372476018). Until then, the files are listed below for manual checking and updating.

* [`README.md`](https://github.com/brian-team/brian2/blob/master/README.md)
* [`setup.py`](https://github.com/brian-team/brian2/blob/master/setup.py)
* [`rtd-requirements.txt`](https://github.com/brian-team/brian2/blob/master/rtd-requirements.txt)
* [`pyproject.toml`](https://github.com/brian-team/brian2/blob/master/pyproject.toml)
* [`.pre-commit-config.yaml`](https://github.com/brian-team/brian2/blob/master/.pre-commit-config.yaml)
Expand Down

0 comments on commit e227f5d

Please sign in to comment.