- Plone CLI version: 2.1.2
- Python version: 2.7
- Operating System: Ubuntu 18.04
Right now, the logic to use virtualenv instead of venv is a bit fragile, since it tries to detect python 2 by comparing if the bin is python2.7
|
if python_bin == "python2.7": |
A more robust condition using sys.version_info is better since you can use any compiled python in any path. A little hackish, but it works instead of comparing to python2.7string: if subprocess.call([python_bin, "-c", "import sys; sys.exit(0) if sys.version_info.major == 2 else sys.exit(1)"]) == 0
@jensens