summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2016-07-23 13:32:23 -0400
committerJason R. Coombs <jaraco@jaraco.com>2016-07-23 13:32:23 -0400
commit4842be2133a0438524cab3b8e2abada6df9e7c5d (patch)
tree79f66cdcb9049b7e4afe59cd5cfd672246f93a43
parentcc5004500ea05e868f9a661500f3fd29a4d05037 (diff)
downloadpython-setuptools-git-4842be2133a0438524cab3b8e2abada6df9e7c5d.tar.gz
Compute dependency links, enabling short lines and codifying the path resolution.
-rwxr-xr-xsetup.py18
1 files changed, 16 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index a162872d..cff90888 100755
--- a/setup.py
+++ b/setup.py
@@ -80,6 +80,16 @@ pytest_runner = ['pytest-runner'] if needs_pytest else []
needs_wheel = set(['release', 'bdist_wheel']).intersection(sys.argv)
wheel = ['wheel'] if needs_wheel else []
+def pypi_link(pkg_filename):
+ """
+ Given the filename, including md5 fragment, construct the
+ dependency link for PyPI.
+ """
+ root = 'https://pypi.python.org/packages/source'
+ name, sep, rest = pkg_filename.partition('-')
+ parts = root, name[0], name, pkg_filename
+ return '/'.join(parts)
+
setup_params = dict(
name="setuptools",
version="25.0.0",
@@ -164,8 +174,12 @@ setup_params = dict(
"certs": "certifi==2016.2.28",
},
dependency_links=[
- 'https://pypi.python.org/packages/source/c/certifi/certifi-2016.2.28.tar.gz#md5=5d672aa766e1f773c75cfeccd02d3650',
- 'https://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.2.zip#md5=ae728f2f007185648d0c7a8679b361e2',
+ pypi_link(
+ 'certifi-2016.2.28.tar.gz#md5=5d672aa766e1f773c75cfeccd02d3650',
+ ),
+ pypi_link(
+ 'wincertstore-0.2.zip#md5=ae728f2f007185648d0c7a8679b361e2',
+ ),
],
scripts=[],
tests_require=[