Cleanup Python 2.7 support

OpenStack is dropping the py2.7 support in ussuri cycle.

Make 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 section from setup.cfg: Wheel is not needed for python
  3 only repo
- Remove ancient sections from setup.cfg
- Update requirements
- Update api-ref/source/conf.py for current openstackdocstheme
- Don't test for broken po files, this is done in the infra scripts
  since a long time
- Change shebang lines to use python3

Change-Id: If5276a47b8822c5c19d045fbc5c41394f4a9dd2d
This commit is contained in:
Andreas Jaeger 2020-03-27 16:57:33 +01:00 committed by Andreas Jaeger
parent ecd94b1a89
commit 98a67d5b96
7 changed files with 4 additions and 26 deletions

View File

@ -25,8 +25,6 @@
import os
import sys
import openstackdocstheme
# 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.
@ -41,14 +39,13 @@ sys.path.insert(0, os.path.abspath('./'))
extensions = [
'os_api_ref',
'openstackdocstheme'
]
html_theme = 'openstackdocs'
html_theme_path = [openstackdocstheme.get_html_theme_path()]
html_theme_options = {
"sidebar_mode": "toc",
}
html_context = {'bug_project': 'tacker', 'bug_tag': 'api-ref'}
# The suffix of source filenames.
source_suffix = '.rst'

View File

@ -1,7 +1,7 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2;python_version>='3.4' # BSD
sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2 # BSD
sphinxcontrib-apidoc>=0.2.0 # BSD
openstackdocstheme>=1.20.0 # Apache-2.0
os-api-ref>=1.4.0 # Apache-2.0

View File

@ -6,6 +6,7 @@ description-file =
author = OpenStack
author-email = openstack-discuss@lists.openstack.org
home-page = https://docs.openstack.org/tacker/
python-requires = >=3.6
classifier =
Environment :: OpenStack
Intended Audience :: Information Technology
@ -104,11 +105,6 @@ oslo.policy.policies =
# aggregate method.
tacker = tacker.policies:list_rules
[build_releasenotes]
all_files = 1
build-dir = releasenotes/build
source-dir = releasenotes/source
[extract_messages]
keywords = _ gettext ngettext l_ lazy_gettext
mapping_file = babel.cfg
@ -122,6 +118,3 @@ domain = tacker
domain = tacker
output_dir = tacker/locale
input_file = tacker/locale/tacker.pot
[wheel]
universal = 1

View File

@ -16,14 +16,6 @@
# 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

@ -1,5 +1,3 @@
#!/usr/bin/env python
# Copyright 2011 VMware, Inc.
# All Rights Reserved.
#

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
@ -22,7 +22,6 @@
"""
Installation script for Tacker's development virtualenv
"""
from __future__ import print_function
import os
import sys

View File

@ -47,7 +47,6 @@ commands =
flake8
doc8 -e .rst doc/source/ CONTRIBUTING.rst HACKING.rst README.rst TESTING.rst
tacker-db-manage check_migration
bash -c "find tacker -type f -regex '.*\.pot?' -print0|xargs -0 --no-run-if-empty -n 1 msgfmt --check-format -o /dev/null"
whitelist_externals = bash
[testenv:i18n]