diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-10-15 11:57:20 +0530 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-10-15 11:57:20 +0530 |
commit | aa9b6a610ffe88fc714d42089fb2afa8dbc32894 (patch) | |
tree | a57ec43b32ab183a49c43f249e3e5f41c7bdfaf3 | |
parent | b2c9672f2e493db810865b7de1e568a466b59360 (diff) | |
download | build-common-aa9b6a610ffe88fc714d42089fb2afa8dbc32894.tar.gz build-common-aa9b6a610ffe88fc714d42089fb2afa8dbc32894.tar.bz2 build-common-aa9b6a610ffe88fc714d42089fb2afa8dbc32894.zip |
allow configure.py to be simpler
-rwxr-xr-x | configure | 8 | ||||
-rw-r--r-- | configure.py.template | 11 |
2 files changed, 9 insertions, 10 deletions
@@ -73,6 +73,14 @@ fi # don't have python if we reach the point to fail. PYTHON=$($python -c 'import sys; print(sys.executable)') +scriptpath=build-system/taler-build-scripts + +if ! test -d "$scriptpath"; then + echo "fatal error: taler-build-scripts not found at $scriptpath" >&2 + exit 1 +fi + +export PYTHONPATH="$scriptpath:${PYTHONPATH:-}" # Call configure.py, assuming all went well. # $1 is read by configure.py as the prefix. diff --git a/configure.py.template b/configure.py.template index 0cb77fe..337c51d 100644 --- a/configure.py.template +++ b/configure.py.template @@ -1,13 +1,4 @@ -import sys -from pathlib import Path - -base_dir = Path(__file__, "../build-system/taler-build-scripts").resolve() -if not base_dir.exists(): - print( - f"build system directory ({base_dir}) missing", file=sys.stderr - ) - sys.exit(1) -sys.path.insert(0, str(base_dir)) +# This configure.py.template file is in the public domain. from talerbuildconfig import * |