python 3.4/3.5 compat for vox

This commit is contained in:
Stephan Fitzpatrick 2018-12-21 18:39:26 -08:00
parent 7c0c6b77d0
commit e073545077
3 changed files with 22 additions and 4 deletions

View file

@ -2,3 +2,23 @@
* ``vox new`` has an added ``-p --interpreter`` flag for choosing the python interpreter to use for virtualenv creation * ``vox new`` has an added ``-p --interpreter`` flag for choosing the python interpreter to use for virtualenv creation
* The default Python intrepreter vox uses to create virtual environments can be set using the ``$VOX_DEFAULT_INTERPRETER`` environment variable. * The default Python intrepreter vox uses to create virtual environments can be set using the ``$VOX_DEFAULT_INTERPRETER`` environment variable.
**Changed:**
* <news item>
**Deprecated:**
* <news item>
**Removed:**
* <news item>
**Fixed:**
* <news item>
**Security:**
* <news item>

View file

@ -34,7 +34,7 @@ class VoxHandler:
default=None, default=None,
help=textwrap.dedent( help=textwrap.dedent(
""" """
The Python interpreter used to create the virtual environment. The Python interpreter used to create the virtual environment.
Can be configured via the $VOX_DEFAULT_INTERPRETER environment variable. Can be configured via the $VOX_DEFAULT_INTERPRETER environment variable.
""" """
).strip(), ).strip(),

View file

@ -120,7 +120,6 @@ class Vox(collections.abc.Mapping):
def create( def create(
self, self,
name, name,
*,
interpreter=None, interpreter=None,
system_site_packages=False, system_site_packages=False,
symlinks=False, symlinks=False,
@ -162,7 +161,7 @@ class Vox(collections.abc.Mapping):
self._create(env_path, interpreter, symlinks=symlinks, with_pip=with_pip) self._create(env_path, interpreter, symlinks=symlinks, with_pip=with_pip)
events.vox_on_create.fire(name=name) events.vox_on_create.fire(name=name)
def upgrade(self, name, *, symlinks=False, with_pip=True, interpreter=None): def upgrade(self, name, symlinks=False, with_pip=True, interpreter=None):
"""Create a virtual environment in $VIRTUALENV_HOME with python3's ``venv``. """Create a virtual environment in $VIRTUALENV_HOME with python3's ``venv``.
WARNING: If a virtual environment was created with symlinks or without PIP, you must WARNING: If a virtual environment was created with symlinks or without PIP, you must
@ -209,7 +208,6 @@ class Vox(collections.abc.Mapping):
def _create( def _create(
env_path, env_path,
interpreter, interpreter,
*,
system_site_packages=False, system_site_packages=False,
symlinks=False, symlinks=False,
with_pip=True, with_pip=True,