@@ -1,7 +1,7 @@
# Support building the Python bindings multiple times, against various Python
# runtimes (e.g. Python 2 vs Python 3) by optionally prefixing the build
# targets with "PYPREFIX":
-PYTHON ?= python
+PYTHON ?= python3
PYPREFIX ?= $(shell $(PYTHON) -c 'import sys;print("python-%d.%d" % sys.version_info[:2])')
RUBY ?= ruby
RUBYPREFIX ?= $(notdir $(RUBY))
@@ -1,7 +1,7 @@
# Support building the Python bindings multiple times, against various Python
# runtimes (e.g. Python 2 vs Python 3) by optionally prefixing the build
# targets with "PYPREFIX":
-PYTHON ?= python
+PYTHON ?= python3
PYPREFIX ?= $(shell $(PYTHON) -c 'import sys;print("python-%d.%d" % sys.version_info[:2])')
RUBY ?= ruby
RUBYPREFIX ?= $(notdir $(RUBY))
@@ -1,4 +1,4 @@
-PYTHON ?= python
+PYTHON ?= python3
SECILC ?= secilc
# Installation directories.
@@ -1,4 +1,4 @@
-PYTHON ?= python
+PYTHON ?= python3
# Installation directories.
LINGUAS ?= ru
@@ -1,5 +1,5 @@
PREFIX ?= /usr
-PYTHON ?= python
+PYTHON ?= python3
PYTHONLIBDIR ?= $(shell $(PYTHON) -c "from distutils.sysconfig import *; print(get_python_lib(prefix='$(PREFIX)'))")
PACKAGEDIR ?= /$(PYTHONLIBDIR)/sepolgen
@@ -1,4 +1,4 @@
-PYTHON ?= python
+PYTHON ?= python3
clean:
rm -f *~ *.pyc
@@ -1,4 +1,4 @@
-PYTHON ?= python
+PYTHON ?= python3
# Installation directories.
LINGUAS ?= ru
@@ -1,4 +1,4 @@
-PYTHON ?= python
+PYTHON ?= python3
# Installation directories.
LINGUAS ?= ru
@@ -25,7 +25,7 @@ export LD_LIBRARY_PATH="$DESTDIR/usr/lib:$DESTDIR/lib"
export PATH="$DESTDIR/usr/sbin:$DESTDIR/usr/bin:$DESTDIR/sbin:$DESTDIR/bin:$PATH"
# shellcheck disable=SC2155
-export PYTHONPATH="$DESTDIR$(${PYTHON:-python} -c "from distutils.sysconfig import *;print(get_python_lib(prefix='/usr'))")"
+export PYTHONPATH="$DESTDIR$(${PYTHON:-python3} -c "from distutils.sysconfig import *;print(get_python_lib(prefix='/usr'))")"
# shellcheck disable=SC2155
export RUBYLIB="$DESTDIR/$(${RUBY:-ruby} -e 'puts RbConfig::CONFIG["vendorlibdir"]'):$DESTDIR/$(${RUBY:-ruby} -e 'puts RbConfig::CONFIG["vendorarchdir"]')"
@@ -17,7 +17,7 @@ fi
# Make sure to use the newly-installed libraries when running tests
export LD_LIBRARY_PATH="$DESTDIR/usr/lib:$DESTDIR/lib"
export PATH="$DESTDIR/usr/sbin:$DESTDIR/usr/bin:$DESTDIR/sbin:$DESTDIR/bin:$PATH"
-export PYTHONPATH="$DESTDIR$(${PYTHON:-python} -c "from distutils.sysconfig import *;print(get_python_lib(prefix='/usr'))")"
+export PYTHONPATH="$DESTDIR$(${PYTHON:-python3} -c "from distutils.sysconfig import *;print(get_python_lib(prefix='/usr'))")"
export RUBYLIB="$DESTDIR/$(${RUBY:-ruby} -e 'puts RbConfig::CONFIG["vendorlibdir"]'):$DESTDIR/$(${RUBY:-ruby} -e 'puts RbConfig::CONFIG["vendorarchdir"]')"
# Build and analyze
- Python 2.7 is planned to be the last of the 2.x releases - It's generally advised to use Python 3 - Majority of python/ scripts are already switched python3 - Users with python 2 only can still use: $ make PYTHON=/usr/bin/python .... Signed-off-by: Petr Lautrbach <plautrba@redhat.com> --- libselinux/src/Makefile | 2 +- libsemanage/src/Makefile | 2 +- python/audit2allow/Makefile | 2 +- python/semanage/Makefile | 2 +- python/sepolgen/src/sepolgen/Makefile | 2 +- python/sepolgen/tests/Makefile | 2 +- python/sepolicy/Makefile | 2 +- sandbox/Makefile | 2 +- scripts/env_use_destdir | 2 +- scripts/run-scan-build | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-)