summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2023-01-12 18:20:31 +0100
committerSlávek Banko <slavek.banko@axis.cz>2023-01-13 03:27:22 +0100
commit3b188e184dc679e04975fbc2b572287fdcff0cca (patch)
tree4d5a7a2847fd4d1ca4f7f6d42c4652d1141e0999
parent2b9d763da377b06b583acf042808d3a49aec086f (diff)
downloadtdebindings-3b188e184dc679e04975fbc2b572287fdcff0cca.tar.gz
tdebindings-3b188e184dc679e04975fbc2b572287fdcff0cca.zip
dcoppython: Get the path to the python site directory from the python configuration.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r--dcoppython/configure.in.in4
-rw-r--r--dcoppython/lib/Makefile.am3
-rw-r--r--dcoppython/shell/Makefile.am5
3 files changed, 6 insertions, 6 deletions
diff --git a/dcoppython/configure.in.in b/dcoppython/configure.in.in
index c4d84ea2..dddf4c64 100644
--- a/dcoppython/configure.in.in
+++ b/dcoppython/configure.in.in
@@ -10,3 +10,7 @@ AC_PATH_PROG([PYTHON],[python2])
if test -z "$PYTHON"; then
AC_PATH_PROG([PYTHON],[python])
fi
+if test -n "$PYTHON"; then
+ python_site=$($PYTHON -c 'from distutils import sysconfig; print(sysconfig.get_python_lib())')
+ AC_SUBST(PYTHON_SITE, $python_site)
+fi
diff --git a/dcoppython/lib/Makefile.am b/dcoppython/lib/Makefile.am
index c72a0662..bfa7890c 100644
--- a/dcoppython/lib/Makefile.am
+++ b/dcoppython/lib/Makefile.am
@@ -1,4 +1,3 @@
pyt_DATA = pydcop.py
-pytdir = $(PYTHONMODDIR)/site-packages
-
+pytdir = $(PYTHON_SITE)
diff --git a/dcoppython/shell/Makefile.am b/dcoppython/shell/Makefile.am
index 2d4a5b01..3dbbc907 100644
--- a/dcoppython/shell/Makefile.am
+++ b/dcoppython/shell/Makefile.am
@@ -13,13 +13,10 @@ marshal_funcs_doc.html: $(srcdir)/marshal_funcs_doc.xsl marshal_funcs_doc.xml
INCLUDES = $(PYTHONINC) $(all_includes)
pythlib_LTLIBRARIES = pcop.la
-pythlibdir = $(PYTHONMODDIR)/site-packages
+pythlibdir = $(PYTHON_SITE)
pcop_la_SOURCES = pcop.cpp marshaller.cpp importedmodules.cpp
pcop_la_LDFLAGS = $(all_libraries) -module -avoid-version
pcop_la_LIBADD = -lDCOP -ltdecore $(LIB_TQT) $(LIBPYTHON)
noinst_HEADERS = pcop.h marshaller.h marshal_funcs.h importedmodules.h
-
-
-