From a125278681c280f7002e9bfe27aac7ca7d1ae18f Mon Sep 17 00:00:00 2001 From: Felix Hekhorn Date: Mon, 19 Jun 2023 16:00:47 +0200 Subject: [PATCH 1/2] Skip lhapdf_conf if env is set --- src/pinefarm/install.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pinefarm/install.py b/src/pinefarm/install.py index 6ee7ecc..790a44f 100644 --- a/src/pinefarm/install.py +++ b/src/pinefarm/install.py @@ -258,6 +258,9 @@ def lhapdf_conf(pdf): LHAPDF name of the required PDF """ + # user settings *always* take precedence + if os.environ["LHAPDF_DATA_PATH"]: + return if shutil.which("lhapdf-config") is not None or pkgconfig.exists("lhapdf"): lhapdf_data = pathlib.Path( subprocess.run("lhapdf-config --datadir".split(), capture_output=True) From f2ec83a88ead73e1d0199ee9d5de10c247a2a797 Mon Sep 17 00:00:00 2001 From: Felix Hekhorn Date: Tue, 20 Jun 2023 11:22:21 +0200 Subject: [PATCH 2/2] Update src/pinefarm/install.py Co-authored-by: Alessandro Candido --- src/pinefarm/install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pinefarm/install.py b/src/pinefarm/install.py index 790a44f..d824f24 100644 --- a/src/pinefarm/install.py +++ b/src/pinefarm/install.py @@ -259,7 +259,7 @@ def lhapdf_conf(pdf): """ # user settings *always* take precedence - if os.environ["LHAPDF_DATA_PATH"]: + if os.environ.get("LHAPDF_DATA_PATH") is not None: return if shutil.which("lhapdf-config") is not None or pkgconfig.exists("lhapdf"): lhapdf_data = pathlib.Path(