Skip to content

Commit

Permalink
fixup! Correctly include lib64 library on manylinux archives
Browse files Browse the repository at this point in the history
  • Loading branch information
mgautierfr committed Sep 2, 2024
1 parent d2ab0d9 commit 6227a7e
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions .github/scripts/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,12 @@ def major_version(version: str) -> str:
return version.split(".")[0]


if OS_NAME == "manylinux":
lib_prefix = "lib64/"
else:
lib_prefix = "lib/*/"
# Depending of base distribution, libraries are in "lib64" (redhat base) or "lib/<arch>" (debian base).
# On top of that, when cross-compiling, libraries are always put in `lib/<arch>`.
# As we use this as glob regex to select which files to add to archive, this is not a problem to have both.
def lib_prefix(file):
yield "lib64/" + file
yield "lib/*/" + file


# We have build everything. Now create archives for public deployement.
Expand Down Expand Up @@ -103,15 +105,17 @@ def major_version(version: str) -> str:
"libzim": (
INSTALL_DIR,
(
## Linux (ubuntu based)
## Linux
# We need to package all dependencies (`*.a`) on wasm
lib_prefix + "libzim.a" if COMPILE_CONFIG != "wasm" else lib_prefix + "*.a",
lib_prefix + "libzim.so",
lib_prefix
+ "libzim.so.{version}".format(version=main_project_versions["libzim"]),
lib_prefix
+ "libzim.so.{version}".format(
version=major_version(main_project_versions["libzim"])
*lib_prefix("libzim.a" if COMPILE_CONFIG != "wasm" else "*.a"),
*lib_prefix("libzim.so"),
*lib_prefix(
"libzim.so.{version}".format(version=main_project_versions["libzim"])
),
*lib_prefix(
"libzim.so.{version}".format(
version=major_version(main_project_versions["libzim"])
)
),
## MacOS
"lib/libzim.{}.dylib".format(
Expand Down

0 comments on commit 6227a7e

Please sign in to comment.