-
Notifications
You must be signed in to change notification settings - Fork 246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enforce Python 2.7 during installation #414
Conversation
setup.py
Outdated
# make sure we have a proper version of python | ||
if sys.version_info[:2] != (2, 7): | ||
raise RuntimeError("Python version 2.7 is required.") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
I don't think we actually depend on "2.7" (but definitely "less than 3.0" so maybe that would be a better check?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reduced the check to only test for python 2.
cda3b22
to
c0888de
Compare
Codecov Report
@@ Coverage Diff @@
## master #414 +/- ##
==========================================
- Coverage 88.01% 88.01% -0.01%
==========================================
Files 146 146
Lines 27578 27578
Branches 3921 3921
==========================================
- Hits 24274 24273 -1
- Misses 2599 2600 +1
Partials 705 705
Continue to review full report at Codecov.
|
Okay, I've confirmed that this gives a way nicer error-message if you're on Debian stable and just created a virtualenv with Namely, it says "Python version 2 required" instead of some parse-error from the setup.py of zfec (because it happens to |
BTW, I opened https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2876, as this change breaks our Ubuntu/Xenial (16.04-LTS) buildbot, where Our Travis config runs everything in a py2 virtualenv, and updates |
Hi there,
this patch raises a RuntimeError if Python 2.7 is not used for the installation. Multiple people recently tried to install tahoe-lafs on Python 3 (despite the hint in the readme) so I made it hard to do the wrong thing.
Cheers,
tpltnt