Cleanup py27 support
This repo is now testing only with Python 3, so let's make a few cleanups: - Remove python 2.7 stanza from setup.py - Remove obsolete sections from setup.cfg - Use newer openstackdocstheme and Sphinx versions - Cleanup */source/conf.py to remove now obsolete content. - Remove install_command from tox.ini, the default is fine Change-Id: I41d8153a0543f6983dd97311243f057d270e17ef
This commit is contained in:
parent
3292f58eb7
commit
a50dd18cc1
@ -9,8 +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.1.0 # BSD
|
||||
sphinx>=2.0.0,!=2.1.0 # BSD
|
||||
sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD
|
||||
openstackdocstheme>=1.32.1 # Apache-2.0
|
||||
openstackdocstheme>=2.0.0 # Apache-2.0
|
||||
reno>=2.5.0 # Apache-2.0
|
||||
doc8>=0.6.0 # Apache-2.0
|
||||
|
@ -22,8 +22,6 @@
|
||||
# All configuration values have a default; values that are commented out
|
||||
# serve to show the default.
|
||||
|
||||
import pbr.version
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
@ -67,22 +65,6 @@ role_name = 'python_venv_build'
|
||||
target_name = 'ansible-role-' + 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)
|
||||
)
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version_info = pbr.version.VersionInfo(target_name)
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = version_info.version_string_with_vcs()
|
||||
# The short X.Y version.
|
||||
version = version_info.canonical_version_string()
|
||||
|
||||
# openstackdocstheme options
|
||||
repository_name = 'openstack/' + target_name
|
||||
bug_project = project.lower()
|
||||
@ -173,10 +155,6 @@ html_static_path = ['_static']
|
||||
# directly to the root of the documentation.
|
||||
# html_extra_path = []
|
||||
|
||||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
||||
# using the given strftime format.
|
||||
html_last_updated_fmt = '%Y-%m-%d %H:%M'
|
||||
|
||||
# If true, SmartyPants will be used to convert quotes and dashes to
|
||||
# typographically correct entities.
|
||||
# html_use_smartypants = True
|
||||
|
@ -62,11 +62,6 @@ role_name = 'ansible-role-python_venv_build'
|
||||
target_name = 'openstack-ansible-' + role_name
|
||||
title = 'OpenStack-Ansible Documentation: Central testing repository'
|
||||
|
||||
# The link to the browsable source code (for the left hand menu)
|
||||
oslosphinx_cgit_link = (
|
||||
"https://opendev.org/openstack/{}".format(target_name)
|
||||
)
|
||||
|
||||
# Release notes do not need a version number in the title, they
|
||||
# cover multiple releases.
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
@ -158,10 +153,6 @@ html_static_path = ['_static']
|
||||
# directly to the root of the documentation.
|
||||
# html_extra_path = []
|
||||
|
||||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
||||
# using the given strftime format.
|
||||
html_last_updated_fmt = '%Y-%m-%d %H:%M'
|
||||
|
||||
# If true, SmartyPants will be used to convert quotes and dashes to
|
||||
# typographically correct entities.
|
||||
# html_use_smartypants = True
|
||||
|
15
setup.cfg
15
setup.cfg
@ -12,21 +12,6 @@ classifier =
|
||||
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
|
||||
|
||||
[global]
|
||||
setup-hooks =
|
||||
pbr.hooks.setup_hook
|
||||
|
||||
[files]
|
||||
data_files =
|
||||
usr/local/share/ansible/roles/python_venv_build/defaults = defaults/*
|
||||
|
9
setup.py
9
setup.py
@ -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)
|
||||
|
10
tox.ini
10
tox.ini
@ -7,8 +7,6 @@ ignore_basepython_conflict = True
|
||||
[testenv]
|
||||
basepython = python3
|
||||
usedevelop = True
|
||||
install_command =
|
||||
pip install -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages}
|
||||
commands =
|
||||
/usr/bin/find . -type f -name "*.pyc" -delete
|
||||
passenv =
|
||||
@ -35,11 +33,13 @@ setenv =
|
||||
|
||||
|
||||
[testenv:docs]
|
||||
deps = -r{toxinidir}/doc/requirements.txt
|
||||
deps =
|
||||
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||
-r{toxinidir}/doc/requirements.txt
|
||||
commands =
|
||||
bash -c "rm -rf doc/build"
|
||||
doc8 doc
|
||||
sphinx-build -b html doc/source doc/build/html
|
||||
sphinx-build -W -b html doc/source doc/build/html
|
||||
|
||||
|
||||
[testenv:pdf-docs]
|
||||
@ -57,7 +57,7 @@ extensions = .rst
|
||||
|
||||
|
||||
[testenv:releasenotes]
|
||||
deps = -r{toxinidir}/doc/requirements.txt
|
||||
deps = {[testenv:docs]deps}
|
||||
commands =
|
||||
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user