Skip to content

Commit

Permalink
REL: Fix outdated docs link
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-wieser committed Jun 20, 2020
1 parent e73c8e5 commit fb47ba6
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit fb47ba6

Please sign in to comment.