Merge "Support PEP 345 Project-URL metadata"
This commit is contained in:
commit
8a9a6d80bf
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
10
pbr/util.py
10
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'):
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue