diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dbd248e2..a91458da 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,9 +20,8 @@ jobs: runs-on: ubuntu-latest strategy: - max-parallel: 4 matrix: - python-version: ['3.8', '3.9', '3.10', '3.11'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] requires: ['requirements.txt'] include: - python-version: '3.8' @@ -35,6 +34,7 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} + allow-prereleases: true - name: Install run: | python -m pip install --upgrade pip diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 5c64b33b..1838751d 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -61,7 +61,7 @@ jobs: - [ubuntu-20.04, musllinux_x86_64] - [macos-12, macosx_*] - [windows-2019, win_amd64] - python: ["cp37", "cp38", "cp39", "cp310", "cp311"] + python: ["cp38", "cp39", "cp310", "cp311", "cp312"] include: # Manylinux builds are cheap, do all in one - { buildplat: ["ubuntu-20.04", "manylinux_x86_64"], python: "*" } @@ -71,8 +71,13 @@ jobs: with: fetch-depth: 0 + - uses: actions/setup-python@v3 + + - name: Update pip/pipx + run: pip install --upgrade pip pipx + - name: Build wheel(s) - run: pipx run cibuildwheel + run: pipx run --spec "cibuildwheel>=2.15" cibuildwheel env: CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }} diff --git a/min-requirements.txt b/min-requirements.txt index 368d4dd4..8397e830 100644 --- a/min-requirements.txt +++ b/min-requirements.txt @@ -1,4 +1,6 @@ # Auto-generated by tools/update_requirements.py +--only-binary numpy,scipy +--extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple matplotlib==3.5 numpy==1.22 scipy==1.8 diff --git a/pyproject.toml b/pyproject.toml index 7bf1cb47..41ff9f00 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,11 +3,12 @@ requires = [ "setuptools", "setuptools_scm[toml]>=6.2", "cython", - # Newer than NEP29-minimum: compile against oldest numpy available - "numpy==1.24; python_version >= '3.11'", - "numpy==1.22; python_version >= '3.10' and python_version < '3.11'", - # NEP29-minimum as of Jan 31, 2023 - "numpy==1.21; python_version >= '3.7' and python_version < '3.10'", + "numpy==1.26b1; python_version >= '3.12rc1'", # Until 3.12 and 1.26 are released + # As of numpy 1.25, you can now build against older APIs. + # https://numpy.org/doc/stable/release/1.25.0-notes.html + "numpy>=1.25; python_version > '3.8'", + # NEP29-minimum as of Aug 17, 2023 (1.25 doesn't support 3.8) + "numpy==1.22; python_version == '3.8'", ] build-backend = "setuptools.build_meta" @@ -17,7 +18,7 @@ dynamic = ["version"] description = "Nitime: timeseries analysis for neuroscience data" readme = "README.txt" license = { file = "LICENSE" } -requires-python = ">=3.7" +requires-python = ">=3.8" authors = [ { name = "Nitime developers", email = "neuroimaging@python.org" }, ] diff --git a/requirements.txt b/requirements.txt index 50731b29..48558bbd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,9 @@ # Auto-generated by tools/update_requirements.py +--only-binary numpy,scipy +--extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple matplotlib>=3.5 -numpy>=1.22 +numpy>=1.26.0b1; python_version > '3.11' +numpy>=1.22; python_version <= '3.11' scipy>=1.8 networkx>=2.7 nibabel>=4.0 diff --git a/tools/update_requirements.py b/tools/update_requirements.py index 5992e9f2..92e9e83e 100755 --- a/tools/update_requirements.py +++ b/tools/update_requirements.py @@ -19,12 +19,18 @@ script_name = Path(__file__).relative_to(repo_root) -lines = [f'# Auto-generated by {script_name}', ''] +lines = [ + f'# Auto-generated by {script_name}', + '--only-binary numpy,scipy', + '--extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple', + '', +] +start = len(lines) - 1 # Write requirements -lines[1:-1] = requirements +lines[start:-1] = requirements reqs.write_text('\n'.join(lines)) # Write minimum requirements -lines[1:-1] = [req.replace('>=', '==').replace('~=', '==') for req in requirements] +lines[start:-1] = [req.replace('>=', '==').replace('~=', '==') for req in requirements] min_reqs.write_text('\n'.join(lines))