aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Lautrbach <plautrba@redhat.com>2019-02-18 17:27:44 +0100
committerPetr Lautrbach <plautrba@redhat.com>2019-02-20 16:43:27 +0100
commit1952be65dca747892571089675b2cc459a4ea0de (patch)
tree1b307b9968143de3200cf2092a2bacdb444f5ce8
parent3b868abd2eca8db1c3ea06d26b87a9694ad45ccd (diff)
downloadandroid_external_selinux-1952be65dca747892571089675b2cc459a4ea0de.tar.gz
android_external_selinux-1952be65dca747892571089675b2cc459a4ea0de.tar.bz2
android_external_selinux-1952be65dca747892571089675b2cc459a4ea0de.zip
Switch to python3 by default
- 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>
-rw-r--r--libselinux/src/Makefile2
-rw-r--r--libsemanage/src/Makefile2
-rw-r--r--python/audit2allow/Makefile2
-rw-r--r--python/semanage/Makefile2
-rw-r--r--python/sepolgen/src/sepolgen/Makefile2
-rw-r--r--python/sepolgen/tests/Makefile2
-rw-r--r--python/sepolicy/Makefile2
-rw-r--r--sandbox/Makefile2
-rwxr-xr-xscripts/env_use_destdir2
-rwxr-xr-xscripts/run-scan-build2
10 files changed, 10 insertions, 10 deletions
diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile
index 92e30738..e9ed0383 100644
--- a/libselinux/src/Makefile
+++ b/libselinux/src/Makefile
@@ -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))
diff --git a/libsemanage/src/Makefile b/libsemanage/src/Makefile
index dea751e5..e029f098 100644
--- a/libsemanage/src/Makefile
+++ b/libsemanage/src/Makefile
@@ -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))
diff --git a/python/audit2allow/Makefile b/python/audit2allow/Makefile
index 18d740d3..15db5490 100644
--- a/python/audit2allow/Makefile
+++ b/python/audit2allow/Makefile
@@ -1,4 +1,4 @@
-PYTHON ?= python
+PYTHON ?= python3
SECILC ?= secilc
# Installation directories.
diff --git a/python/semanage/Makefile b/python/semanage/Makefile
index 37065268..024e9640 100644
--- a/python/semanage/Makefile
+++ b/python/semanage/Makefile
@@ -1,4 +1,4 @@
-PYTHON ?= python
+PYTHON ?= python3
# Installation directories.
LINGUAS ?= ru
diff --git a/python/sepolgen/src/sepolgen/Makefile b/python/sepolgen/src/sepolgen/Makefile
index c75809ad..cac8def7 100644
--- a/python/sepolgen/src/sepolgen/Makefile
+++ b/python/sepolgen/src/sepolgen/Makefile
@@ -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
diff --git a/python/sepolgen/tests/Makefile b/python/sepolgen/tests/Makefile
index e17eef22..83d072f4 100644
--- a/python/sepolgen/tests/Makefile
+++ b/python/sepolgen/tests/Makefile
@@ -1,4 +1,4 @@
-PYTHON ?= python
+PYTHON ?= python3
clean:
rm -f *~ *.pyc
diff --git a/python/sepolicy/Makefile b/python/sepolicy/Makefile
index 7ed039bc..69f29fa9 100644
--- a/python/sepolicy/Makefile
+++ b/python/sepolicy/Makefile
@@ -1,4 +1,4 @@
-PYTHON ?= python
+PYTHON ?= python3
# Installation directories.
LINGUAS ?= ru
diff --git a/sandbox/Makefile b/sandbox/Makefile
index 862bffbe..9da5e58d 100644
--- a/sandbox/Makefile
+++ b/sandbox/Makefile
@@ -1,4 +1,4 @@
-PYTHON ?= python
+PYTHON ?= python3
# Installation directories.
LINGUAS ?= ru
diff --git a/scripts/env_use_destdir b/scripts/env_use_destdir
index 4fbfb8de..251987c2 100755
--- a/scripts/env_use_destdir
+++ b/scripts/env_use_destdir
@@ -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"]')"
diff --git a/scripts/run-scan-build b/scripts/run-scan-build
index 8b24a4d0..88fe551c 100755
--- a/scripts/run-scan-build
+++ b/scripts/run-scan-build
@@ -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