From ebaab1b1c0fecd02d81d4210fb4b3fa9e879bb11 Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Mon, 22 Apr 2024 00:04:56 +0100 Subject: [PATCH 1/8] Added configuration to build wheels --- .github/workflows/main.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 754745fd..ef32a2be 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,6 +5,7 @@ on: pull_request: jobs: + tests: uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 with: @@ -40,3 +41,16 @@ jobs: runs-on: ubuntu-20.04 - linux: py310-test-bitlevel runs-on: ubuntu-20.04 + + + publish: + uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish.yml@v1 + with: + test_extras: test + test_command: pytest --pyargs hyperion -m -m "not requires_hyperion_binaries" + targets: | + - linux + - macos + - windows + secrets: + pypi_token: ${{ secrets.pypi_token }} From 91112635cc767c168ade24693446bbd82330525d Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Mon, 22 Apr 2024 00:05:33 +0100 Subject: [PATCH 2/8] Build with Numpy 2.0.0rc1 --- pyproject.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 59c1b684..712a15d1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,8 +1,7 @@ [build-system] requires = ["setuptools", "setuptools_scm>=6.2", - "wheel", - "oldest-supported-numpy"] + "numpy>=2.0.0rc1"] build-backend = 'setuptools.build_meta' [tool.setuptools_scm] From 0fe48d469514a1223c4e1bc38e0270dfcb6f7921 Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Mon, 22 Apr 2024 00:10:29 +0100 Subject: [PATCH 3/8] Fixed syntax --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ef32a2be..36192e9b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -47,7 +47,7 @@ jobs: uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish.yml@v1 with: test_extras: test - test_command: pytest --pyargs hyperion -m -m "not requires_hyperion_binaries" + test_command: pytest --pyargs hyperion -m "not requires_hyperion_binaries" targets: | - linux - macos From 128747add251130e7a96b7c9af51237e2466b16c Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Mon, 22 Apr 2024 00:11:39 +0100 Subject: [PATCH 4/8] Don't build Windows wheels for now --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 36192e9b..f0c8f50e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -51,6 +51,6 @@ jobs: targets: | - linux - macos - - windows + #- windows secrets: pypi_token: ${{ secrets.pypi_token }} From 8302d6de40a9c70d188599b20dfc4fcd27c738e9 Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Mon, 22 Apr 2024 09:19:40 +0100 Subject: [PATCH 5/8] Specify which builds to skip for wheels --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 712a15d1..d87416b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,3 +6,6 @@ build-backend = 'setuptools.build_meta' [tool.setuptools_scm] write_to = "hyperion/_version.py" + +[tool.cibuildwheel] +skip = "pp* *-musllinux* *aarch64*" From faa3d37520e226f5bd0f5a3daec9485487a84fff Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Mon, 22 Apr 2024 09:29:03 +0100 Subject: [PATCH 6/8] Don't require yt on Python 3.9 --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 1a823804..e4c4439d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -15,7 +15,7 @@ install_requires = matplotlib>=1.5 astropy>=1.2 h5py>=2.4 - yt>=3.2 + yt>=3.2;python_version>="3.10" decorator [options.extras_require] From 9ff1785455ae99e02a7693a3b6a5884d179b9ac3 Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Mon, 22 Apr 2024 09:39:03 +0100 Subject: [PATCH 7/8] Make yt an optional dependency --- docs/installation/installation.rst | 4 ++-- setup.cfg | 3 ++- tox.ini | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/installation/installation.rst b/docs/installation/installation.rst index b201471b..b9d95c4b 100644 --- a/docs/installation/installation.rst +++ b/docs/installation/installation.rst @@ -96,11 +96,11 @@ Python module Install the Python module with:: - pip install . + pip install ".[recommended]" or:: - pip install . --user + pip install ".[recommended]" --user if you do not have root access. Check that the module installed correctly:: diff --git a/setup.cfg b/setup.cfg index e4c4439d..2d43d0cd 100644 --- a/setup.cfg +++ b/setup.cfg @@ -15,10 +15,11 @@ install_requires = matplotlib>=1.5 astropy>=1.2 h5py>=2.4 - yt>=3.2;python_version>="3.10" decorator [options.extras_require] +recommended = + yt>=3.2 docs = sphinx numpydoc diff --git a/tox.ini b/tox.ini index b7684f2e..36241449 100644 --- a/tox.ini +++ b/tox.ini @@ -18,6 +18,7 @@ setenv = deps = bitlevel: numpy==1.21.* extras = + recommended test: test allowlist_externals = {toxinidir}/configure From 69d2cfe1ff6cc85bc1e5224d6e37f6f52aaeea83 Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Mon, 22 Apr 2024 09:56:12 +0100 Subject: [PATCH 8/8] Skip i686 wheels --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d87416b0..9002c799 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,4 +8,4 @@ build-backend = 'setuptools.build_meta' write_to = "hyperion/_version.py" [tool.cibuildwheel] -skip = "pp* *-musllinux* *aarch64*" +skip = "pp* *-musllinux* *aarch64* *i686*"