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: Wheel is not needed for python 3 only repo - Update requirements, no need for python_version anymore - Use modern sphinx-build for docs building, update openstackdocstheme, fix api-doc building. Change-Id: I40b67f330ac850bf45cca742a8b967fd12480ce3
This commit is contained in:
parent
2830afdc75
commit
5946fbb5b1
@ -2,5 +2,7 @@
|
|||||||
# of appearance. Changing the order has an impact on the overall integration
|
# of appearance. Changing the order has an impact on the overall integration
|
||||||
# process, which may cause wedges in the gate later.
|
# process, which may cause wedges in the gate later.
|
||||||
|
|
||||||
openstackdocstheme>=1.18.1 # Apache-2.0
|
openstackdocstheme>=1.32.1 # Apache-2.0
|
||||||
sphinx!=1.6.6,!=1.6.7,>=1.6.5;python_version>='3.4' # BSD
|
sphinx!=1.6.6,!=1.6.7,>=1.6.5 # BSD
|
||||||
|
sphinxcontrib-apidoc>=0.2.0 # BSD
|
||||||
|
|
||||||
|
@ -20,12 +20,20 @@ from watcherclient import version as watcherclient_version
|
|||||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
||||||
extensions = ['sphinx.ext.autodoc',
|
extensions = ['sphinx.ext.autodoc',
|
||||||
'sphinx.ext.viewcode',
|
'sphinx.ext.viewcode',
|
||||||
|
'sphinxcontrib.apidoc',
|
||||||
'openstackdocstheme',
|
'openstackdocstheme',
|
||||||
]
|
]
|
||||||
# autodoc generation is a bit aggressive and a nuisance when doing heavy
|
# autodoc generation is a bit aggressive and a nuisance when doing heavy
|
||||||
# text edit cycles.
|
# text edit cycles.
|
||||||
# execute "export SPHINX_DEBUG=1" in your terminal to disable
|
# execute "export SPHINX_DEBUG=1" in your terminal to disable
|
||||||
|
|
||||||
|
# sphinxcontrib.apidoc options
|
||||||
|
apidoc_module_dir = '../../watcherclient'
|
||||||
|
apidoc_output_dir = 'reference/api'
|
||||||
|
apidoc_excluded_paths = [
|
||||||
|
'tests/*']
|
||||||
|
apidoc_separate_modules = True
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
templates_path = ['_templates']
|
templates_path = ['_templates']
|
||||||
|
|
||||||
@ -104,7 +112,5 @@ repository_name = 'openstack/python-watcherclient'
|
|||||||
bug_project = 'python-watcherclient'
|
bug_project = 'python-watcherclient'
|
||||||
bug_tag = ''
|
bug_tag = ''
|
||||||
|
|
||||||
# Must set this variable to include year, month, day, hours, and minutes.
|
|
||||||
html_last_updated_fmt = '%Y-%m-%d %H:%M'
|
|
||||||
|
|
||||||
#html_theme_options = {"show_other_versions": "True"}
|
#html_theme_options = {"show_other_versions": "True"}
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
======================
|
|
||||||
Python API Reference
|
|
||||||
======================
|
|
||||||
|
|
||||||
.. toctree::
|
|
||||||
:maxdepth: 2
|
|
||||||
|
|
||||||
autoindex
|
|
@ -10,5 +10,5 @@ done so, you can use the API like so.
|
|||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
|
|
||||||
api/index
|
api/modules
|
||||||
api_v1
|
api_v1
|
||||||
|
@ -40,7 +40,7 @@ msgpack-python==0.4.0
|
|||||||
munch==2.2.0
|
munch==2.2.0
|
||||||
netaddr==0.7.19
|
netaddr==0.7.19
|
||||||
netifaces==0.10.6
|
netifaces==0.10.6
|
||||||
openstackdocstheme==1.18.1
|
openstackdocstheme==1.32.1
|
||||||
openstacksdk==0.12.0
|
openstacksdk==0.12.0
|
||||||
os-client-config==1.29.0
|
os-client-config==1.29.0
|
||||||
os-service-types==1.2.0
|
os-service-types==1.2.0
|
||||||
|
10
setup.cfg
10
setup.cfg
@ -6,6 +6,7 @@ description-file =
|
|||||||
author = OpenStack
|
author = OpenStack
|
||||||
author-email = openstack-discuss@lists.openstack.org
|
author-email = openstack-discuss@lists.openstack.org
|
||||||
home-page = https://docs.openstack.org/python-watcherclient/latest/
|
home-page = https://docs.openstack.org/python-watcherclient/latest/
|
||||||
|
python-requires = >=3.6
|
||||||
classifier =
|
classifier =
|
||||||
Environment :: OpenStack
|
Environment :: OpenStack
|
||||||
Intended Audience :: Information Technology
|
Intended Audience :: Information Technology
|
||||||
@ -112,15 +113,6 @@ autodoc_exclude_modules =
|
|||||||
watcherclient.tests.*
|
watcherclient.tests.*
|
||||||
api_doc_dir = reference/api
|
api_doc_dir = reference/api
|
||||||
|
|
||||||
[build_sphinx]
|
|
||||||
source-dir = doc/source
|
|
||||||
build-dir = doc/build
|
|
||||||
all_files = 1
|
|
||||||
warning-is-error = 1
|
|
||||||
|
|
||||||
[bdist_wheel]
|
|
||||||
universal = 1
|
|
||||||
|
|
||||||
[compile_catalog]
|
[compile_catalog]
|
||||||
directory = watcherclient/locale
|
directory = watcherclient/locale
|
||||||
domain = watcherclient
|
domain = watcherclient
|
||||||
|
9
setup.py
9
setup.py
@ -13,17 +13,8 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT
|
|
||||||
import setuptools
|
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(
|
setuptools.setup(
|
||||||
setup_requires=['pbr>=2.0.0'],
|
setup_requires=['pbr>=2.0.0'],
|
||||||
pbr=True)
|
pbr=True)
|
||||||
|
3
tox.ini
3
tox.ini
@ -46,7 +46,8 @@ deps =
|
|||||||
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||||
-r{toxinidir}/requirements.txt
|
-r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/doc/requirements.txt
|
-r{toxinidir}/doc/requirements.txt
|
||||||
commands = python setup.py build_sphinx
|
commands = sphinx-build -W -b html doc/source doc/build/html
|
||||||
|
|
||||||
|
|
||||||
[testenv:pdf-docs]
|
[testenv:pdf-docs]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
|
Loading…
x
Reference in New Issue
Block a user