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:
parent
70fe5f2ca9
commit
3bca43ceae
@ -64,11 +64,6 @@ role_name = 'tests'
|
|||||||
target_name = 'openstack-ansible-' + role_name
|
target_name = 'openstack-ansible-' + role_name
|
||||||
title = 'OpenStack-Ansible Documentation: ' + role_name + 'role'
|
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
|
# openstackdocstheme options
|
||||||
repository_name = 'openstack/' + target_name
|
repository_name = 'openstack/' + target_name
|
||||||
bug_project = 'openstack-ansible'
|
bug_project = 'openstack-ansible'
|
||||||
|
11
setup.cfg
11
setup.cfg
@ -11,14 +11,3 @@ classifier =
|
|||||||
Intended Audience :: System Administrators
|
Intended Audience :: System Administrators
|
||||||
License :: OSI Approved :: Apache Software License
|
License :: OSI Approved :: Apache Software License
|
||||||
Operating System :: POSIX :: Linux
|
Operating System :: POSIX :: Linux
|
||||||
|
|
||||||
[build_sphinx]
|
|
||||||
all_files = 1
|
|
||||||
build-dir = doc/build
|
|
||||||
source-dir = doc/source
|
|
||||||
|
|
||||||
[pbr]
|
|
||||||
warnerrors = True
|
|
||||||
|
|
||||||
[wheel]
|
|
||||||
universal = 1
|
|
||||||
|
9
setup.py
9
setup.py
@ -13,17 +13,8 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT
|
|
||||||
import setuptools
|
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(
|
setuptools.setup(
|
||||||
setup_requires=['pbr>=2.0.0'],
|
setup_requires=['pbr>=2.0.0'],
|
||||||
pbr=True)
|
pbr=True)
|
||||||
|
@ -9,9 +9,8 @@
|
|||||||
# openstack-ansible-tests repository. Once it merges there, the changes will
|
# openstack-ansible-tests repository. Once it merges there, the changes will
|
||||||
# automatically be proposed to all the repositories which use it.
|
# 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 # BSD
|
||||||
sphinx>=1.8.0,!=2.1.0;python_version>='3.4' # BSD
|
|
||||||
sphinxcontrib-svg2pdfconverter>=0.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
|
reno>=2.5.0 # Apache-2.0
|
||||||
doc8>=0.6.0 # Apache-2.0
|
doc8>=0.6.0 # Apache-2.0
|
||||||
|
@ -26,7 +26,6 @@ ansible-lint==3.4.21 # MIT
|
|||||||
pyasn1!=0.2.3,>=0.1.8 # BSD
|
pyasn1!=0.2.3,>=0.1.8 # BSD
|
||||||
pyOpenSSL>=17.1.0 # Apache-2.0
|
pyOpenSSL>=17.1.0 # Apache-2.0
|
||||||
requests>=2.14.2 # 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.
|
# We use this for our own keystone module.
|
||||||
# TODO(odyssey4me): Remove this once we no
|
# TODO(odyssey4me): Remove this once we no
|
||||||
|
15
tox.ini
15
tox.ini
@ -1,9 +1,10 @@
|
|||||||
[tox]
|
[tox]
|
||||||
minversion = 2.0
|
minversion = 3.1
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
envlist = docs,linters,func
|
envlist = docs,linters,func
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
|
basepython = python3
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
install_command =
|
install_command =
|
||||||
pip install -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/upper-constraints.txt} {opts} {packages}
|
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}
|
WORKING_DIR={toxinidir}
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
basepython = python3
|
|
||||||
deps = -r{toxinidir}/doc/requirements.txt
|
deps = -r{toxinidir}/doc/requirements.txt
|
||||||
commands =
|
commands =
|
||||||
bash -c "rm -rf doc/build"
|
bash -c "rm -rf doc/build"
|
||||||
@ -34,7 +34,6 @@ commands =
|
|||||||
sphinx-build --keep-going -b html doc/source doc/build/html
|
sphinx-build --keep-going -b html doc/source doc/build/html
|
||||||
|
|
||||||
[testenv:pdf-docs]
|
[testenv:pdf-docs]
|
||||||
basepython = python3
|
|
||||||
deps = {[testenv:docs]deps}
|
deps = {[testenv:docs]deps}
|
||||||
whitelist_externals =
|
whitelist_externals =
|
||||||
commands =
|
commands =
|
||||||
@ -46,19 +45,16 @@ commands =
|
|||||||
extensions = .rst
|
extensions = .rst
|
||||||
|
|
||||||
[testenv:releasenotes]
|
[testenv:releasenotes]
|
||||||
basepython = python3
|
|
||||||
deps = -r{toxinidir}/doc/requirements.txt
|
deps = -r{toxinidir}/doc/requirements.txt
|
||||||
commands =
|
commands =
|
||||||
sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html
|
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]
|
[testenv:venv]
|
||||||
basepython = python3
|
|
||||||
commands =
|
commands =
|
||||||
{posargs}
|
{posargs}
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
basepython = python3
|
|
||||||
commands =
|
commands =
|
||||||
bash -c "{toxinidir}/tests/common/test-pep8.sh"
|
bash -c "{toxinidir}/tests/common/test-pep8.sh"
|
||||||
|
|
||||||
@ -69,27 +65,22 @@ commands =
|
|||||||
ignore=F403
|
ignore=F403
|
||||||
|
|
||||||
[testenv:bashate]
|
[testenv:bashate]
|
||||||
basepython = python3
|
|
||||||
commands =
|
commands =
|
||||||
bash -c "{toxinidir}/tests/common/test-bashate.sh"
|
bash -c "{toxinidir}/tests/common/test-bashate.sh"
|
||||||
|
|
||||||
[testenv:ansible-syntax]
|
[testenv:ansible-syntax]
|
||||||
basepython = python3
|
|
||||||
commands =
|
commands =
|
||||||
bash -c "{toxinidir}/tests/common/test-ansible-syntax.sh"
|
bash -c "{toxinidir}/tests/common/test-ansible-syntax.sh"
|
||||||
|
|
||||||
[testenv:ansible-lint]
|
[testenv:ansible-lint]
|
||||||
basepython = python3
|
|
||||||
commands =
|
commands =
|
||||||
bash -c "{toxinidir}/tests/common/test-ansible-lint.sh"
|
bash -c "{toxinidir}/tests/common/test-ansible-lint.sh"
|
||||||
|
|
||||||
[testenv:functional]
|
[testenv:functional]
|
||||||
basepython = python3
|
|
||||||
commands =
|
commands =
|
||||||
bash -c "{toxinidir}/tests/common/test-ansible-functional.sh"
|
bash -c "{toxinidir}/tests/common/test-ansible-functional.sh"
|
||||||
|
|
||||||
[testenv:linters]
|
[testenv:linters]
|
||||||
basepython = python3
|
|
||||||
commands =
|
commands =
|
||||||
bash -c "{toxinidir}/tests/common/test-ansible-env-prep.sh"
|
bash -c "{toxinidir}/tests/common/test-ansible-env-prep.sh"
|
||||||
{[testenv:pep8]commands}
|
{[testenv:pep8]commands}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user