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
- 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
- Update requirements, no need for python_version anymore
- Switch to using sphinx-build. Remove extra build step
  from docs build - api-ref is build separate.
- Cleanup doc/source/conf.py to remove now obsolete content.
- Use newer openstackdocstheme version
- Remove install_command from tox.ini, the default is fine

Change-Id: I7bb95a8ebd7023046baae30595159254bac25690
changes/22/719522/2
Andreas Jaeger 3 years ago
parent 2f53d6fbe6
commit f5332fd0d1

@ -136,21 +136,6 @@ html_theme = 'openstackdocs'
# 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 = '%b %d, %Y'
git_cmd = ["git", "log", "--pretty=format:%ad, commit %h", "--date=local",
"-n1"]
#try:
# html_last_updated_fmt = subprocess.check_output(git_cmd).decode('utf-8')
#except Exception:
# warnings.warn('Cannot get last updated time from git repository. '
# 'Not setting "html_last_updated_fmt".')
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
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}

@ -31,7 +31,7 @@ monotonic==1.4
msgpack==0.5.6
netaddr==0.7.19
netifaces==0.10.6
openstackdocstheme==1.18.1
openstackdocstheme==1.31.2
os-api-ref==1.4.0
oslo.cache==1.29.0
oslo.config==5.2.0

@ -34,8 +34,6 @@ repository_name = 'openstack/freezer-api'
bug_project = 'freezer'
bug_tag = 'release notes'
html_last_updated_fmt = '%Y-%m-%d %H:%M'
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

@ -9,9 +9,12 @@ author = OpenStack
author_email = openstack-discuss@lists.openstack.org
home-page = https://docs.openstack.org/freezer/latest/
python-requires = >=3.6
classifier =
Environment :: OpenStack
Programming Language :: Python
Programming Language :: Python :: Implementation :: CPython
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
@ -37,12 +40,6 @@ classifier =
packages =
freezer_api
[build_sphinx]
source-dir = doc/source
build-dir = doc/build
all_files = 1
warning-is-error = 1
[entry_points]
oslo.config.opts =
freezer-api = freezer_api.common.config:list_opts
@ -62,6 +59,3 @@ freezer.db.backends =
[pytests]
where=tests
verbosity=2
[pbr]
warnerrors = True

@ -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)

@ -7,14 +7,12 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD
oslotest>=3.3.0 # Apache-2.0
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
testrepository>=0.0.18 # Apache-2.0/BSD
testtools>=2.2.0 # MIT
os-api-ref>=1.4.0 # Apache-2.0
reno>=2.5.0 # Apache-2.0
openstackdocstheme>=1.18.1 # Apache-2.0
astroid==1.6.5;python_version<"3.0" # LGPLv2.1
astroid==2.1.0;python_version>="3.0" # LGPLv2.1
pylint==1.9.2;python_version<"3.0" # GPLv2
pylint==2.3.1;python_version>="3.0" # GPLv2
openstackdocstheme>=1.31.2 # Apache-2.0
astroid==2.1.0 # LGPLv2.1
pylint==2.3.1 # GPLv2
PyMySQL>=0.7.6 # MIT License

@ -76,8 +76,7 @@ exclude = .venv,.tox,dist,doc,*egg,specs,build
[testenv:docs]
commands =
rm -rf api-ref/build
python setup.py build_sphinx
sphinx-build -W -b html api-ref/source api-ref/build/html
sphinx-build -W -b html doc/source doc/build/html
[testenv:api-ref]
whitelist_externals = rm

Loading…
Cancel
Save