diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2020-06-20 17:28:51 +0100 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2020-06-20 17:28:51 +0100 |
commit | fb47ba6a394b9b7afa2be4c9b10aedef5bad0cc8 (patch) | |
tree | 0558dae8e4338323e50b76a618d5c5f48c7a8170 | |
parent | e73c8e5479297f235b37fba91d6d0e8464be66a6 (diff) | |
download | numpy-fb47ba6a394b9b7afa2be4c9b10aedef5bad0cc8.tar.gz |
REL: Fix outdated docs link
-rwxr-xr-x | setup.py | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -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', |