Closed facundobatista closed 9 years ago
Actually, that's not the best idea:
So, using a parameter -p/--python that accepts the number (2.7) or the whole name (python2.7) or the whole path (/usr/bin/python2.7) is more explicit, safe, and easy
@facundobatista I need some help here.
First of all I think that this branch needs a merciless code review ;) https://github.com/PyAr/fades/compare/different_interpreter_versions
Then:
In fades/envbuilder.py:
don't do this:
args = args[:3] + ['--no-pip'] + args[3:]
(use args.insert)
why this and not executing 'virtualven' directly?
virtualenv_exe = sys.executable.replace('python', 'virtualenv')
In fades/helpers.py:
don't do this:
"{}/{}".format(path, file))
(use os.path.join)
don't do:
if not '/' in requested_version:
do:
if '/' not in requested_version:
I don't understand this:
if not any([char.isdigit() for char in requested_version]):
because that code is important if user passed "python" or "python2", no matter the number
In general:
you're considering the file name for the 'interpreter', like in the following line:
interpreter = sys.executable.split('/')[-1]
this breaks in the situation when /usr/bin/python and /usr/local/bin/python and /home/development/python are different...
tests failed:
Test are failing I'm working in it. I think that we can release this week. :smile:
This will be automatically decided by fades being executed like 'fades' or 'fades3', or 'fades2.7', etc...