diff --git a/doc/source/user/using.rst b/doc/source/user/using.rst index 4b08ec4e..e22dc548 100644 --- a/doc/source/user/using.rst +++ b/doc/source/user/using.rst @@ -52,6 +52,10 @@ itself): summary = OpenStack's setup automation in a reusable form description-file = README home-page = https://launchpad.net/pbr + project_urls = + Bug Tracker = https://bugs.launchpad.net/pbr/ + Documentation = https://docs.openstack.org/pbr/ + Source Code = https://git.openstack.org/cgit/openstack-dev/pbr/ license = Apache-2 classifier = Development Status :: 4 - Beta diff --git a/pbr/tests/testpackage/setup.cfg b/pbr/tests/testpackage/setup.cfg index d10a87e9..d0d899b4 100644 --- a/pbr/tests/testpackage/setup.cfg +++ b/pbr/tests/testpackage/setup.cfg @@ -6,6 +6,10 @@ version = 0.1.dev author = OpenStack author-email = openstack-dev@lists.openstack.org home-page = http://pypi.python.org/pypi/pbr +project_urls = + Bug Tracker = https://bugs.launchpad.net/pbr/ + Documentation = https://docs.openstack.org/pbr/ + Source Code = https://git.openstack.org/cgit/openstack-dev/pbr/ summary = Test package for testing pbr description-file = README.txt diff --git a/pbr/util.py b/pbr/util.py index dc8995ea..b6c12d73 100644 --- a/pbr/util.py +++ b/pbr/util.py @@ -101,6 +101,7 @@ D1_D2_SETUP_ARGS = { "maintainer": ("metadata",), "maintainer_email": ("metadata",), "url": ("metadata", "home_page"), + "project_urls": ("metadata",), "description": ("metadata", "summary"), "keywords": ("metadata",), "long_description": ("metadata", "description"), @@ -148,6 +149,9 @@ MULTI_FIELDS = ("classifiers", "tests_require", "cmdclass") +# setup() arguments that can have mapping values in setup.cfg +MAP_FIELDS = ("project_urls",) + # setup() arguments that contain boolean values BOOL_FIELDS = ("use_2to3", "zip_safe", "include_package_data") @@ -321,6 +325,12 @@ def setup_cfg_to_setup_kwargs(config, script_args=()): in_cfg_value = split_csv(in_cfg_value) if arg in MULTI_FIELDS: in_cfg_value = split_multiline(in_cfg_value) + elif arg in MAP_FIELDS: + in_cfg_map = {} + for i in split_multiline(in_cfg_value): + k, v = i.split('=') + in_cfg_map[k.strip()] = v.strip() + in_cfg_value = in_cfg_map elif arg in BOOL_FIELDS: # Provide some flexibility here... if in_cfg_value.lower() in ('true', 't', '1', 'yes', 'y'): diff --git a/setup.cfg b/setup.cfg index 35f0d729..be8cfd43 100644 --- a/setup.cfg +++ b/setup.cfg @@ -6,6 +6,10 @@ summary = Python Build Reasonableness description-file = README.rst home-page = https://docs.openstack.org/pbr/latest/ +project_urls = + Bug Tracker = https://bugs.launchpad.net/pbr/ + Documentation = https://docs.openstack.org/pbr/ + Source Code = https://git.openstack.org/cgit/openstack-dev/pbr/ requires-python = >=2.6 classifier = Development Status :: 5 - Production/Stable