From 44754e187a49bf36b53380426cf54bbf29255e2e Mon Sep 17 00:00:00 2001 From: tangkong Date: Fri, 4 Apr 2025 13:15:59 -0700 Subject: [PATCH 01/29] BLD: try cibuildwheel --- .github/workflows/standard.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/standard.yml b/.github/workflows/standard.yml index a22e08a..15e3d7c 100644 --- a/.github/workflows/standard.yml +++ b/.github/workflows/standard.yml @@ -62,3 +62,26 @@ jobs: deploy-on-success: ${{ matrix.deploy-on-success || false }} system-packages: "" testing-extras: "" + + build_wheels: + name: Build wheels on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-latest] + + steps: + - uses: actions/checkout@v4 + + # Used to host cibuildwheel + - uses: actions/setup-python@v5 + - name: Install cibuildwheel + run: python -m pip install cibuildwheel==2.23.2 + + - name: Build wheels + run: python -m cibuildwheel --output-dir wheelhouse + + - uses: actions/upload-artifact@v4 + with: + name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} + path: ./wheelhouse/*.whl From 91fbf747e7da4fb86b2b24271055eaea2d8ca71c Mon Sep 17 00:00:00 2001 From: tangkong Date: Fri, 4 Apr 2025 13:26:29 -0700 Subject: [PATCH 02/29] BLD: use cibuildwheel action --- .github/workflows/standard.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/standard.yml b/.github/workflows/standard.yml index 15e3d7c..ccdd273 100644 --- a/.github/workflows/standard.yml +++ b/.github/workflows/standard.yml @@ -72,14 +72,16 @@ jobs: steps: - uses: actions/checkout@v4 - - # Used to host cibuildwheel - - uses: actions/setup-python@v5 - - name: Install cibuildwheel - run: python -m pip install cibuildwheel==2.23.2 - + - name: Build wheels - run: python -m cibuildwheel --output-dir wheelhouse + uses: pypa/cibuildwheel@v2.23.2 + # env: + # CIBW_SOME_OPTION: value + # ... + with: + package-dir: . + output-dir: wheelhouse + config-file: "{package}/pyproject.toml" - uses: actions/upload-artifact@v4 with: From 2b105a7d1f04ebc677761a30ca74dc203335fafa Mon Sep 17 00:00:00 2001 From: tangkong Date: Fri, 4 Apr 2025 13:57:10 -0700 Subject: [PATCH 03/29] BLD: make epicscorelibs available before build --- .github/workflows/standard.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/standard.yml b/.github/workflows/standard.yml index ccdd273..70f73dc 100644 --- a/.github/workflows/standard.yml +++ b/.github/workflows/standard.yml @@ -68,16 +68,16 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-latest] + os: [ubuntu-latest] steps: - uses: actions/checkout@v4 - name: Build wheels uses: pypa/cibuildwheel@v2.23.2 - # env: - # CIBW_SOME_OPTION: value - # ... + env: + CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 + CIBW_BEFORE_BUILD: pip install setuptools_dso epicscorelibs with: package-dir: . output-dir: wheelhouse From a8a39bf84635058695822c4ea5ff7ec435a0fd04 Mon Sep 17 00:00:00 2001 From: tangkong Date: Fri, 4 Apr 2025 14:01:07 -0700 Subject: [PATCH 04/29] BLD: make pyepics available before build --- .github/workflows/standard.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/standard.yml b/.github/workflows/standard.yml index 70f73dc..e0a7f7d 100644 --- a/.github/workflows/standard.yml +++ b/.github/workflows/standard.yml @@ -77,7 +77,7 @@ jobs: uses: pypa/cibuildwheel@v2.23.2 env: CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 - CIBW_BEFORE_BUILD: pip install setuptools_dso epicscorelibs + CIBW_BEFORE_BUILD: pip install setuptools_dso epicscorelibs pyepics with: package-dir: . output-dir: wheelhouse From d4f0a5fa79a464185ead064f38fafb7db353c6c2 Mon Sep 17 00:00:00 2001 From: tangkong Date: Fri, 4 Apr 2025 14:25:09 -0700 Subject: [PATCH 05/29] BLD: pip --no-build-isolation --- .github/workflows/standard.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/standard.yml b/.github/workflows/standard.yml index e0a7f7d..9b06053 100644 --- a/.github/workflows/standard.yml +++ b/.github/workflows/standard.yml @@ -76,6 +76,7 @@ jobs: - name: Build wheels uses: pypa/cibuildwheel@v2.23.2 env: + CIBW_BUILD_FRONTEND: "pip; args: --no-build-isolation" CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 CIBW_BEFORE_BUILD: pip install setuptools_dso epicscorelibs pyepics with: From 8280bb90ace73cf80afbbf5c6af1a1edad7692c2 Mon Sep 17 00:00:00 2001 From: tangkong Date: Fri, 4 Apr 2025 15:44:06 -0700 Subject: [PATCH 06/29] BLD: try explicitly linking LD_LIBRARY_PATH --- .github/workflows/standard.yml | 5 ++++- scripts/get_library_paths.py | 11 +++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 scripts/get_library_paths.py diff --git a/.github/workflows/standard.yml b/.github/workflows/standard.yml index 9b06053..0e63075 100644 --- a/.github/workflows/standard.yml +++ b/.github/workflows/standard.yml @@ -78,7 +78,10 @@ jobs: env: CIBW_BUILD_FRONTEND: "pip; args: --no-build-isolation" CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 - CIBW_BEFORE_BUILD: pip install setuptools_dso epicscorelibs pyepics + CIBW_BEFORE_BUILD: > + pip install setuptools_dso epicscorelibs pyepics && + export LD_LIBRARY_PATH=$(python scripts/get_library_paths.py) + CIBW_REPAIR_WHEEL_COMMAND_LINUX: "" with: package-dir: . output-dir: wheelhouse diff --git a/scripts/get_library_paths.py b/scripts/get_library_paths.py new file mode 100644 index 0000000..8361afe --- /dev/null +++ b/scripts/get_library_paths.py @@ -0,0 +1,11 @@ + +def get_library_paths(): + try: + from epicscorelibs.path import lib_path + print(lib_path) + except ImportError: + return + + +if __name__ == "__main__": + get_library_paths() \ No newline at end of file From b6d9729890798cb9b5f9290bff00f96b7182bfc8 Mon Sep 17 00:00:00 2001 From: tangkong Date: Fri, 4 Apr 2025 16:28:05 -0700 Subject: [PATCH 07/29] BLD: skip pypy builds --- .github/workflows/standard.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/standard.yml b/.github/workflows/standard.yml index 0e63075..8f58024 100644 --- a/.github/workflows/standard.yml +++ b/.github/workflows/standard.yml @@ -76,6 +76,7 @@ jobs: - name: Build wheels uses: pypa/cibuildwheel@v2.23.2 env: + CIBW_SKIP: pp* CIBW_BUILD_FRONTEND: "pip; args: --no-build-isolation" CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 CIBW_BEFORE_BUILD: > From 41f8d4c3bee8fe74d24109c40b727b0a6edab9c0 Mon Sep 17 00:00:00 2001 From: tangkong Date: Mon, 7 Apr 2025 09:23:49 -0700 Subject: [PATCH 08/29] BLD: re-enable wheel repair, expand build matrix --- .github/workflows/standard.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/standard.yml b/.github/workflows/standard.yml index 8f58024..4cb7f0b 100644 --- a/.github/workflows/standard.yml +++ b/.github/workflows/standard.yml @@ -68,7 +68,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest] + os: [macos-14, windows-latest, ubuntu-latest] steps: - uses: actions/checkout@v4 @@ -82,7 +82,6 @@ jobs: CIBW_BEFORE_BUILD: > pip install setuptools_dso epicscorelibs pyepics && export LD_LIBRARY_PATH=$(python scripts/get_library_paths.py) - CIBW_REPAIR_WHEEL_COMMAND_LINUX: "" with: package-dir: . output-dir: wheelhouse From 62e71970410d693b63608fd2d8a86b04083dcb33 Mon Sep 17 00:00:00 2001 From: tangkong Date: Mon, 7 Apr 2025 09:42:54 -0700 Subject: [PATCH 09/29] BLD: adjust before all step, show env for debugging --- .github/workflows/standard.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/standard.yml b/.github/workflows/standard.yml index 4cb7f0b..c5da288 100644 --- a/.github/workflows/standard.yml +++ b/.github/workflows/standard.yml @@ -68,7 +68,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-14, windows-latest, ubuntu-latest] + os: [ubuntu-latest] steps: - uses: actions/checkout@v4 @@ -79,9 +79,14 @@ jobs: CIBW_SKIP: pp* CIBW_BUILD_FRONTEND: "pip; args: --no-build-isolation" CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 - CIBW_BEFORE_BUILD: > - pip install setuptools_dso epicscorelibs pyepics && - export LD_LIBRARY_PATH=$(python scripts/get_library_paths.py) + CIBW_BEFORE_ALL_LINUX: > + pip install setuptools_dso epicscorelibs && + export LD_LIBRARY_PATH=$(python scripts/get_library_paths.py) && + env | grep LIBRARY + CIBW_REPAIR_WHEEL_COMMAND: > + env | grep LIBRARY && + auditwheel repair -w {dest_dir} {wheel} + with: package-dir: . output-dir: wheelhouse From 650870664736b2e66e4844732f0d5d893c042dff Mon Sep 17 00:00:00 2001 From: tangkong Date: Mon, 7 Apr 2025 10:23:54 -0700 Subject: [PATCH 10/29] BLD: move installs to before_build --- .github/workflows/standard.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/standard.yml b/.github/workflows/standard.yml index c5da288..7a02395 100644 --- a/.github/workflows/standard.yml +++ b/.github/workflows/standard.yml @@ -79,6 +79,10 @@ jobs: CIBW_SKIP: pp* CIBW_BUILD_FRONTEND: "pip; args: --no-build-isolation" CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 + CIBW_BEFORE_BUILD_LINUX: > + pip install setuptools_dso epicscorelibs && + export LD_LIBRARY_PATH=$(python scripts/get_library_paths.py) && + env | grep LIBRARY CIBW_BEFORE_ALL_LINUX: > pip install setuptools_dso epicscorelibs && export LD_LIBRARY_PATH=$(python scripts/get_library_paths.py) && From db0e1a75bcfcd334c0debc8b4714eb74ce6cd62f Mon Sep 17 00:00:00 2001 From: tangkong Date: Mon, 7 Apr 2025 10:29:32 -0700 Subject: [PATCH 11/29] BLD: set library path right before wheel --- .github/workflows/standard.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/standard.yml b/.github/workflows/standard.yml index 7a02395..b8f381b 100644 --- a/.github/workflows/standard.yml +++ b/.github/workflows/standard.yml @@ -88,6 +88,7 @@ jobs: export LD_LIBRARY_PATH=$(python scripts/get_library_paths.py) && env | grep LIBRARY CIBW_REPAIR_WHEEL_COMMAND: > + export LD_LIBRARY_PATH=$(python scripts/get_library_paths.py) && env | grep LIBRARY && auditwheel repair -w {dest_dir} {wheel} From cdf8e720da2dea530287ab3dbafe9bb8dfd7d3ea Mon Sep 17 00:00:00 2001 From: tangkong Date: Mon, 7 Apr 2025 10:31:56 -0700 Subject: [PATCH 12/29] BLD: extend library path instead of overwriting --- .github/workflows/standard.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/standard.yml b/.github/workflows/standard.yml index b8f381b..ecc5bd7 100644 --- a/.github/workflows/standard.yml +++ b/.github/workflows/standard.yml @@ -81,14 +81,14 @@ jobs: CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 CIBW_BEFORE_BUILD_LINUX: > pip install setuptools_dso epicscorelibs && - export LD_LIBRARY_PATH=$(python scripts/get_library_paths.py) && + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(python scripts/get_library_paths.py) && env | grep LIBRARY CIBW_BEFORE_ALL_LINUX: > pip install setuptools_dso epicscorelibs && - export LD_LIBRARY_PATH=$(python scripts/get_library_paths.py) && + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(python scripts/get_library_paths.py) && env | grep LIBRARY CIBW_REPAIR_WHEEL_COMMAND: > - export LD_LIBRARY_PATH=$(python scripts/get_library_paths.py) && + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(python scripts/get_library_paths.py) && env | grep LIBRARY && auditwheel repair -w {dest_dir} {wheel} From 3f1807439221fda4080e8c7da2b1b253aff1166c Mon Sep 17 00:00:00 2001 From: tangkong Date: Mon, 7 Apr 2025 10:38:47 -0700 Subject: [PATCH 13/29] BLD: clean up unused commands, path setting --- .github/workflows/standard.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/standard.yml b/.github/workflows/standard.yml index ecc5bd7..677148f 100644 --- a/.github/workflows/standard.yml +++ b/.github/workflows/standard.yml @@ -81,12 +81,6 @@ jobs: CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 CIBW_BEFORE_BUILD_LINUX: > pip install setuptools_dso epicscorelibs && - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(python scripts/get_library_paths.py) && - env | grep LIBRARY - CIBW_BEFORE_ALL_LINUX: > - pip install setuptools_dso epicscorelibs && - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(python scripts/get_library_paths.py) && - env | grep LIBRARY CIBW_REPAIR_WHEEL_COMMAND: > export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(python scripts/get_library_paths.py) && env | grep LIBRARY && From f80046d369d09969084bc57da5913188d2f20f1f Mon Sep 17 00:00:00 2001 From: tangkong Date: Mon, 7 Apr 2025 10:40:54 -0700 Subject: [PATCH 14/29] BLD: whoops dangling && --- .github/workflows/standard.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/standard.yml b/.github/workflows/standard.yml index 677148f..cb13891 100644 --- a/.github/workflows/standard.yml +++ b/.github/workflows/standard.yml @@ -80,7 +80,7 @@ jobs: CIBW_BUILD_FRONTEND: "pip; args: --no-build-isolation" CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 CIBW_BEFORE_BUILD_LINUX: > - pip install setuptools_dso epicscorelibs && + pip install setuptools_dso epicscorelibs CIBW_REPAIR_WHEEL_COMMAND: > export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(python scripts/get_library_paths.py) && env | grep LIBRARY && From 0e8a3081f91023b2637ae2b2007b27ed1d151cea Mon Sep 17 00:00:00 2001 From: tangkong Date: Mon, 7 Apr 2025 11:14:08 -0700 Subject: [PATCH 15/29] BLD: add windows, macos platforms --- .github/workflows/standard.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/standard.yml b/.github/workflows/standard.yml index cb13891..2d143ff 100644 --- a/.github/workflows/standard.yml +++ b/.github/workflows/standard.yml @@ -68,7 +68,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest] + os: [windows-latest, macos-14, ubuntu-latest] steps: - uses: actions/checkout@v4 @@ -79,12 +79,16 @@ jobs: CIBW_SKIP: pp* CIBW_BUILD_FRONTEND: "pip; args: --no-build-isolation" CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 - CIBW_BEFORE_BUILD_LINUX: > + CIBW_BEFORE_BUILD: > pip install setuptools_dso epicscorelibs - CIBW_REPAIR_WHEEL_COMMAND: > + CIBW_REPAIR_WHEEL_COMMAND_LINUX: > export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(python scripts/get_library_paths.py) && env | grep LIBRARY && auditwheel repair -w {dest_dir} {wheel} + CIBW_REPAIR_WHEEL_COMMAND_MACOS: > + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(python scripts/get_library_paths.py) && + env | grep LIBRARY && + delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} with: package-dir: . From 927b0dc9a1a351d9b98f3d7b7b22d70db8a9fd98 Mon Sep 17 00:00:00 2001 From: tangkong Date: Mon, 7 Apr 2025 11:26:15 -0700 Subject: [PATCH 16/29] BLD: use DYLD_LIBRARY_PATH for macos runner --- .github/workflows/standard.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/standard.yml b/.github/workflows/standard.yml index 2d143ff..13ff28d 100644 --- a/.github/workflows/standard.yml +++ b/.github/workflows/standard.yml @@ -86,7 +86,7 @@ jobs: env | grep LIBRARY && auditwheel repair -w {dest_dir} {wheel} CIBW_REPAIR_WHEEL_COMMAND_MACOS: > - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(python scripts/get_library_paths.py) && + export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$(python scripts/get_library_paths.py) && env | grep LIBRARY && delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} From 7b02faa8fd4358935d6b6d94a521714eb05b87d1 Mon Sep 17 00:00:00 2001 From: tangkong Date: Mon, 7 Apr 2025 11:47:41 -0700 Subject: [PATCH 17/29] BLD: remove windows, pthread not available on windows. Add test import command --- .github/workflows/standard.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/standard.yml b/.github/workflows/standard.yml index 13ff28d..73a5627 100644 --- a/.github/workflows/standard.yml +++ b/.github/workflows/standard.yml @@ -68,7 +68,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [windows-latest, macos-14, ubuntu-latest] + os: [ubuntu-latest, macos-14] steps: - uses: actions/checkout@v4 @@ -89,6 +89,10 @@ jobs: export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$(python scripts/get_library_paths.py) && env | grep LIBRARY && delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} + CIBW_TEST_COMMAND: > + echo "wheel installed" && + python -c "import pyca; print(pyca)" + python -c "import psp; print(psp)" with: package-dir: . From dc32d23644bd925565472b1d2b4263ea88957ef5 Mon Sep 17 00:00:00 2001 From: tangkong Date: Mon, 7 Apr 2025 11:49:47 -0700 Subject: [PATCH 18/29] BLD: I forgot another && --- .github/workflows/standard.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/standard.yml b/.github/workflows/standard.yml index 73a5627..eb34e1f 100644 --- a/.github/workflows/standard.yml +++ b/.github/workflows/standard.yml @@ -91,7 +91,7 @@ jobs: delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} CIBW_TEST_COMMAND: > echo "wheel installed" && - python -c "import pyca; print(pyca)" + python -c "import pyca; print(pyca)" && python -c "import psp; print(psp)" with: From 406817df83b3ec955d6561ee19d157a868a1c2b3 Mon Sep 17 00:00:00 2001 From: tangkong Date: Mon, 7 Apr 2025 12:02:11 -0700 Subject: [PATCH 19/29] BLD: include numpy for conda builds --- .github/workflows/standard.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/standard.yml b/.github/workflows/standard.yml index eb34e1f..11be390 100644 --- a/.github/workflows/standard.yml +++ b/.github/workflows/standard.yml @@ -36,7 +36,7 @@ jobs: experimental: ${{ matrix.experimental || false }} deploy-on-success: ${{ matrix.deploy-on-success || false }} testing-extras: "" - system-packages: "" + system-packages: "numpy" use-setuptools-scm: true pip-test: From cd059a4b972f19bfacf890a65aa66b277b3d0fc6 Mon Sep 17 00:00:00 2001 From: tangkong Date: Mon, 7 Apr 2025 12:03:23 -0700 Subject: [PATCH 20/29] BLD: autoupdate pre-commit --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a079ad8..867adcd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,7 +7,7 @@ exclude: | repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: no-commit-to-branch - id: trailing-whitespace @@ -23,11 +23,11 @@ repos: - id: debug-statements - repo: https://github.com/pycqa/flake8.git - rev: 7.0.0 + rev: 7.2.0 hooks: - id: flake8 - repo: https://github.com/timothycrosley/isort - rev: 5.13.2 + rev: 6.0.1 hooks: - id: isort From 7b9db80131e71bb730e5551f5a1023a11be27799 Mon Sep 17 00:00:00 2001 From: tangkong Date: Mon, 7 Apr 2025 12:43:16 -0700 Subject: [PATCH 21/29] BLD/TST: try pinning package version in conda recipe for simplicity of build. --- .github/workflows/standard.yml | 2 +- conda-recipe/meta.yaml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/standard.yml b/.github/workflows/standard.yml index 11be390..eb34e1f 100644 --- a/.github/workflows/standard.yml +++ b/.github/workflows/standard.yml @@ -36,7 +36,7 @@ jobs: experimental: ${{ matrix.experimental || false }} deploy-on-success: ${{ matrix.deploy-on-success || false }} testing-extras: "" - system-packages: "numpy" + system-packages: "" use-setuptools-scm: true pip-test: diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index 9ecbe12..88d2761 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -1,10 +1,9 @@ {% set package_name = "pyca" %} {% set import_name = "pyca" %} -{% set data = load_setup_py_data() %} package: name: {{ package_name }} - version: {{ data.get('version') }} + version: "3.3.1" source: path: .. From 1a09f48ea793c321ac182f90cdc257606f79ccfd Mon Sep 17 00:00:00 2001 From: tangkong Date: Mon, 7 Apr 2025 17:27:09 -0700 Subject: [PATCH 22/29] BLD: fetch-depth=0 to grab all tags --- .github/workflows/standard.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/standard.yml b/.github/workflows/standard.yml index eb34e1f..e087573 100644 --- a/.github/workflows/standard.yml +++ b/.github/workflows/standard.yml @@ -72,7 +72,9 @@ jobs: steps: - uses: actions/checkout@v4 - + with: + fetch-depth: 0 + - name: Build wheels uses: pypa/cibuildwheel@v2.23.2 env: @@ -81,11 +83,11 @@ jobs: CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 CIBW_BEFORE_BUILD: > pip install setuptools_dso epicscorelibs - CIBW_REPAIR_WHEEL_COMMAND_LINUX: > + CIBW_REPAIR_WHEEL_COMMAND_LINUX: > export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(python scripts/get_library_paths.py) && env | grep LIBRARY && auditwheel repair -w {dest_dir} {wheel} - CIBW_REPAIR_WHEEL_COMMAND_MACOS: > + CIBW_REPAIR_WHEEL_COMMAND_MACOS: > export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$(python scripts/get_library_paths.py) && env | grep LIBRARY && delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} @@ -93,7 +95,7 @@ jobs: echo "wheel installed" && python -c "import pyca; print(pyca)" && python -c "import psp; print(psp)" - + with: package-dir: . output-dir: wheelhouse From 4a9357aceec054f3a18294dd1ab774ad8a699926 Mon Sep 17 00:00:00 2001 From: tangkong Date: Mon, 7 Apr 2025 17:29:50 -0700 Subject: [PATCH 23/29] BLD: explicitly fetch tags --- .github/workflows/standard.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/standard.yml b/.github/workflows/standard.yml index e087573..e94422f 100644 --- a/.github/workflows/standard.yml +++ b/.github/workflows/standard.yml @@ -74,6 +74,7 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 + fetch-tags: true - name: Build wheels uses: pypa/cibuildwheel@v2.23.2 From 35d630b1c3c802b5cf94c81dce0507d5969b8b9c Mon Sep 17 00:00:00 2001 From: tangkong Date: Tue, 8 Apr 2025 11:06:29 -0700 Subject: [PATCH 24/29] BLD: use build to make wheels, try to trigger setuptools_scm --- .github/workflows/standard.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/standard.yml b/.github/workflows/standard.yml index e94422f..ae388b0 100644 --- a/.github/workflows/standard.yml +++ b/.github/workflows/standard.yml @@ -80,7 +80,7 @@ jobs: uses: pypa/cibuildwheel@v2.23.2 env: CIBW_SKIP: pp* - CIBW_BUILD_FRONTEND: "pip; args: --no-build-isolation" + CIBW_BUILD_FRONTEND: "build; args: --no-build-isolation" CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 CIBW_BEFORE_BUILD: > pip install setuptools_dso epicscorelibs From 502c26e9f657c468ca59f1b1d23f7b4009489dac Mon Sep 17 00:00:00 2001 From: tangkong Date: Tue, 8 Apr 2025 11:10:45 -0700 Subject: [PATCH 25/29] BLD: use proper isolation flag --- .github/workflows/standard.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/standard.yml b/.github/workflows/standard.yml index ae388b0..d834065 100644 --- a/.github/workflows/standard.yml +++ b/.github/workflows/standard.yml @@ -80,7 +80,7 @@ jobs: uses: pypa/cibuildwheel@v2.23.2 env: CIBW_SKIP: pp* - CIBW_BUILD_FRONTEND: "build; args: --no-build-isolation" + CIBW_BUILD_FRONTEND: "build; args: --no-isolation" CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 CIBW_BEFORE_BUILD: > pip install setuptools_dso epicscorelibs From 009107aa55d6cc7cd24fe79992880c11de389106 Mon Sep 17 00:00:00 2001 From: tangkong Date: Tue, 8 Apr 2025 11:15:08 -0700 Subject: [PATCH 26/29] BLD: specify all build dependencies --- .github/workflows/standard.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/standard.yml b/.github/workflows/standard.yml index d834065..5aeb993 100644 --- a/.github/workflows/standard.yml +++ b/.github/workflows/standard.yml @@ -83,7 +83,7 @@ jobs: CIBW_BUILD_FRONTEND: "build; args: --no-isolation" CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 CIBW_BEFORE_BUILD: > - pip install setuptools_dso epicscorelibs + pip install "setuptools_dso" "epicscorelibs" "setuptools_scm[toml]>=6.2" "numpy>1.23" "setuptools>=45" CIBW_REPAIR_WHEEL_COMMAND_LINUX: > export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(python scripts/get_library_paths.py) && env | grep LIBRARY && From d16e97ee414d7e11e09d4ad07993c55cc30d0733 Mon Sep 17 00:00:00 2001 From: tangkong Date: Tue, 8 Apr 2025 12:17:20 -0700 Subject: [PATCH 27/29] BLD: separate build and test workflows, set up framework for twine uploads --- .github/workflows/build_wheels.yml | 66 ++++++++++++++++++++++++++++++ .github/workflows/standard.yml | 44 -------------------- 2 files changed, 66 insertions(+), 44 deletions(-) create mode 100644 .github/workflows/build_wheels.yml diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml new file mode 100644 index 0000000..654bc13 --- /dev/null +++ b/.github/workflows/build_wheels.yml @@ -0,0 +1,66 @@ +name: PCDS Standard Testing + +on: + push: + pull_request: + release: + types: + - created + +jobs: + build_wheels: + name: Build wheels on ${{ matrix.os }} + # only build / deploy wheels on tag event + # if: startsWith(github.event.ref, 'refs/tags') + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-14] + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build wheels + uses: pypa/cibuildwheel@v2.23.2 + env: + CIBW_SKIP: pp* + CIBW_BUILD_FRONTEND: "build; args: --no-isolation" + CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 + CIBW_BEFORE_BUILD: > + pip install "setuptools_dso" "epicscorelibs" "setuptools_scm[toml]>=6.2" "numpy>1.23" "setuptools>=45" + CIBW_REPAIR_WHEEL_COMMAND_LINUX: > + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(python scripts/get_library_paths.py) && + env | grep LIBRARY && + auditwheel repair -w {dest_dir} {wheel} + CIBW_REPAIR_WHEEL_COMMAND_MACOS: > + export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$(python scripts/get_library_paths.py) && + env | grep LIBRARY && + delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} + CIBW_TEST_COMMAND: > + echo "wheel installed" && + python -c "import pyca; print(pyca)" && + python -c "import psp; print(psp)" + + with: + package-dir: . + output-dir: wheelhouse + config-file: "{package}/pyproject.toml" + + - uses: actions/upload-artifact@v4 + with: + name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} + path: ./wheelhouse/*.whl + + # - name: PyPI deployment + # env: + # TWINE_USERNAME: __token__ + # TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} + # run: | + # if [ -z "$TWINE_PASSWORD" ]; then + # echo "# No PYPI_TOKEN secret in job!" | tee -a "$GITHUB_STEP_SUMMARY" + # exit 1 + # fi + # twine upload --verbose dist/* diff --git a/.github/workflows/standard.yml b/.github/workflows/standard.yml index 5aeb993..a22e08a 100644 --- a/.github/workflows/standard.yml +++ b/.github/workflows/standard.yml @@ -62,47 +62,3 @@ jobs: deploy-on-success: ${{ matrix.deploy-on-success || false }} system-packages: "" testing-extras: "" - - build_wheels: - name: Build wheels on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, macos-14] - - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - fetch-tags: true - - - name: Build wheels - uses: pypa/cibuildwheel@v2.23.2 - env: - CIBW_SKIP: pp* - CIBW_BUILD_FRONTEND: "build; args: --no-isolation" - CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 - CIBW_BEFORE_BUILD: > - pip install "setuptools_dso" "epicscorelibs" "setuptools_scm[toml]>=6.2" "numpy>1.23" "setuptools>=45" - CIBW_REPAIR_WHEEL_COMMAND_LINUX: > - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(python scripts/get_library_paths.py) && - env | grep LIBRARY && - auditwheel repair -w {dest_dir} {wheel} - CIBW_REPAIR_WHEEL_COMMAND_MACOS: > - export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$(python scripts/get_library_paths.py) && - env | grep LIBRARY && - delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} - CIBW_TEST_COMMAND: > - echo "wheel installed" && - python -c "import pyca; print(pyca)" && - python -c "import psp; print(psp)" - - with: - package-dir: . - output-dir: wheelhouse - config-file: "{package}/pyproject.toml" - - - uses: actions/upload-artifact@v4 - with: - name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} - path: ./wheelhouse/*.whl From 998c149517937dfe9718e2129f933d9d5ee337d3 Mon Sep 17 00:00:00 2001 From: tangkong Date: Tue, 8 Apr 2025 12:19:38 -0700 Subject: [PATCH 28/29] BLD: rename build wheels workflow --- .github/workflows/build_wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 654bc13..b958f7d 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -1,4 +1,4 @@ -name: PCDS Standard Testing +name: Build Wheels on: push: From b398ed221222fb7620b9f930a32fe413a43efb31 Mon Sep 17 00:00:00 2001 From: tangkong Date: Thu, 10 Apr 2025 14:21:00 -0700 Subject: [PATCH 29/29] BLD: activate wheel build on tag --- .github/workflows/build_wheels.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index b958f7d..f159153 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -11,7 +11,7 @@ jobs: build_wheels: name: Build wheels on ${{ matrix.os }} # only build / deploy wheels on tag event - # if: startsWith(github.event.ref, 'refs/tags') + if: startsWith(github.event.ref, 'refs/tags') runs-on: ${{ matrix.os }} strategy: matrix: @@ -54,13 +54,13 @@ jobs: name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} path: ./wheelhouse/*.whl - # - name: PyPI deployment - # env: - # TWINE_USERNAME: __token__ - # TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} - # run: | - # if [ -z "$TWINE_PASSWORD" ]; then - # echo "# No PYPI_TOKEN secret in job!" | tee -a "$GITHUB_STEP_SUMMARY" - # exit 1 - # fi - # twine upload --verbose dist/* + - name: PyPI deployment + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} + run: | + if [ -z "$TWINE_PASSWORD" ]; then + echo "# No PYPI_TOKEN secret in job!" | tee -a "$GITHUB_STEP_SUMMARY" + exit 1 + fi + twine upload --verbose dist/*