Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 11 additions & 0 deletions .github/actions/build-pyinstaller-bundle/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,17 @@ runs:
;;
esac

# The manylinux_2_34 image's binutils 2.41 breaks ELF alignment when
# stripping .so files (https://sourceware.org/bugzilla/show_bug.cgi?id=31208);
# install a fixed strip (>= 2.43) from conda-forge.
- name: Install fixed binutils (strip >= 2.43)
shell: bash
run: |
mkdir -p /tmp/micromamba
curl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xj -C /tmp/micromamba
/tmp/micromamba/bin/micromamba create -y -p /opt/bf -c conda-forge binutils=2.44
echo "/opt/bf/bin" >> "$GITHUB_PATH"

- name: Build PyInstaller bundle
shell: bash
run: |
Expand Down
7 changes: 4 additions & 3 deletions ecc.spec
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ ECC_DIR = Path(SPECPATH)
HOOKS_DIR = ECC_DIR / "hooks"
CODESIGN_IDENTITY = os.environ.get("APPLE_SIGNING_IDENTITY")
BUNDLE_MODE = os.environ.get("ECOS_PYINSTALLER_MODE", "onedir").strip().lower()
STRIP_BINARIES = sys.platform.startswith("linux")

if BUNDLE_MODE not in {"onedir", "onefile"}:
raise SystemExit(f"Unsupported ECOS_PYINSTALLER_MODE={BUNDLE_MODE!r}; use onedir or onefile.")
Expand Down Expand Up @@ -262,7 +263,7 @@ if BUNDLE_MODE == "onedir":
[],
exclude_binaries=True,
name="ecc",
strip=False,
strip=STRIP_BINARIES,
upx=False,
console=True,
codesign_identity=CODESIGN_IDENTITY,
Expand All @@ -273,7 +274,7 @@ if BUNDLE_MODE == "onedir":
a.binaries,
a.zipfiles,
a.datas,
strip=False,
strip=STRIP_BINARIES,
upx=False,
name="ecc",
)
Expand All @@ -286,7 +287,7 @@ else:
a.datas,
[],
name="ecc",
strip=False,
strip=STRIP_BINARIES,
upx=True,
console=True,
codesign_identity=CODESIGN_IDENTITY,
Expand Down
Loading