Browse Source

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
- 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: I623b1e0bfc2ec8cd9ce017556101cdeb06a1bb4c
changes/97/723797/1
Andreas Jaeger 1 year ago
parent
commit
d399c7dbe1
  1. 4
      doc/requirements.txt
  2. 13
      doc/source/conf.py
  3. 10
      setup.cfg
  4. 9
      setup.py
  5. 7
      tox.ini

4
doc/requirements.txt

@ -1,8 +1,8 @@
# 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,>=1.6.2 # BSD
sphinx>=2.0.0,!=2.1.0 # BSD
os-client-config>=1.28.0 # Apache-2.0
openstackdocstheme>=1.18.1 # Apache-2.0
openstackdocstheme>=2.0.0 # Apache-2.0
reno>=2.5.0 # Apache-2.0
requests-mock>=1.2.0 # Apache-2.0

13
doc/source/conf.py

@ -72,14 +72,6 @@ master_doc = 'index'
project = u'zaqarclient'
copyright = u'2010-present, OpenStack Foundation'
# 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.
#
from zaqarclient.version import version_string
# The full version, including alpha/beta/rc tags.
version = release = version_string
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
@ -162,11 +154,6 @@ html_theme_options = {}
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = []
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
# Must set this variable to include year, month, day, hours, and minutes.
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

10
setup.cfg

@ -6,6 +6,7 @@ description-file =
author = OpenStack
author-email = openstack-discuss@lists.openstack.org
home-page = https://docs.openstack.org/python-zaqarclient/latest/
python-requires = >=3.6
classifier =
Development Status :: 4 - Beta
Environment :: Console
@ -16,14 +17,12 @@ classifier =
License :: OSI Approved :: Apache Software License
Operating System :: POSIX :: Linux
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
[global]
setup-hooks =
pbr.hooks.setup_hook
[files]
packages =
zaqarclient
@ -142,6 +141,3 @@ openstack.cli.extension =
[nosetests]
where=tests
verbosity=2
[wheel]
universal = 1

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)

7
tox.ini

@ -7,23 +7,18 @@ ignore_basepython_conflict = True
[testenv]
basepython = python3
usedevelop = True
# Customize pip command, add -U to force updates.
install_command = pip install {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
OS_STDOUT_CAPTURE=1
OS_STDERR_CAPTURE=1
OS_TEST_TIMEOUT=60
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = find . -type f -name "*.pyc" -delete
stestr run {posargs}
whitelist_externals = find
[tox:jenkins]
sitepackages = True
[testenv:pep8]
commands = flake8

Loading…
Cancel
Save