summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2020-06-20 17:28:51 +0100
committerEric Wieser <wieser.eric@gmail.com>2020-06-20 17:28:51 +0100
commitfb47ba6a394b9b7afa2be4c9b10aedef5bad0cc8 (patch)
tree0558dae8e4338323e50b76a618d5c5f48c7a8170
parente73c8e5479297f235b37fba91d6d0e8464be66a6 (diff)
downloadnumpy-fb47ba6a394b9b7afa2be4c9b10aedef5bad0cc8.tar.gz
REL: Fix outdated docs link
-rwxr-xr-xsetup.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 8178a6c51..2cd2bda02 100755
--- a/setup.py
+++ b/setup.py
@@ -403,6 +403,16 @@ def parse_setuppy_commands():
return True
+def get_docs_url():
+ if not ISRELEASED:
+ return "https://numpy.org/devdocs"
+ else:
+ # For releaeses, this URL ends up on pypi.
+ # By pinning the version, users looking at old PyPI releases can get
+ # to the associated docs easily.
+ return "https://numpy.org/doc/{}.{}".format(MAJOR, MINOR)
+
+
def setup_package():
src_path = os.path.dirname(os.path.abspath(__file__))
old_path = os.getcwd()
@@ -437,7 +447,7 @@ def setup_package():
download_url = "https://pypi.python.org/pypi/numpy",
project_urls={
"Bug Tracker": "https://github.com/numpy/numpy/issues",
- "Documentation": "https://docs.scipy.org/doc/numpy/",
+ "Documentation": get_docs_url(),
"Source Code": "https://github.com/numpy/numpy",
},
license = 'BSD',