mirror of
https://github.com/ansible/awx.git
synced 2026-03-19 18:07:33 -02:30
Python: Bump to python 3.8
This commit is contained in:
8
Makefile
8
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())")
|
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())")
|
SITELIB=$(shell $(PYTHON) -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
|
||||||
OFFICIAL ?= no
|
OFFICIAL ?= no
|
||||||
@@ -125,7 +125,7 @@ virtualenv_awx:
|
|||||||
mkdir $(VENV_BASE); \
|
mkdir $(VENV_BASE); \
|
||||||
fi; \
|
fi; \
|
||||||
if [ ! -d "$(VENV_BASE)/awx" ]; then \
|
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); \
|
$(VENV_BASE)/awx/bin/pip install $(PIP_OPTIONS) $(VENV_BOOTSTRAP); \
|
||||||
fi; \
|
fi; \
|
||||||
fi
|
fi
|
||||||
@@ -164,7 +164,7 @@ version_file:
|
|||||||
if [ "$(VENV_BASE)" ]; then \
|
if [ "$(VENV_BASE)" ]; then \
|
||||||
. $(VENV_BASE)/awx/bin/activate; \
|
. $(VENV_BASE)/awx/bin/activate; \
|
||||||
fi; \
|
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.
|
# Do any one-time init tasks.
|
||||||
comma := ,
|
comma := ,
|
||||||
@@ -292,7 +292,7 @@ swagger: reports
|
|||||||
check: black
|
check: black
|
||||||
|
|
||||||
awx-link:
|
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
|
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
|
TEST_DIRS ?= awx/main/tests/unit awx/main/tests/functional awx/conf/tests awx/sso/tests
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ setup(
|
|||||||
'PyYAML',
|
'PyYAML',
|
||||||
'requests',
|
'requests',
|
||||||
],
|
],
|
||||||
python_requires=">=3.6",
|
python_requires=">=3.8",
|
||||||
extras_require={'formatting': ['jq'], 'websockets': ['websocket-client==0.57.0'], 'crypto': ['cryptography']},
|
extras_require={'formatting': ['jq'], 'websockets': ['websocket-client==0.57.0'], 'crypto': ['cryptography']},
|
||||||
license='Apache 2.0',
|
license='Apache 2.0',
|
||||||
classifiers=[
|
classifiers=[
|
||||||
@@ -79,7 +79,7 @@ setup(
|
|||||||
'Operating System :: MacOS :: MacOS X',
|
'Operating System :: MacOS :: MacOS X',
|
||||||
'Operating System :: POSIX :: Linux',
|
'Operating System :: POSIX :: Linux',
|
||||||
'Programming Language :: Python',
|
'Programming Language :: Python',
|
||||||
'Programming Language :: Python :: 3.6',
|
'Programming Language :: Python :: 3.8',
|
||||||
'Topic :: System :: Software Distribution',
|
'Topic :: System :: Software Distribution',
|
||||||
'Topic :: System :: Systems Administration',
|
'Topic :: System :: Systems Administration',
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ skip_missing_interpreters = true
|
|||||||
# skipsdist = true
|
# skipsdist = true
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
basepython = python3.6
|
basepython = python3.8
|
||||||
passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH
|
passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH
|
||||||
setenv =
|
setenv =
|
||||||
PYTHONPATH = {toxinidir}:{env:PYTHONPATH:}:.
|
PYTHONPATH = {toxinidir}:{env:PYTHONPATH:}:.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
[pytest]
|
[pytest]
|
||||||
DJANGO_SETTINGS_MODULE = awx.settings.development
|
DJANGO_SETTINGS_MODULE = awx.settings.development
|
||||||
python_paths = /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.6/site-packages
|
site_dirs = /var/lib/awx/venv/tower/lib/python3.8/site-packages
|
||||||
python_files = *.py
|
python_files = *.py
|
||||||
addopts = --reuse-db --nomigrations --tb=native
|
addopts = --reuse-db --nomigrations --tb=native
|
||||||
markers =
|
markers =
|
||||||
|
|||||||
@@ -14,11 +14,11 @@ _cleanup() {
|
|||||||
generate_requirements() {
|
generate_requirements() {
|
||||||
venv="`pwd`/venv"
|
venv="`pwd`/venv"
|
||||||
echo $venv
|
echo $venv
|
||||||
/usr/bin/python3.6 -m venv "${venv}"
|
/usr/bin/python3.8 -m venv "${venv}"
|
||||||
# shellcheck disable=SC1090
|
# shellcheck disable=SC1090
|
||||||
source ${venv}/bin/activate
|
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}"
|
${pip_compile} --output-file requirements.txt "${requirements_in}" "${requirements_git}"
|
||||||
# consider the git requirements for purposes of resolving deps
|
# consider the git requirements for purposes of resolving deps
|
||||||
|
|||||||
@@ -34,16 +34,16 @@ RUN dnf -y update && \
|
|||||||
patch \
|
patch \
|
||||||
@postgresql:12 \
|
@postgresql:12 \
|
||||||
postgresql-devel \
|
postgresql-devel \
|
||||||
python3-devel \
|
python38-devel \
|
||||||
python3-pip \
|
python38-pip \
|
||||||
python3-psycopg2 \
|
python38-psycopg2 \
|
||||||
python3-setuptools \
|
python38-setuptools \
|
||||||
swig \
|
swig \
|
||||||
unzip \
|
unzip \
|
||||||
xmlsec1-devel \
|
xmlsec1-devel \
|
||||||
xmlsec1-openssl-devel
|
xmlsec1-openssl-devel
|
||||||
|
|
||||||
RUN python3 -m ensurepip && pip3 install "virtualenv < 20"
|
RUN python3.8 -m ensurepip && pip3 install "virtualenv < 20"
|
||||||
|
|
||||||
# Install & build requirements
|
# Install & build requirements
|
||||||
ADD Makefile /tmp/Makefile
|
ADD Makefile /tmp/Makefile
|
||||||
@@ -94,9 +94,9 @@ RUN dnf -y update && \
|
|||||||
@postgresql:12 \
|
@postgresql:12 \
|
||||||
python3-devel \
|
python3-devel \
|
||||||
python3-libselinux \
|
python3-libselinux \
|
||||||
python3-pip \
|
python38-pip \
|
||||||
python3-psycopg2 \
|
python38-psycopg2 \
|
||||||
python3-setuptools \
|
python38-setuptools \
|
||||||
rsync \
|
rsync \
|
||||||
subversion \
|
subversion \
|
||||||
sudo \
|
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') }} && \
|
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
|
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/*
|
RUN rm -rf /root/.cache && rm -rf /tmp/*
|
||||||
|
|
||||||
@@ -228,8 +228,8 @@ RUN for dir in \
|
|||||||
RUN for dir in \
|
RUN for dir in \
|
||||||
/var/lib/awx/venv \
|
/var/lib/awx/venv \
|
||||||
/var/lib/awx/venv/awx/bin \
|
/var/lib/awx/venv/awx/bin \
|
||||||
/var/lib/awx/venv/awx/lib/python3.6 \
|
/var/lib/awx/venv/awx/lib/python3.8 \
|
||||||
/var/lib/awx/venv/awx/lib/python3.6/site-packages \
|
/var/lib/awx/venv/awx/lib/python3.8/site-packages \
|
||||||
/var/lib/awx/projects \
|
/var/lib/awx/projects \
|
||||||
/var/lib/awx/rsyslog \
|
/var/lib/awx/rsyslog \
|
||||||
/var/run/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 && \
|
do mkdir -m 0775 -p $dir ; chmod g+rw $dir ; chgrp root $dir ; done && \
|
||||||
for file in \
|
for file in \
|
||||||
/var/run/nginx.pid \
|
/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
|
do touch $file ; chmod g+rw $file ; done
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user