Skip to content
This repository has been archived by the owner on May 25, 2022. It is now read-only.

Commit

Permalink
Merge pull request #476 from tacaswell/fix_python_dev
Browse files Browse the repository at this point in the history
BLD: allow pre-releases to pass the python version check
  • Loading branch information
bsipocz committed May 6, 2019
1 parent 7653d18 commit 61e27b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ astropy-helpers Changelog
- Removed ``tocdepthfix`` sphinx extension that worked around a big in
Sphinx that has been long fixed. [#475]

- Allow Python dev versions to pass the python version check. [#476]


2.0.9 (2019-02-22)
Expand Down
7 changes: 4 additions & 3 deletions ah_bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,10 @@

# We want the Python version as a string, which we can get from the platform module
import platform
python_version = platform.python_version()

if not req.specifier.contains(python_version):
# strip off trailing '+' incase this is a dev install of python
python_version = platform.python_version().strip('+')
# allow pre-releases to count as 'new enough'
if not req.specifier.contains(python_version, True):
if parent_package is None:
print("ERROR: Python {} is required by this package".format(req.specifier))
else:
Expand Down

0 comments on commit 61e27b7

Please sign in to comment.