Fixed python installation path
authorBenedikt Tutzer <benedikt.tutzer@gmail.com>
Fri, 25 Sep 2020 09:21:16 +0000 (11:21 +0200)
committerBenedikt Tutzer <benedikt.tutzer@gmail.com>
Fri, 25 Sep 2020 09:21:16 +0000 (11:21 +0200)
The path where python expects it's libraries seems to change from
operating system to operating system, but can be querried from the site
package.

Makefile

index a3ff10625cc4c24290bc14ebcaf9ce3d9f43802a..329ad75eb3b9054b42f987fbcb7abe8dbb816c5c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -171,8 +171,7 @@ else
 PYTHON_CONFIG := $(PYTHON_EXECUTABLE)-config
 endif
 
-PYTHON_PREFIX := $(shell $(PYTHON_CONFIG) --prefix)
-PYTHON_DESTDIR := $(PYTHON_PREFIX)/lib/python$(PYTHON_VERSION)/site-packages
+PYTHON_DESTDIR := $(shell $(PYTHON_EXECUTABLE) -c "import site; print(site.getsitepackages()[-1]);")
 
 # Reload Makefile.conf to override python specific variables if defined
 ifneq ($(wildcard Makefile.conf),)