From fa29ed8e6d08f05d116d8005642f2a29f1c08a12 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Sun, 6 Feb 2022 01:46:23 +0900 Subject: [PATCH] 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 Change-Id: Id38299245f31d2db17fb1b74d60cf1232ee4a509 --- doc/source/contributor/tutorials/plugin.rst | 22 +++++++-------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/doc/source/contributor/tutorials/plugin.rst b/doc/source/contributor/tutorials/plugin.rst index bde1521363..6379a21976 100644 --- a/doc/source/contributor/tutorials/plugin.rst +++ b/doc/source/contributor/tutorials/plugin.rst @@ -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 =