summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-01-08 13:54:33 +0000
committerGerrit Code Review <review@openstack.org>2018-01-08 13:54:33 +0000
commit8a9a6d80bf256c56e581e16441b2d1154b4ecf99 (patch)
tree5dc869930f7768e733e472486208b2c92d30a8e5
parent4c775e7890e90fc2ea77c66020659e52d6a61414 (diff)
parent839ef3428d909e3b198a58029147d3d834c540d8 (diff)
downloadpbr-8a9a6d80bf256c56e581e16441b2d1154b4ecf99.tar.gz
Merge "Support PEP 345 Project-URL metadata"
-rw-r--r--doc/source/user/using.rst4
-rw-r--r--pbr/tests/testpackage/setup.cfg4
-rw-r--r--pbr/util.py10
-rw-r--r--setup.cfg4
4 files changed, 22 insertions, 0 deletions
diff --git a/doc/source/user/using.rst b/doc/source/user/using.rst
index 0b91141..3a53210 100644
--- a/doc/source/user/using.rst
+++ b/doc/source/user/using.rst
@@ -53,6 +53,10 @@ itself):
description-file = README.rst
description-content-type = text/x-rst; charset=UTF-8
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 5af1514..bf4c26a 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 75fa01c..9947b2b 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"),
@@ -149,6 +150,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")
@@ -322,6 +326,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 d2d8526..d030b62 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -7,6 +7,10 @@ description-file =
README.rst
description-content-type = text/x-rst; charset=UTF-8
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