Commit 7af7f8a6 authored by Jeremy Stanley's avatar Jeremy Stanley

Document project_urls setup parameter

Add an entry to the Setuptools usage documentation for the
project_urls dict, and include it in the "advanced" project example.

While at it, adjust the dogfooding use in Setuptools' own setup.py
to use HTTPS for the Documentation URL and drop redundant entries
for Bug Tracker and Source Code.

Also remove a no-op attribute reassignment from egg_info.py.
parent df224644
......@@ -145,6 +145,11 @@ dependencies, and perhaps some data files and scripts::
license="PSF",
keywords="hello world example examples",
url="http://example.com/HelloWorld/", # project home page, if any
project_urls={
"Bug Tracker": "https://bugs.example.com/HelloWorld/",
"Documentation": "https://docs.example.com/HelloWorld/",
"Source Code": "https://code.example.com/HelloWorld/",
}
# could also include long_description, download_url, classifiers, etc.
)
......@@ -408,6 +413,11 @@ unless you need the associated ``setuptools`` feature.
A list of modules to search for additional fixers to be used during
the 2to3 conversion. See :doc:`python3` for more details.
``project_urls``
An arbitrary map of URL names to hyperlinks, allowing more extensible
documentation of where various resources can be found than the simple
``url`` and ``download_url`` options provide.
Using ``find_packages()``
-------------------------
......
......@@ -99,9 +99,7 @@ setup_params = dict(
keywords="CPAN PyPI distutils eggs package management",
url="https://github.com/pypa/setuptools",
project_urls={
"Bug Tracker": "https://github.com/pypa/setuptools/issues",
"Documentation": "http://setuptools.readthedocs.io/",
"Source Code": "https://github.com/pypa/setuptools",
"Documentation": "https://setuptools.readthedocs.io/",
},
src_root=None,
packages=setuptools.find_packages(exclude=['*.tests']),
......
......@@ -597,7 +597,6 @@ def write_pkg_info(cmd, basename, filename):
metadata = cmd.distribution.metadata
metadata.version, oldver = cmd.egg_version, metadata.version
metadata.name, oldname = cmd.egg_name, metadata.name
metadata.project_urls = cmd.distribution.metadata.project_urls
metadata.long_description_content_type = getattr(
cmd.distribution,
'long_description_content_type'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment