summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rwxr-xr-xbumper5
2 files changed, 6 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 3029279..7c8b37f 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,7 @@ NEWS for bumper
Version 0.5+git, not yet released
---------------------------------
+* Allow `setup.py` to require Python 3.
Version 0.5, released 2017-04-22
---------------------------------
diff --git a/bumper b/bumper
index bcf8899..30c8583 100755
--- a/bumper
+++ b/bumper
@@ -113,6 +113,11 @@ class Bumper(cliapp.Application):
if (stat.S_IMODE(st.st_mode) & stat.S_IXUSR) == stat.S_IXUSR:
prefix = ['./setup.py']
+ # Is Python3 mentioned? If so, assume setup.py needs it.
+ text = open('setup.py').read()
+ if prefix is None and text and 'python3' in text:
+ prefix = ['python3', 'setup.py']
+
if prefix is None:
prefix = ['python', 'setup.py']