doc: Update setup file examples in the plugin tutorial

This commit updates the examples of setup.py and setup.cfg
to reflect the recent changes.

- Replace dashes by underscores in setup.cfg.
  Since setuptools v54.1.0[1], the parmeters with dash have been
  deprecated in favor of the new parameters with underscore.
- Update python versions in setup.cfg to match the current
  supported versions of python in OpenStack Yoga.
- Change the homepage URL in setup.cfg from horizon URL to a notice.
- Drop a workaround for python <2.7.4 in setup.py.
- Update the pbr requirement in setup.py
- Drop the unnecessary comment not to edit it
  as setup.py is not synced globally.

[1] https://github.com/pypa/setuptools/commit/a2e9ae4cb

Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: Id38299245f31d2db17fb1b74d60cf1232ee4a509
This commit is contained in:
Takashi Kajinami 2022-02-06 01:46:23 +09:00 committed by Akihiro Motoki
parent 8fe5bbc8da
commit fa29ed8e6d
1 changed files with 7 additions and 15 deletions

View File

@ -268,19 +268,10 @@ setup.py
--------
::
# 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>=1.8'],
setup_requires=['pbr>=2.0.0'],
pbr=True)
setup.cfg
@ -290,11 +281,11 @@ setup.cfg
[metadata]
name = myplugin
summary = A panel plugin for OpenStack Dashboard
description-file =
description_file =
README.rst
author = myname
author_email = myemail
home-page = https://docs.openstack.org/horizon/latest/
home_page = __REPLACE_YOUR_PLGUIN_HOMEPAGE_URL__
classifier =
Environment :: OpenStack
Framework :: Django
@ -303,10 +294,11 @@ setup.cfg
License :: OSI Approved :: Apache Software License
Operating System :: POSIX :: Linux
Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
[files]
packages =