-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CI: Add wheels for musllinux (closes #1382) #1461
Conversation
Remove *musllinux* from CIBW_SKIP to instruct cibuildwheel to build wheels for musllinux and adjust proj-compile-wheels.sh script accordingly. cibuildwheel always uses the same image (musllinux_1_2, docs: https://cibuildwheel.pypa.io/en/stable/options/#linux-image) for these builds which is alpine-based. Thus, at least for now, it should be enough to just detect running alpine and add alpine-specific commands to the script where needed.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1461 +/- ##
=======================================
Coverage 96.50% 96.50%
=======================================
Files 20 20
Lines 1830 1830
=======================================
Hits 1766 1766
Misses 64 64 ☔ View full report in Codecov by Sentry. |
Apparently I missed an error from collapse/expand logs
I assume the tests pass regardless because of this line. From my understanding the produced wheel will still work but I'll take a closer look tomorrow to see if I can get shapely to build successfully or ideally install from wheel (how ironic). |
As evident from above logs,
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index 0bea4c1..cdc6f0d 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -153,7 +153,9 @@ jobs:
CIBW_BEFORE_ALL_LINUX: bash ./ci/proj-compile-wheels.sh
CIBW_BEFORE_ALL_MACOS: bash ./ci/proj-compile-wheels.sh
CIBW_TEST_REQUIRES: cython pytest numpy --config-settings=setup-args="-Dallow-noblas=true"
- CIBW_BEFORE_TEST: python -m pip install shapely pandas xarray || echo "Optional requirements install failed"
+ CIBW_BEFORE_TEST: >
+ test -f /etc/alpine-release && apk add geos-dev
+ python -m pip install shapely pandas xarray || echo "Optional requirements install failed"
CIBW_TEST_COMMAND: >
pyproj -v &&
python -c "import pyproj; pyproj.Proj(init='epsg:4269')" && I successfully tested this locally using a modified version of the script I posted initially: #!/usr/bin/env bash
export CIBW_SKIP="pp*-win* pp31*"
export CIBW_ARCHS="x86_64"
export CIBW_ENVIRONMENT_LINUX="PROJ_WHEEL=true PROJ_NETWORK=ON PROJ_VERSION=9.5.0 PROJ_DIR=/project/pyproj/proj_dir"
export CIBW_BEFORE_ALL_LINUX="bash ./ci/proj-compile-wheels.sh"
export CIBW_TEST_REQUIRES="cython pytest numpy --config-settings=setup-args=\"-Dallow-noblas=true\""
export CIBW_BEFORE_TEST="test -f /etc/alpine-release && apk add geos-dev; python -m pip install shapely pandas xarray || echo \"Optional requirements install failed \""
export CIBW_TEST_COMMAND="pyproj -v && python -c \"import pyproj; pyproj.Proj(init='epsg:4269')\" && cp -r {package}/test . && python -m pytest test -v -s"
cibuildwheel
Let me know which approach you prefer or if you have other ideas on how to solve this. |
Thanks @necabo 👍. Since wheels for shapely are coming soon and the tests pass, I think we're okay to proceed without installing geos. |
I wasn't sure if I could safely run github CI on my fork, so there might be some issues that I missed.
I did test these changes locally though using a local installation of
cibuildwheel
and this script:The commit message contains some more information on the changes. Let me know if you have questions or if something is missing.