Cleanup py27 support

Py27 is dead, let's do a few cleanups:
- Remove python 2.7 stanza from setup.py
- Add requires on python >= 3.6 to setup.cfg so that pypi and pip
  know about the requirement
- Remove obsolete sections from setup.cfg
- Update classifiers
- Switch to using sphinx-build and openstackdocstheme, update
  versions of tools
- Remove install_command from tox.ini, the default is fine
- Remove babel.cfg, it's not used
- Update to hacking 3.0

Change-Id: I21c89e05a33ce614f1af5288433a993b599e0a35
This commit is contained in:
Andreas Jaeger 2020-05-03 13:31:42 +02:00
parent 444cce2d12
commit f0d941dcfc
7 changed files with 18 additions and 62 deletions

View File

@ -1,2 +0,0 @@
[python: **.py]

View File

@ -23,7 +23,7 @@ sys.path.insert(0, os.path.abspath('../..'))
extensions = [
'sphinx.ext.autodoc',
#'sphinx.ext.intersphinx',
'oslosphinx'
'openstackdocstheme'
]
# autodoc generation is a bit aggressive and a nuisance when doing heavy
@ -55,7 +55,7 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. Major themes that come with
# Sphinx are currently 'default' and 'sphinxdoc'.
# html_theme_path = ["."]
# html_theme = '_theme'
html_theme = 'openstackdocs'
# html_static_path = ['static']
# Output file base name for HTML help builder.

View File

@ -38,7 +38,7 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'oslosphinx',
'openstackdocstheme',
'reno.sphinxext',
]
@ -109,7 +109,7 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'
html_theme = 'openstackdocs'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the

View File

@ -5,7 +5,8 @@ description-file =
README.rst
author = OpenStack
author-email = openstack-discuss@lists.openstack.org
home-page = http://www.openstack.org/
home-page = https://www.openstack.org/
python-requires = >=3.6
classifier =
Environment :: OpenStack
Intended Audience :: Information Technology
@ -13,36 +14,13 @@ classifier =
License :: OSI Approved :: Apache Software License
Operating System :: POSIX :: Linux
Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: Implementation :: CPython
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
[files]
packages =
release_test
[build_sphinx]
source-dir = doc/source
build-dir = doc/build
all_files = 1
[upload_sphinx]
upload-dir = doc/build/html
[compile_catalog]
directory = release-test/locale
domain = release-test
[update_catalog]
domain = release-test
output_dir = release-test/locale
input_file = release-test/locale/release-test.pot
[extract_messages]
keywords = _ gettext ngettext l_ lazy_gettext
mapping_file = babel.cfg
output_file = release-test/locale/release-test.pot
[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'],
pbr=True)

View File

@ -2,15 +2,14 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
hacking<0.11,>=0.10.0
hacking<3.1.0,>=3.0.0
coverage>=3.6
python-subunit>=0.0.18
sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD
sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2;python_version>='3.4' # BSD
oslosphinx>=2.5.0 # Apache-2.0
sphinx!=2.1.0,>=2.0.0 # BSD
openstackdocstheme>=2.0.0 # Apache-2.0
reno>=2.5.0 # Apache2
oslotest>=1.10.0 # Apache-2.0
stestr>=2.0.0 # Apache-2.0
testscenarios>=0.4
testtools>=1.4.0
reno>=0.1.1 # Apache2

16
tox.ini
View File

@ -1,32 +1,25 @@
[tox]
minversion = 2.0
distribute = False
envlist = py35,py27,pep8
envlist = py36,pep8
[testenv]
basepython = python3
install_command = pip install {opts} {packages}
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
commands =
python setup.py test --coverage --coverage-package-name=oslo_config --slowest {posargs}
coverage report --show-missing
[testenv:py27]
basepython = python2.7
[testenv:pep8]
basepython = python3
commands = flake8 {posargs}
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:cover]
basepython = python3
setenv =
{[testenv]setenv}
PYTHON=coverage run --source release_test --parallel-mode
@ -37,15 +30,12 @@ commands =
coverage xml -o cover/coverage.xml
[testenv:docs]
basepython = python3
commands = python setup.py build_sphinx
commands = sphinx-build -W -b html doc/source doc/build/html
[testenv:debug]
basepython = python3
commands = oslo_debug_helper {posargs}
[testenv:releasenotes]
basepython = python3
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[flake8]