diff options
author | Noel Power <noel.power@suse.com> | 2018-11-24 11:13:47 +0000 |
---|---|---|
committer | Noel Power <npower@samba.org> | 2018-12-10 10:38:25 +0100 |
commit | dfe5787c255eaab3d8022c972a1afa1dd83e62ef (patch) | |
tree | f290f6f9ba82644f0276474157767728366f5a32 /script | |
parent | 23db658ebccebd2349b7da53c4d52c379ccb8ccc (diff) | |
download | samba-dfe5787c255eaab3d8022c972a1afa1dd83e62ef.tar.gz |
autobuild: Adjust autobuild for PY2/PY3 get_python_lib behaviour
The resuls of get_python_lib are different between python2 & python3
and this results in autobuild generating the wrong PYTHONPATH with
python3.
python2
=======
print ("%s" % get_python_lib(standard_lib=1, prefix='/my/prefix'))
/my/prefix/lib64/python2.7
python3
print ("%s" % get_python_lib(standard_lib=1, prefix='/my/prefix'))
/my/prefix/lib/python3.6
But with addition of plat_specific param the results are the same
python2
=======
print ("%s" % get_python_lib(plat_specific=1, standard_lib=0, prefix='/my/prefix'))
/my/prefix/lib64/python2.7/site-packages
python3
=======
print ("%s" % get_python_lib(plat_specific=1, standard_lib=0, prefix='/my/prefix'))
/my/prefix/lib64/python3.6/site-packages
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'script')
-rwxr-xr-x | script/autobuild.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/script/autobuild.py b/script/autobuild.py index f8a5e2e4314..5dd4d3a8df6 100755 --- a/script/autobuild.py +++ b/script/autobuild.py @@ -70,7 +70,7 @@ if os.environ.get("AUTOBUILD_SKIP_SAMBA_O3", "0") == "1": ctdb_configure_params = " --enable-developer --picky-developer ${PREFIX}" samba_configure_params = " --picky-developer ${PREFIX} ${EXTRA_PYTHON} --with-profiling-data" -samba_libs_envvars = "PYTHONPATH=${PYTHON_PREFIX}/site-packages:$PYTHONPATH" +samba_libs_envvars = "PYTHONPATH=${PYTHON_PREFIX}:$PYTHONPATH" samba_libs_envvars += " PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${PREFIX_DIR}/lib/pkgconfig" samba_libs_envvars += " ADDITIONAL_CFLAGS='-Wmissing-prototypes'" samba_libs_configure_base = samba_libs_envvars + " ./configure --abi-check --enable-debug --picky-developer -C ${PREFIX}" @@ -205,13 +205,13 @@ tasks = { "samba-ctdb": [("random-sleep", "script/random-sleep.sh 60 600", "text/plain"), # make sure we have tdb around: - ("tdb-configure", "cd lib/tdb && PYTHONPATH=${PYTHON_PREFIX}/site-packages:$PYTHONPATH PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${PREFIX_DIR}/lib/pkgconfig ./configure --bundled-libraries=NONE --abi-check --enable-debug -C ${PREFIX}", "text/plain"), + ("tdb-configure", "cd lib/tdb && PYTHONPATH=${PYTHON_PREFIX}:$PYTHONPATH PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${PREFIX_DIR}/lib/pkgconfig ./configure --bundled-libraries=NONE --abi-check --enable-debug -C ${PREFIX}", "text/plain"), ("tdb-make", "cd lib/tdb && make", "text/plain"), ("tdb-install", "cd lib/tdb && make install", "text/plain"), # build samba with cluster support (also building ctdb): - ("samba-configure", "PYTHONPATH=${PYTHON_PREFIX}/site-packages:$PYTHONPATH PKG_CONFIG_PATH=${PREFIX_DIR}/lib/pkgconfig:${PKG_CONFIG_PATH} ./configure.developer --picky-developer ${PREFIX} --with-selftest-prefix=./bin/ab --with-cluster-support --bundled-libraries=!tdb", "text/plain"), + ("samba-configure", "PYTHONPATH=${PYTHON_PREFIX}:$PYTHONPATH PKG_CONFIG_PATH=${PREFIX_DIR}/lib/pkgconfig:${PKG_CONFIG_PATH} ./configure.developer --picky-developer ${PREFIX} --with-selftest-prefix=./bin/ab --with-cluster-support --bundled-libraries=!tdb", "text/plain"), ("samba-make", "make", "text/plain"), ("samba-check", "./bin/smbd -b | grep CLUSTER_SUPPORT", "text/plain"), ("samba-install", "make install", "text/plain"), @@ -476,7 +476,7 @@ class builder(object): self.done = True return (self.stage, self.cmd, self.output_mime_type) = self.sequence[self.next] - self.cmd = self.cmd.replace("${PYTHON_PREFIX}", get_python_lib(standard_lib=1, prefix=self.prefix)) + self.cmd = self.cmd.replace("${PYTHON_PREFIX}", get_python_lib(plat_specific=1, standard_lib=0, prefix=self.prefix)) self.cmd = self.cmd.replace("${PREFIX}", "--prefix=%s" % self.prefix) if self.py3: self.cmd = self.cmd.replace("${EXTRA_PYTHON}", "%s" % extra_python) |