summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rpmUtils/Makefile6
-rw-r--r--yum/Makefile6
2 files changed, 4 insertions, 8 deletions
diff --git a/rpmUtils/Makefile b/rpmUtils/Makefile
index 39033b6..81a6e7c 100644
--- a/rpmUtils/Makefile
+++ b/rpmUtils/Makefile
@@ -1,10 +1,8 @@
PYTHON=python3
PACKAGE = $(shell basename `pwd`)
PYFILES = $(wildcard *.py)
-PYVER := $(shell $(PYTHON) -c 'import sys; print("%.3s" %(sys.version))')
-PYSYSDIR := $(shell $(PYTHON) -c 'import sys; print(sys.prefix)')
-PYLIBDIR = $(PYSYSDIR)/lib/python$(PYVER)
-PKGDIR = $(PYLIBDIR)/site-packages/$(PACKAGE)
+PYLIBDIR = $(shell $(PYTHON) -c 'import sysconfig; print(sysconfig.get_paths()["stdlib"])')
+PKGDIR = $(PYLIBDIR)/dist-packages/$(PACKAGE)
all:
echo "Nothing to do"
diff --git a/yum/Makefile b/yum/Makefile
index 39033b6..f25e7b7 100644
--- a/yum/Makefile
+++ b/yum/Makefile
@@ -1,10 +1,8 @@
PYTHON=python3
PACKAGE = $(shell basename `pwd`)
PYFILES = $(wildcard *.py)
-PYVER := $(shell $(PYTHON) -c 'import sys; print("%.3s" %(sys.version))')
-PYSYSDIR := $(shell $(PYTHON) -c 'import sys; print(sys.prefix)')
-PYLIBDIR = $(PYSYSDIR)/lib/python$(PYVER)
-PKGDIR = $(PYLIBDIR)/site-packages/$(PACKAGE)
+PYLIBDIR = $(shell python3 -c 'import sysconfig; print(sysconfig.get_paths()["stdlib"])')
+PKGDIR = $(PYLIBDIR)/dist-packages/$(PACKAGE)
all:
echo "Nothing to do"