summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYanis Guenane <yguenane@gmail.com>2020-12-07 13:00:49 +0100
committerYanis Guenane <yguenane@gmail.com>2021-03-24 21:02:32 +0100
commite04e4e8c85e31d6add061328c11420eac7c8b733 (patch)
treef9272b9beb2eaa38eb232b6eae117bab8b64f4be
parentMerge pull request #9201 from amolgautam25/issue_5057 (diff)
downloadawx-e04e4e8c85e31d6add061328c11420eac7c8b733.tar.xz
awx-e04e4e8c85e31d6add061328c11420eac7c8b733.zip
Python: Bump to python 3.8
-rw-r--r--Makefile8
-rw-r--r--awxkit/setup.py4
-rw-r--r--awxkit/tox.ini2
-rw-r--r--pytest.ini4
-rwxr-xr-xrequirements/updater.sh4
-rw-r--r--tools/ansible/roles/dockerfile/templates/Dockerfile.j224
6 files changed, 23 insertions, 23 deletions
diff --git a/Makefile b/Makefile
index fb6e25e657..3813380cf8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-PYTHON ?= python3
+PYTHON ?= python3.8
PYTHON_VERSION = $(shell $(PYTHON) -c "from distutils.sysconfig import get_python_version; print(get_python_version())")
SITELIB=$(shell $(PYTHON) -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
OFFICIAL ?= no
@@ -125,7 +125,7 @@ virtualenv_awx:
mkdir $(VENV_BASE); \
fi; \
if [ ! -d "$(VENV_BASE)/awx" ]; then \
- virtualenv -p $(PYTHON) $(VENV_BASE)/awx; \
+ $(PYTHON) -m venv $(VENV_BASE)/awx; \
$(VENV_BASE)/awx/bin/pip install $(PIP_OPTIONS) $(VENV_BOOTSTRAP); \
fi; \
fi
@@ -164,7 +164,7 @@ version_file:
if [ "$(VENV_BASE)" ]; then \
. $(VENV_BASE)/awx/bin/activate; \
fi; \
- python -c "import awx; print(awx.__version__)" > /var/lib/awx/.awx_version; \
+ $(PYTHON) -c "import awx; print(awx.__version__)" > /var/lib/awx/.awx_version; \
# Do any one-time init tasks.
comma := ,
@@ -292,7 +292,7 @@ swagger: reports
check: black
awx-link:
- [ -d "/awx_devel/awx.egg-info" ] || python3 /awx_devel/setup.py egg_info_dev
+ [ -d "/awx_devel/awx.egg-info" ] || $(PYTHON) /awx_devel/setup.py egg_info_dev
cp -f /tmp/awx.egg-link /var/lib/awx/venv/awx/lib/python$(PYTHON_VERSION)/site-packages/awx.egg-link
TEST_DIRS ?= awx/main/tests/unit awx/main/tests/functional awx/conf/tests awx/sso/tests
diff --git a/awxkit/setup.py b/awxkit/setup.py
index 23f4e161cb..657fce0a84 100644
--- a/awxkit/setup.py
+++ b/awxkit/setup.py
@@ -67,7 +67,7 @@ setup(
'PyYAML',
'requests',
],
- python_requires=">=3.6",
+ python_requires=">=3.8",
extras_require={'formatting': ['jq'], 'websockets': ['websocket-client==0.57.0'], 'crypto': ['cryptography']},
license='Apache 2.0',
classifiers=[
@@ -79,7 +79,7 @@ setup(
'Operating System :: MacOS :: MacOS X',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python',
- 'Programming Language :: Python :: 3.6',
+ 'Programming Language :: Python :: 3.8',
'Topic :: System :: Software Distribution',
'Topic :: System :: Systems Administration',
],
diff --git a/awxkit/tox.ini b/awxkit/tox.ini
index 42c72bd608..73c9493e1d 100644
--- a/awxkit/tox.ini
+++ b/awxkit/tox.ini
@@ -8,7 +8,7 @@ skip_missing_interpreters = true
# skipsdist = true
[testenv]
-basepython = python3.6
+basepython = python3.8
passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH
setenv =
PYTHONPATH = {toxinidir}:{env:PYTHONPATH:}:.
diff --git a/pytest.ini b/pytest.ini
index fc407b5f17..d5d7273433 100644
--- a/pytest.ini
+++ b/pytest.ini
@@ -1,7 +1,7 @@
[pytest]
DJANGO_SETTINGS_MODULE = awx.settings.development
-python_paths = /var/lib/awx/venv/tower/lib/python3.6/site-packages
-site_dirs = /var/lib/awx/venv/tower/lib/python3.6/site-packages
+python_paths = /var/lib/awx/venv/tower/lib/python3.8/site-packages
+site_dirs = /var/lib/awx/venv/tower/lib/python3.8/site-packages
python_files = *.py
addopts = --reuse-db --nomigrations --tb=native
markers =
diff --git a/requirements/updater.sh b/requirements/updater.sh
index 2911aaf008..cca8b4a8ad 100755
--- a/requirements/updater.sh
+++ b/requirements/updater.sh
@@ -14,11 +14,11 @@ _cleanup() {
generate_requirements() {
venv="`pwd`/venv"
echo $venv
- /usr/bin/python3.6 -m venv "${venv}"
+ /usr/bin/python3.8 -m venv "${venv}"
# shellcheck disable=SC1090
source ${venv}/bin/activate
- ${venv}/bin/python3.6 -m pip install -U pip pip-tools
+ ${venv}/bin/python3.8 -m pip install -U pip pip-tools
${pip_compile} --output-file requirements.txt "${requirements_in}" "${requirements_git}"
# consider the git requirements for purposes of resolving deps
diff --git a/tools/ansible/roles/dockerfile/templates/Dockerfile.j2 b/tools/ansible/roles/dockerfile/templates/Dockerfile.j2
index df076ec5c0..8feb7e90dd 100644
--- a/tools/ansible/roles/dockerfile/templates/Dockerfile.j2
+++ b/tools/ansible/roles/dockerfile/templates/Dockerfile.j2
@@ -34,16 +34,16 @@ RUN dnf -y update && \
patch \
@postgresql:12 \
postgresql-devel \
- python3-devel \
- python3-pip \
- python3-psycopg2 \
- python3-setuptools \
+ python38-devel \
+ python38-pip \
+ python38-psycopg2 \
+ python38-setuptools \
swig \
unzip \
xmlsec1-devel \
xmlsec1-openssl-devel
-RUN python3 -m ensurepip && pip3 install "virtualenv < 20"
+RUN python3.8 -m ensurepip && pip3 install "virtualenv < 20"
# Install & build requirements
ADD Makefile /tmp/Makefile
@@ -94,9 +94,9 @@ RUN dnf -y update && \
@postgresql:12 \
python3-devel \
python3-libselinux \
- python3-pip \
- python3-psycopg2 \
- python3-setuptools \
+ python38-pip \
+ python38-psycopg2 \
+ python38-setuptools \
rsync \
subversion \
sudo \
@@ -119,7 +119,7 @@ RUN curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master
RUN curl -L -o /usr/bin/tini https://github.com/krallin/tini/releases/download/v0.19.0/tini-{{ tini_architecture | default('amd64') }} && \
chmod +x /usr/bin/tini
-RUN python3 -m ensurepip && pip3 install "virtualenv < 20" supervisor {% if build_dev|bool %}black{% endif %}
+RUN python3.8 -m ensurepip && pip3 install "virtualenv < 20" supervisor {% if build_dev|bool %}black{% endif %}
RUN rm -rf /root/.cache && rm -rf /tmp/*
@@ -228,8 +228,8 @@ RUN for dir in \
RUN for dir in \
/var/lib/awx/venv \
/var/lib/awx/venv/awx/bin \
- /var/lib/awx/venv/awx/lib/python3.6 \
- /var/lib/awx/venv/awx/lib/python3.6/site-packages \
+ /var/lib/awx/venv/awx/lib/python3.8 \
+ /var/lib/awx/venv/awx/lib/python3.8/site-packages \
/var/lib/awx/projects \
/var/lib/awx/rsyslog \
/var/run/awx-rsyslog \
@@ -238,7 +238,7 @@ RUN for dir in \
do mkdir -m 0775 -p $dir ; chmod g+rw $dir ; chgrp root $dir ; done && \
for file in \
/var/run/nginx.pid \
- /var/lib/awx/venv/awx/lib/python3.6/site-packages/awx.egg-link ; \
+ /var/lib/awx/venv/awx/lib/python3.8/site-packages/awx.egg-link ; \
do touch $file ; chmod g+rw $file ; done
{% endif %}