Skip to content

Commit a5b729f

Browse files
committed
added support for bionic variant (with temp hack)
1 parent b17288d commit a5b729f

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on: [push]
33

44
env:
55
# TODO: use a release (once available)
6-
CIBW_ENVIRONMENT: "LIBZIM_DL_VERSION=2023-04-14"
6+
LIBZIM_DL_VERSION: "2023-04-19"
77

88
jobs:
99
lint:

.github/workflows/wheels.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ on:
88
- published
99

1010
env:
11-
# CIBW_ENVIRONMENT: "LIBZIM_DL_VERSION=8.2.0"
12-
CIBW_ENVIRONMENT: "LIBZIM_DL_VERSION=2023-04-14"
11+
# LIBZIM_DL_VERSION: "8.2.0"
12+
LIBZIM_DL_VERSION: "2023-04-19"
13+
MACOSX_DEPLOYMENT_TARGET: "11.0"
14+
CIBW_ENVIRONMENT_PASS_LINUX: "LIBZIM_DL_VERSION"
1315

1416

1517
jobs:

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ manylinux-pypy_x86_64-image = "manylinux_2_28"
2626
manylinux-pypy_aarch64-image = "manylinux_2_28"
2727

2828
[tool.cibuildwheel.linux]
29-
archs = ["x86_64", "aarch64"]
29+
# TEMP: dont build on aarch64 as we dont have bionic builds yet
30+
archs = ["x86_64"] #, "aarch64"]
3031

3132
[tool.cibuildwheel.macos]
3233
archs = ["x86_64", "arm64"]

setup.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,13 @@ def get_download_filename(self, arch: Optional[str] = None) -> str:
136136
arch = arch or self.arch
137137

138138
lzplatform = {"Darwin": "macos", "Linux": "linux"}.get(self.platform)
139-
if lzplatform == "linux" and self.is_musl:
140-
lzplatform = "linux_musl"
139+
140+
variant = ""
141+
if self.platform == "Linux":
142+
variant = "-musl" if self.is_musl else "-bionic"
141143

142144
return pathlib.Path(
143-
f"libzim_{lzplatform}-{arch}-{self.libzim_dl_version}.tar.gz"
145+
f"libzim_{lzplatform}-{arch}{variant}-{self.libzim_dl_version}.tar.gz"
144146
).name
145147

146148
def download_to_dest(self):
@@ -193,6 +195,9 @@ def _download_and_extract(self, filename: str) -> pathlib.Path:
193195
source_url = "http://download.openzim.org/release/libzim"
194196
if self.is_nightly:
195197
source_url = f"http://download.openzim.org/nightly/{self.libzim_dl_version}"
198+
# TODO: remove once merged
199+
if "bionic" in fpath.name:
200+
source_url = "https://tmp.kiwix.org/ci/libzim_bionic"
196201
url = f"{source_url}/{fpath.name}"
197202

198203
# download a local copy if none present

0 commit comments

Comments
 (0)