diff options
author | Lars Wirzenius <liw@liw.fi> | 2017-08-01 12:32:41 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2017-08-01 12:32:41 +0300 |
commit | eacb7bed412cf76748202b41aa67b6fe8e937f37 (patch) | |
tree | 742d7a6ae35d148fc52e406c73bd1eb2ea0bf3d7 | |
parent | 86efda0e4552610a87276c18cfeb90371e7670ba (diff) | |
download | bumper-eacb7bed412cf76748202b41aa67b6fe8e937f37.tar.gz |
Add: python3 support for running setup.py
-rw-r--r-- | NEWS | 1 | ||||
-rwxr-xr-x | bumper | 5 |
2 files changed, 6 insertions, 0 deletions
@@ -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 --------------------------------- @@ -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'] |