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
- Update requirements, no need for python_version anymore
- Switch to using sphinx-build with apidoc extension
- Use newer openstackdocstheme version
- Remove Babel requirement, this is not needed.

Change-Id: I4176d8002d45449171aa5f7a7caef196ab7900d0
changes/51/720551/4
Andreas Jaeger 1 year ago
parent
commit
1a8c1bb370
  1. 12
      doc/source/conf.py
  2. 2
      doc/source/contributor/index.rst
  3. 3
      lower-constraints.txt
  4. 17
      setup.cfg
  5. 9
      setup.py
  6. 7
      test-requirements.txt
  7. 2
      tox.ini

12
doc/source/conf.py

@ -5,7 +5,7 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc',
extensions = ['sphinxcontrib.apidoc',
'sphinx.ext.viewcode',
'sphinxcontrib.rsvgconverter',
'oslo_policy.sphinxext',
@ -120,3 +120,13 @@ latex_documents = [
# -- Options for seqdiag ------------------------------------------------------
seqdiag_html_image_format = "SVG"
# -- sphinxcontrib.apidoc configuration --------------------------------------
apidoc_module_dir = '../../ironic_inspector'
apidoc_output_dir = 'contributor/api'
apidoc_excluded_paths = [
'migrations',
'test',
'common/i18n*'
]

2
doc/source/contributor/index.rst

@ -8,7 +8,7 @@ Python API
.. toctree::
:maxdepth: 1
api/autoindex
api/modules
Ironic Inspector CI
~~~~~~~~~~~~~~~~~~~

3
lower-constraints.txt

@ -18,7 +18,7 @@ keystoneauth1==3.14.0
keystonemiddleware==4.18.0
mock==3.0.0
netaddr==0.7.18
openstackdocstheme==1.20.0
openstackdocstheme==1.31.2
openstacksdk==0.40.0
os-api-ref==1.4.0
oslo.concurrency==3.26.0
@ -41,6 +41,7 @@ pytz==2013.6
reno==2.5.0
retrying==1.2.3
sphinx==1.6.2
sphinxcontrib-apidoc==0.2.0
sphinxcontrib-svg2pdfconverter==0.1.0
SQLAlchemy==1.0.10
stestr==1.0.0

17
setup.cfg

@ -6,6 +6,7 @@ author = OpenStack
author-email = openstack-discuss@lists.openstack.org
home-page = https://docs.openstack.org/ironic-inspector/latest/
license = Apache-2
python-requires = >=3.6
classifier =
Environment :: Console
Environment :: OpenStack
@ -14,6 +15,8 @@ classifier =
License :: OSI Approved :: Apache Software License
Operating System :: OS Independent
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
@ -95,17 +98,3 @@ input_file = ironic_inspector/locale/ironic_inspector.pot
keywords = _ gettext ngettext l_ lazy_gettext
mapping_file = babel.cfg
output_file = ironic_inspector/locale/ironic_inspector.pot
[build_sphinx]
all_files = 1
build-dir = doc/build
source-dir = doc/source
warning-is-error = 1
[pbr]
autodoc_index_modules = True
autodoc_exclude_modules =
ironic_inspector.migrations.*
ironic_inspector.test.*
ironic.common.i18n
api_doc_dir = contributor/api

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
test-requirements.txt

@ -1,15 +1,16 @@
# 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.
Babel!=2.4.0,>=2.3.4 # BSD
bandit!=1.6.0,>=1.1.0,<2.0.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
doc8>=0.6.0 # Apache-2.0
flake8-import-order>=0.13 # LGPLv3
hacking>=3.0.0,<3.1.0 # Apache-2.0
sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD
sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD
openstackdocstheme>=1.20.0 # Apache-2.0
sphinxcontrib-apidoc>=0.2.0 # BSD
openstackdocstheme>=1.31.2 # Apache-2.0
os-api-ref>=1.4.0 # Apache-2.0
pymemcache!=1.3.0,>=1.2.9 # Apache 2.0 License
stestr>=1.0.0 # Apache-2.0

2
tox.ini

@ -83,7 +83,7 @@ setenv = PYTHONHASHSEED=0
sitepackages = False
deps = -r{toxinidir}/test-requirements.txt
commands =
python setup.py build_sphinx
sphinx-build -W -b html doc/source doc/build/html
[testenv:pdf-docs]
whitelist_externals = make

Loading…
Cancel
Save