Cleanup py27 support

This repo is now testing only with Python 3, so let's make
a few cleanups:
- Remove obsolete sections from setup.cfg
- Update requirements, no need for python_version anymore
- Switch to using sphinx-build
- 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
- Fix problems found by sphinx-build

Change-Id: I258ba61fb3c2c5e83e71109dab941e304dde3f76
This commit is contained in:
Andreas Jaeger 2020-04-25 16:31:21 +02:00
parent 3b893d2237
commit 44988971ef
7 changed files with 16 additions and 27 deletions

View File

@ -2,6 +2,6 @@
# of appearance. Changing the order has an impact on the overall integration # of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later. # process, which may cause wedges in the gate later.
openstackdocstheme>=1.11.0 openstackdocstheme>=2.0.0 # Apache-2.0
sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD sphinx>=2.0.0,!=2.1.0 # BSD
yasfb>=0.5.1 yasfb>=0.5.1

View File

@ -12,7 +12,6 @@
# serve to show the default. # serve to show the default.
import datetime import datetime
import subprocess
import sys import sys
import os import os
@ -76,7 +75,7 @@ copyright = u'%s, OpenStack Cinder Team' % datetime.date.today().year
# directories to ignore when looking for source files. # directories to ignore when looking for source files.
exclude_patterns = [ exclude_patterns = [
'_build', '_build',
'template.rst', '**/template.rst',
] ]
# The reST default role (used for this markup: `text`) to use for all documents. # The reST default role (used for this markup: `text`) to use for all documents.
@ -134,11 +133,6 @@ html_theme_options = {
# pixels large. # pixels large.
#html_favicon = None #html_favicon = None
# 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 # If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities. # typographically correct entities.
#html_use_smartypants = True #html_use_smartypants = True

View File

@ -15,7 +15,8 @@ Victoria approved specs
:glob: :glob:
:maxdepth: 1 :maxdepth: 1
specs/victoria/* .. any patch adding a spec should uncomment the following line:
.. specs/victoria/*
Ussuri approved specs Ussuri approved specs
===================== =====================

View File

@ -6,6 +6,7 @@ description-file =
author = OpenStack author = OpenStack
author-email = openstack-discuss@lists.openstack.org author-email = openstack-discuss@lists.openstack.org
home-page = http://specs.openstack.org/openstack/cinder-specs/ home-page = http://specs.openstack.org/openstack/cinder-specs/
python-requires = >=3.6
classifier = classifier =
Environment :: OpenStack Environment :: OpenStack
Intended Audience :: Information Technology Intended Audience :: Information Technology
@ -13,14 +14,7 @@ classifier =
License :: OSI Approved :: Apache Software License License :: OSI Approved :: Apache Software License
Operating System :: POSIX :: Linux Operating System :: POSIX :: Linux
Programming Language :: Python Programming Language :: Python
Programming Language :: Python :: 2 Programming Language :: Python :: Implementation :: CPython
Programming Language :: Python :: 2.7 Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3 Programming Language :: Python :: 3
Programming Language :: Python :: 3.5 Programming Language :: Python :: 3.6
[build_sphinx]
source-dir = doc/source
build-dir = doc/build
all_files = 1
[upload_sphinx]
upload-dir = doc/build/html

View File

@ -446,8 +446,9 @@ Documentation Impact
References References
========== ==========
.. [1] https://review.opendev.org/#/c/663549/ [1] https://review.opendev.org/#/c/663549/
.. [2] https://review.opendev.org/#/c/663542/ [2] https://review.opendev.org/#/c/663542/
.. [3] https://review.opendev.org/#/c/700799/ [3] https://review.opendev.org/#/c/700799/
.. [4] https://review.opendev.org/#/c/689070/ .. [4] https://review.opendev.org/#/c/689070/
.. [5] https://open-cas.github.io/ .. [5] https://open-cas.github.io/

View File

@ -2,8 +2,8 @@
# of appearance. Changing the order has an impact on the overall integration # of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later. # process, which may cause wedges in the gate later.
openstackdocstheme>=1.11.0 openstackdocstheme>=2.0.0 # Apache-2.0
sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD sphinx>=2.0.0,!=2.1.0 # BSD
flake8 flake8
yasfb>=0.5.1 yasfb>=0.5.1
doc8>=0.6.0 # Apache-2.0 doc8>=0.6.0 # Apache-2.0

View File

@ -7,7 +7,6 @@ ignore_basepython_conflict = True
[testenv] [testenv]
basepython = python3 basepython = python3
usedevelop = True usedevelop = True
install_command = pip install -U {opts} {packages}
setenv = setenv =
VIRTUAL_ENV={envdir} VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/test-requirements.txt deps = -r{toxinidir}/test-requirements.txt
@ -16,7 +15,7 @@ deps = -r{toxinidir}/test-requirements.txt
whitelist_externals = rm whitelist_externals = rm
commands = commands =
rm -fr doc/build rm -fr doc/build
python setup.py build_sphinx sphinx-build -W -b html doc/source doc/build/html
doc8 --ignore D001 doc/source doc8 --ignore D001 doc/source
whereto doc/source/_extra/.htaccess doc/test/redirect-tests.txt whereto doc/source/_extra/.htaccess doc/test/redirect-tests.txt