1
0
mirror of https://github.com/certbot/certbot.git synced 2025-08-08 04:02:10 +03:00

Install Python3 only dev tools with tools/venv3.py (#7215)

These packages can be useful and I found that they aren't being installed in our Python 3 development environment. Let's fix that.
This commit is contained in:
Brad Warren
2019-07-02 13:45:57 -07:00
committed by GitHub
parent 3e872627d8
commit 448d159223
3 changed files with 9 additions and 7 deletions

View File

@@ -177,12 +177,9 @@ def prepare_venv_path(venv_name):
return venv_name
def install_packages(venv_name, pip_args=None):
def install_packages(venv_name, pip_args):
"""Installs packages in the given venv.
If pip_args is given, they are the arguments given to pip,
otherwise, REQUIREMENTS is used.
:param str venv_name: The name or path at where the virtual
environment should be created.
:param pip_args: Command line arguments that should be given to
@@ -190,9 +187,6 @@ def install_packages(venv_name, pip_args=None):
:type pip_args: `list` of `str`
"""
if not pip_args:
pip_args = REQUIREMENTS
# Using the python executable from venv, we ensure to execute following commands in this venv.
py_venv = get_venv_python_path(venv_name)
subprocess_with_print([py_venv, os.path.abspath('letsencrypt-auto-source/pieces/pipstrap.py')])

View File

@@ -25,6 +25,10 @@ def main(pip_args=None):
venv_path = _venv_common.prepare_venv_path('venv')
create_venv(venv_path)
if not pip_args:
pip_args = _venv_common.REQUIREMENTS
_venv_common.install_packages(venv_path, pip_args)

View File

@@ -19,6 +19,10 @@ def create_venv(venv_path):
def main(pip_args=None):
venv_path = _venv_common.prepare_venv_path('venv3')
create_venv(venv_path)
if not pip_args:
pip_args = _venv_common.REQUIREMENTS + ['-e .[dev3]']
_venv_common.install_packages(venv_path, pip_args)