From ba882851b8d1e3f8af92560122c621ceb5500ce2 Mon Sep 17 00:00:00 2001 From: HyeongSeok Kim Date: Mon, 9 Dec 2024 13:59:31 +0900 Subject: [PATCH] update python-wheels-*yml, pyproject.toml: remove BEFORE_BUILD, remove numpy in build requires - python-wheels-*yml: When testing on other PRs, I found that dependencies were not properly installed for each build case, so I added this code. However, this PR is for adding numpy dependencies, so it is not needed as @JeanChristopheMorinPerso suggested. - pyproject.toml: If you are going to do any additional work with the build artifacts, like generating stubs, you will need numpy in your build environment, but it is not needed at the moment. I agree with the review by @JeanChristopheMorinPerso. Signed-off-by: HyeongSeok Kim --- .github/workflows/python-wheels-publish-test.yml | 4 ---- .github/workflows/python-wheels-publish.yml | 4 ---- .github/workflows/python-wheels.yml | 4 ---- pyproject.toml | 4 ++-- 4 files changed, 2 insertions(+), 14 deletions(-) diff --git a/.github/workflows/python-wheels-publish-test.yml b/.github/workflows/python-wheels-publish-test.yml index c01fff87b..fd4556446 100644 --- a/.github/workflows/python-wheels-publish-test.yml +++ b/.github/workflows/python-wheels-publish-test.yml @@ -62,10 +62,6 @@ jobs: CIBW_SKIP: "*-win32 *_i686" CIBW_TEST_SKIP: "*-macosx_universal2:arm64" CIBW_ENVIRONMENT: OPENEXR_RELEASE_CANDIDATE_TAG="${{ github.ref_name }}" - CIBW_BEFORE_BUILD: | - pip install tomli - python -c "import tomli; print('\n'.join(tomli.load(open('pyproject.toml', 'rb'))['build-system']['requires']))" > build_requirements.txt && - pip install -r build_requirements.txt - name: Upload artifact uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 diff --git a/.github/workflows/python-wheels-publish.yml b/.github/workflows/python-wheels-publish.yml index 5a2b9bcc1..2cfc1fdb9 100644 --- a/.github/workflows/python-wheels-publish.yml +++ b/.github/workflows/python-wheels-publish.yml @@ -55,10 +55,6 @@ jobs: CIBW_BUILD: "cp37-* cp38-* cp39-* cp310-* cp311-* cp312-*" CIBW_SKIP: "*-win32 *_i686" CIBW_TEST_SKIP: "*arm64" - CIBW_BEFORE_BUILD: | - pip install tomli - python -c "import tomli; print('\n'.join(tomli.load(open('pyproject.toml', 'rb'))['build-system']['requires']))" > build_requirements.txt && - pip install -r build_requirements.txt - name: Upload artifact uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 diff --git a/.github/workflows/python-wheels.yml b/.github/workflows/python-wheels.yml index 751aaf9b6..6bc0c5fc6 100644 --- a/.github/workflows/python-wheels.yml +++ b/.github/workflows/python-wheels.yml @@ -68,10 +68,6 @@ jobs: CIBW_SKIP: "*-win32 *_i686" CIBW_TEST_SKIP: "*-macosx*arm64" OPENEXR_TEST_IMAGE_REPO: "https://raw.githubusercontent.com/AcademySoftwareFoundation/openexr-images/main" - CIBW_BEFORE_BUILD: | - pip install tomli - python -c "import tomli; print('\n'.join(tomli.load(open('pyproject.toml', 'rb'))['build-system']['requires']))" > build_requirements.txt && - pip install -r build_requirements.txt - name: Upload artifact uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 diff --git a/pyproject.toml b/pyproject.toml index 7e011227a..94f475970 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ # Copyright (c) Contributors to the OpenEXR Project. [build-system] -requires = ["scikit-build-core==0.10.7", "pybind11", "numpy"] +requires = ["scikit-build-core==0.10.7", "pybind11"] build-backend = "scikit_build_core.build" [project] @@ -17,7 +17,7 @@ authors = [ requires-python = ">=3.7" dependencies = [ - "numpy>=1.18" + "numpy>=1.7.0" ] [project.urls]