Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
44754e1
BLD: try cibuildwheel
tangkong Apr 4, 2025
91fbf74
BLD: use cibuildwheel action
tangkong Apr 4, 2025
2b105a7
BLD: make epicscorelibs available before build
tangkong Apr 4, 2025
a8a39bf
BLD: make pyepics available before build
tangkong Apr 4, 2025
d4f0a5f
BLD: pip --no-build-isolation
tangkong Apr 4, 2025
8280bb9
BLD: try explicitly linking LD_LIBRARY_PATH
tangkong Apr 4, 2025
b6d9729
BLD: skip pypy builds
tangkong Apr 4, 2025
41f8d4c
BLD: re-enable wheel repair, expand build matrix
tangkong Apr 7, 2025
62e7197
BLD: adjust before all step, show env for debugging
tangkong Apr 7, 2025
6508706
BLD: move installs to before_build
tangkong Apr 7, 2025
db0e1a7
BLD: set library path right before wheel
tangkong Apr 7, 2025
cdf8e72
BLD: extend library path instead of overwriting
tangkong Apr 7, 2025
3f18074
BLD: clean up unused commands, path setting
tangkong Apr 7, 2025
f80046d
BLD: whoops dangling &&
tangkong Apr 7, 2025
0e8a308
BLD: add windows, macos platforms
tangkong Apr 7, 2025
927b0dc
BLD: use DYLD_LIBRARY_PATH for macos runner
tangkong Apr 7, 2025
7b02faa
BLD: remove windows, pthread not available on windows. Add test impo…
tangkong Apr 7, 2025
dc32d23
BLD: I forgot another &&
tangkong Apr 7, 2025
406817d
BLD: include numpy for conda builds
tangkong Apr 7, 2025
cd059a4
BLD: autoupdate pre-commit
tangkong Apr 7, 2025
7b9db80
BLD/TST: try pinning package version in conda recipe for simplicity o…
tangkong Apr 7, 2025
1a09f48
BLD: fetch-depth=0 to grab all tags
tangkong Apr 8, 2025
4a9357a
BLD: explicitly fetch tags
tangkong Apr 8, 2025
35d630b
BLD: use build to make wheels, try to trigger setuptools_scm
tangkong Apr 8, 2025
502c26e
BLD: use proper isolation flag
tangkong Apr 8, 2025
009107a
BLD: specify all build dependencies
tangkong Apr 8, 2025
d16e97e
BLD: separate build and test workflows, set up framework for twine up…
tangkong Apr 8, 2025
998c149
BLD: rename build wheels workflow
tangkong Apr 8, 2025
b398ed2
BLD: activate wheel build on tag
tangkong Apr 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Build Wheels

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/[email protected]
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/*
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
3 changes: 1 addition & 2 deletions conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -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: ..
Expand Down
11 changes: 11 additions & 0 deletions scripts/get_library_paths.py
Original file line number Diff line number Diff line change
@@ -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()
Loading