diff --git a/.github/workflows/cli-wheels.yml b/.github/workflows/cli-wheels.yml index e4d3e7b4..5b8d15ee 100644 --- a/.github/workflows/cli-wheels.yml +++ b/.github/workflows/cli-wheels.yml @@ -114,6 +114,7 @@ jobs: 3.10 - name: Install non-Rust dependencies run: | + choco install cygwin python maintainer/install-lhapdf.py - name: Build wheels uses: PyO3/maturin-action@v1 diff --git a/maintainer/.gitignore b/maintainer/.gitignore new file mode 100644 index 00000000..c18dd8d8 --- /dev/null +++ b/maintainer/.gitignore @@ -0,0 +1 @@ +__pycache__/ diff --git a/maintainer/install-lhapdf.py b/maintainer/install_lhapdf.py similarity index 89% rename from maintainer/install-lhapdf.py rename to maintainer/install_lhapdf.py index 66e13545..08c79688 100644 --- a/maintainer/install-lhapdf.py +++ b/maintainer/install_lhapdf.py @@ -37,14 +37,16 @@ def run_(cmd, *args, **kwargs): cmd = cmd.split() if isinstance(cmd, str) else cmd run(cmd, *args, cwd=path / SRC_DIR, **kwargs) + log.info("Autoreconf...") run_("autoreconf -f -i") prefix = os.environ.get("PREFIX") prefix_ = ["--prefix", prefix] if prefix is not None else [] + log.info("Configuring...") run_(["./configure"] + prefix_, env={"PYTHON": sys.executable}) - log.info("Configured") + log.info("Building...") run_("make clean") run_("make -j") - log.info("Built") + log.info("Installing...") run_("make install") log.info("Installed") @@ -55,7 +57,7 @@ def main(): log.info(f"Downloaded {HOST}{PATH}") with tempfile.TemporaryDirectory() as tmpd: tarfile.open(fileobj=io.BytesIO(tar), mode="r:gz").extractall(tmpd) - log.info(f"Extracted LHAPDF tarbal in {tmpd}") + log.info(f"Extracted LHAPDF tarball in {tmpd}") install(Path(tmpd)) diff --git a/maintainer/patch-binary-wheel.py b/maintainer/patch_binary_wheel.py similarity index 99% rename from maintainer/patch-binary-wheel.py rename to maintainer/patch_binary_wheel.py index 62dcfbf3..00da4be6 100644 --- a/maintainer/patch-binary-wheel.py +++ b/maintainer/patch_binary_wheel.py @@ -15,11 +15,12 @@ log = logging.getLogger("binary-patch") log.setLevel(logging.INFO) -WRAPPER = """ +WRAPPER = """\ #!python import os import sys import sysconfig + if __name__ == "__main__": os.execv( os.path.join(sysconfig.get_path("platlib"), {binary_path!r}),