From f3549999a9778bb26dbc8b403843868d34214f73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20M=C3=BCller?= Date: Sat, 6 Apr 2024 16:08:45 +0200 Subject: [PATCH] re-enable py38; np2 to build extensions for py>=3.9; check np2 in CI --- .github/workflows/main.yml | 23 +++++++++++++++-------- pyproject.toml | 13 ++++++------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f3bec88e..4df0d64f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -80,30 +80,37 @@ jobs: path: ./dist/*.whl build_sdist: - name: sdist on ${{ matrix.os }} with py ${{ matrix.python-version }} + name: sdist on ${{ matrix.os }} with py ${{ matrix.ver.py }} and numpy ${{ matrix.ver.np }} runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest] - python-version: ['3.9', '3.10', '3.11', '3.12'] - + ver: [{py: '3.8', np: '1' }, {py: '3.9', np: '1'}, {py: '3.10', np: '1'}, {py: '3.11', np: '1'}, {py: '3.12', np: '1'}, {py: '3.12', np: '2'}] steps: - uses: actions/checkout@v2 with: fetch-depth: '0' - - name: Set up Python ${{ matrix.python-version }} + - name: Set up Python ${{ matrix.ver.py }} uses: actions/setup-python@v2 with: - python-version: ${{ matrix.python-version }} + python-version: ${{ matrix.ver.py }} - name: Install dependencies - env: - GSTOOLS_BUILD_PARALLEL: 1 run: | python -m pip install --upgrade pip pip install build coveralls>=3.0.0 + + - name: bleeding edge + if: matrix.ver.np == '2' + run: | + python -m pip install "numpy>=2.0.0rc1" git+https://github.com/dfm/emcee.git + + - name: Install GSTools + env: + GSTOOLS_BUILD_PARALLEL: 1 + run: | pip install -v --editable .[test] - name: Run tests @@ -119,7 +126,7 @@ jobs: python -m build --sdist --outdir dist . - uses: actions/upload-artifact@v2 - if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.9' + if: matrix.os == 'ubuntu-latest' && matrix.ver.py == '3.9' with: path: dist/*.tar.gz diff --git a/pyproject.toml b/pyproject.toml index a99337a2..fc7f1fdb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,14 +2,15 @@ requires = [ "setuptools>=64", "setuptools_scm>=7", - "numpy>=2.0.0rc1", + "numpy>=2.0.0rc1; python_version >= '3.9'", + "numpy==1.19.3; python_version < '3.9'", "Cython>=3.0", "extension-helpers>=1", ] build-backend = "setuptools.build_meta" [project] -requires-python = ">=3.9" +requires-python = ">=3.8" name = "gstools" description = "GSTools: A geostatistical toolbox." authors = [ @@ -45,10 +46,10 @@ classifiers = [ "Topic :: Utilities", ] dependencies = [ - "emcee @ git+https://github.com/MuellerSeb/emcee.git@patch-np2", + "emcee>=3.0.0", "hankel>=1.0.0", "meshio>=5.1.0", - "numpy>=2.0.0rc1", + "numpy>=1.19.3", "pyevtk>=1.1.1", "scipy>=1.1.0", ] @@ -160,11 +161,9 @@ target-version = [ # Switch to using build build-frontend = "build" # Disable building PyPy wheels on all platforms, 32bit for py3.10/11/12, musllinux builds, py3.6/7 -skip = ["cp36-*", "cp37-*", "cp38-*", "pp*", "*-win32", "*-manylinux_i686", "*-musllinux_*"] +skip = ["cp36-*", "cp37-*", "pp*", "*-win32", "*-manylinux_i686", "*-musllinux_*"] # Run the package tests using `pytest` test-extras = "test" test-command = "pytest -v {package}/tests" # Skip trying to test arm64 builds on Intel Macs test-skip = "*-macosx_arm64 *-macosx_universal2:arm64" -# no wheels for linux-32bit anymore for numpy>=1.22 -environment = "PIP_PREFER_BINARY=1"