Don't install RBTools on Python < 2.5
Review Request #5212 — Created Jan. 7, 2014 and submitted — Latest diff uploaded
Don't install RBTools on Python < 2.5
This adds a check to setup.py to enforce a minimum python version, like the one
we have for Review Board.
Tried installing on a system with 2.4.x and saw the error.
setup.py | |||
---|---|---|---|
Revision e77e0c1e060d79aac686ed36cf985dfdac7aec94 | New Change | ||
50 lines | |||
51 |
import json |
51 |
import json |
52 |
except ImportError: |
52 |
except ImportError: |
53 |
install_requires.append('simplejson') |
53 |
install_requires.append('simplejson') |
54 | 54 | ||
55 | 55 | ||
56 |
# Make sure this is a version of Python we are compatible with. This should
|
||
57 |
# prevent people on older versions from unintentionally trying to install
|
||
58 |
# the source tarball, and failing.
|
||
59 |
if sys.hexversion < 0x02050000: |
||
60 |
sys.stderr.write( |
||
61 |
'RBTools %s is incompatible with your version of Python.\n' |
||
62 |
'Please install RBTools 0.5.x or upgrade Python to at least '
|
||
63 |
'2.5.x (preferably 2.7).\n' % get_package_version()) |
||
64 |
sys.exit(1) |
||
65 | |||
66 | |||
56 |
rb_commands = [ |
67 |
rb_commands = [ |
57 |
'api-get = rbtools.commands.api_get:APIGet', |
68 |
'api-get = rbtools.commands.api_get:APIGet', |
58 |
'attach = rbtools.commands.attach:Attach', |
69 |
'attach = rbtools.commands.attach:Attach', |
59 |
'close = rbtools.commands.close:Close', |
70 |
'close = rbtools.commands.close:Close', |
60 |
'setup-repo = rbtools.commands.setup_repo:SetupRepo', |
71 |
'setup-repo = rbtools.commands.setup_repo:SetupRepo', |
49 lines |
contrib/internal/release.py |
---|