Cleanup py27 support

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
- Use sphinx-build, switch to apidoc for API building

Change-Id: If1fc722a1ebaa8334642f1b632147bc939dfa3cc
changes/15/717615/2
Andreas Jaeger 2020-04-05 18:10:08 +02:00
parent b06ee1ce49
commit d6bc685ce0
7 changed files with 18 additions and 28 deletions

View File

@ -32,7 +32,7 @@ sys.path.insert(0, os.path.abspath('../..'))
# 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',
'sphinxcontrib.apidoc',
'oslo_config.sphinxext',
'oslo_config.sphinxconfiggen',
'openstackdocstheme',
@ -97,3 +97,11 @@ latex_documents = [
# Example configuration for intersphinx: refer to the Python standard library.
#intersphinx_mapping = {'http://docs.python.org/': None}
# -- sphinxcontrib.apidoc configuration --------------------------------------
apidoc_module_dir = '../../networking_baremetal'
apidoc_output_dir = 'contributor/api'
apidoc_excluded_paths = [
'tests',
]

View File

@ -71,9 +71,9 @@ Full networking-baremetal python API reference
* :ref:`modindex`
.. # api/autoindex is hidden since it's in the modindex link above.
.. # api/modules is hidden since it's in the modindex link above.
.. toctree::
:hidden:
api/autoindex
api/modules

View File

@ -123,6 +123,7 @@ ryu==4.23
simplejson==3.13.2
snowballstemmer==1.2.1
Sphinx==1.6.2
sphinxcontrib-apidoc==0.2.0
sphinxcontrib-websupport==1.0.1
sqlalchemy-migrate==0.11.0
SQLAlchemy==1.2.5

View File

@ -6,6 +6,7 @@ description-file =
author = OpenStack
author-email = openstack-discuss@lists.openstack.org
home-page = https://docs.openstack.org/networking-baremetal/latest/
python-requires = >=3.6
classifier =
Environment :: OpenStack
Intended Audience :: Information Technology
@ -13,6 +14,8 @@ 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
@ -36,15 +39,6 @@ neutron.ml2.mechanism_drivers =
autodoc_index_modules = True
api_doc_dir = contributor/api
[build_sphinx]
source-dir = doc/source
build-dir = doc/build
all_files = 1
warning-is-error = 1
[upload_sphinx]
upload-dir = doc/build/html
[compile_catalog]
directory = networking_baremetal/locale
domain = networking_baremetal
@ -58,8 +52,3 @@ input_file = networking_baremetal/locale/networking_baremetal.pot
keywords = _ gettext ngettext l_ lazy_gettext
mapping_file = babel.cfg
output_file = networking_baremetal/locale/networking_baremetal.pot
[build_releasenotes]
all_files = 1
build-dir = releasenotes/build
source-dir = releasenotes/source

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>=2.0.0'],
pbr=True)

View File

@ -12,7 +12,8 @@ stestr>=1.0.0 # Apache-2.0
testscenarios>=0.4 # Apache-2.0/BSD
# Doc requirements
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
# releasenotes

View File

@ -44,7 +44,7 @@ commands =
setenv = PYTHONHASHSEED=0
sitepackages = False
commands =
python setup.py build_sphinx
sphinx-build -W -b html doc/source doc/build/html
[testenv:pdf-docs]
whitelist_externals = make