8000 ENH: Enable musllinux wheels by tgross35 · Pull Request #21200 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

ENH: Enable musllinux wheels #21200

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

Closed
wants to merge 12 commits into from
Closed
Prev Previous commit
Next Next commit
Resolved musl detection with openblas, building locally so far
  • Loading branch information
tgross35 committed May 2, 2022
commit 7b846b0a673167dc00648eb4546075d1377ca2b3
3 changes: 3 additions & 0 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ jobs:
python: "pp38"
- buildplat: [windows-2019, win32]
python: "pp39"
# No musl version of PyPy
- buildplat: [ubuntu-20.04, musllinux_x86_64]
python: "pp38"
env:
IS_32_BIT: ${{ matrix.buildplat[1] == 'win32' }}
IS_PUSH: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
Expand Down
12 changes: 6 additions & 6 deletions tools/openblas_support.py
)
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,11 @@ def get_manylinux(arch):


def download_openblas(target, plat, ilp64):
# print("# BEGIN download_openblas OUTPUT")
# print(f"# platform: {plat}")
osname, arch = plat.split("-")
cibw_build = os.environ.get("CIBW_BUILD", "")
# Auditwheel is the only environment variable that indicates musl. May want
# to add build identifier to env.
# Auditwheel: see: https://cibuildwheel.readthedocs.io/en/stable/options/
auditwheel_plat = os.environ.get("AUDITWHEEL_PLAT", "")
fnsuffix = {None: "", "64_": "64_"}[ilp64]
filename = ""
headers = {
Expand All @@ -78,10 +79,10 @@ def download_openblas(target, plat, ilp64):
}
suffix = None
if "musllinux" in cibw_build:
if "musllinux" in auditwheel_plat:
suffix = f"musllinux_1_1_{arch}.tar.gz"
typ = "tar.gz"
if osname == "linux":
elif osname == "linux":
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Determining the glibc is a bit obscure. Perhaps this should undergo a deeper refactoring to better differentiate between musllinux and manylinux

ml_ver = get_manylinux(arch)
suffix = f"manylinux{ml_ver}_{arch}.tar.gz"
typ = "tar.gz"
Expand All @@ -101,7 +102,6 @@ def download_openblas(target, plat, ilp64):
if not suffix:
return None
filename = f"{BASEURL}/openblas{fnsuffix}-{OPENBLAS_LONG}-{suffix}"
# print(f"# filename: {filename}")
req = Request(url=filename, headers=headers)
try:
response = urlopen(req)
Expand Down
0