Cleanup py27 support

Make a few cleanups:
- Remove python 2.7 stanza from setup.py
- Remove obsolete sections from setup.cfg
- Update requirements, no need for python_version anymore
- Cleanup doc/source/conf.py to remove now obsolete content.
- Use newer openstackdocstheme version
- Cleanup tox.ini for Python 3 only

Change-Id: I9d63e63cf142fded002f7212588266d88f41dd06
This commit is contained in:
Andreas Jaeger 2020-04-10 12:30:08 +02:00
parent 70fe5f2ca9
commit 3bca43ceae
6 changed files with 5 additions and 41 deletions

View File

@ -64,11 +64,6 @@ role_name = 'tests'
target_name = 'openstack-ansible-' + role_name
title = 'OpenStack-Ansible Documentation: ' + role_name + 'role'
# The link to the browsable source code (for the left hand menu)
oslosphinx_cgit_link = (
"https://opendev.org/openstack/{}".format(target_name)
)
# openstackdocstheme options
repository_name = 'openstack/' + target_name
bug_project = 'openstack-ansible'

View File

@ -11,14 +11,3 @@ classifier =
Intended Audience :: System Administrators
License :: OSI Approved :: Apache Software License
Operating System :: POSIX :: Linux
[build_sphinx]
all_files = 1
build-dir = doc/build
source-dir = doc/source
[pbr]
warnerrors = True
[wheel]
universal = 1

View File

@ -13,17 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT
import setuptools
# In python < 2.7.4, a lazy loading of package `pbr` will break
# setuptools if some other modules registered functions in `atexit`.
# solution from: http://bugs.python.org/issue15881#msg170215
try:
import multiprocessing # noqa
except ImportError:
pass
setuptools.setup(
setup_requires=['pbr>=2.0.0'],
pbr=True)

View File

@ -9,9 +9,8 @@
# openstack-ansible-tests repository. Once it merges there, the changes will
# automatically be proposed to all the repositories which use it.
sphinx>=1.8.0,<2.0.0;python_version=='2.7' # BSD
sphinx>=1.8.0,!=2.1.0;python_version>='3.4' # BSD
sphinx>=1.8.0,!=2.1.0 # BSD
sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD
openstackdocstheme>=1.20.0 # Apache-2.0
openstackdocstheme>=1.32.1 # Apache-2.0
reno>=2.5.0 # Apache-2.0
doc8>=0.6.0 # Apache-2.0

View File

@ -26,7 +26,6 @@ ansible-lint==3.4.21 # MIT
pyasn1!=0.2.3,>=0.1.8 # BSD
pyOpenSSL>=17.1.0 # Apache-2.0
requests>=2.14.2 # Apache-2.0
ndg-httpsclient>=0.4.2;python_version<'3.0' # BSD
# We use this for our own keystone module.
# TODO(odyssey4me): Remove this once we no

15
tox.ini
View File

@ -1,9 +1,10 @@
[tox]
minversion = 2.0
minversion = 3.1
skipsdist = True
envlist = docs,linters,func
[testenv]
basepython = python3
usedevelop = True
install_command =
pip install -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/upper-constraints.txt} {opts} {packages}
@ -26,7 +27,6 @@ setenv =
WORKING_DIR={toxinidir}
[testenv:docs]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands =
bash -c "rm -rf doc/build"
@ -34,7 +34,6 @@ commands =
sphinx-build --keep-going -b html doc/source doc/build/html
[testenv:pdf-docs]
basepython = python3
deps = {[testenv:docs]deps}
whitelist_externals =
commands =
@ -46,19 +45,16 @@ commands =
extensions = .rst
[testenv:releasenotes]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands =
sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html
# environment used by the -infra templated docs job
# environment used by the -infra templated tarballs job
[testenv:venv]
basepython = python3
commands =
{posargs}
[testenv:pep8]
basepython = python3
commands =
bash -c "{toxinidir}/tests/common/test-pep8.sh"
@ -69,27 +65,22 @@ commands =
ignore=F403
[testenv:bashate]
basepython = python3
commands =
bash -c "{toxinidir}/tests/common/test-bashate.sh"
[testenv:ansible-syntax]
basepython = python3
commands =
bash -c "{toxinidir}/tests/common/test-ansible-syntax.sh"
[testenv:ansible-lint]
basepython = python3
commands =
bash -c "{toxinidir}/tests/common/test-ansible-lint.sh"
[testenv:functional]
basepython = python3
commands =
bash -c "{toxinidir}/tests/common/test-ansible-functional.sh"
[testenv:linters]
basepython = python3
commands =
bash -c "{toxinidir}/tests/common/test-ansible-env-prep.sh"
{[testenv:pep8]commands}