mirror of
https://github.com/certbot/certbot.git
synced 2026-06-06 15:22:38 -04:00
Call pipstrap during pip_install
This commit is contained in:
parent
e79af1b1de
commit
10d24f4b52
3 changed files with 9 additions and 5 deletions
|
|
@ -200,7 +200,7 @@ def install_packages(venv_name, pip_args):
|
|||
"""
|
||||
# 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')])
|
||||
|
||||
# We only use this value during pip install because:
|
||||
# 1) We're really only adding it for installing cryptography, which happens here, and
|
||||
# 2) There are issues with calling it along with VIRTUALENV_NO_DOWNLOAD, which applies at the
|
||||
|
|
|
|||
|
|
@ -70,21 +70,26 @@ def merge_requirements(tools_path, requirements, test_constraints, all_constrain
|
|||
fd.write(merged_requirements)
|
||||
|
||||
|
||||
def call_with_print(command):
|
||||
def call_with_print(command, shell=False):
|
||||
print(command)
|
||||
subprocess.check_call(command, shell=True)
|
||||
subprocess.check_call(command, shell=shell)
|
||||
|
||||
|
||||
def pip_install_with_print(args_str):
|
||||
command = '"{0}" -m pip install --disable-pip-version-check {1}'.format(sys.executable,
|
||||
args_str)
|
||||
call_with_print(command)
|
||||
call_with_print(command, shell=True)
|
||||
|
||||
|
||||
def main(args):
|
||||
tools_path = find_tools_path()
|
||||
working_dir = tempfile.mkdtemp()
|
||||
|
||||
# Pin the build environment
|
||||
repo_path = os.path.dirname(tools_path)
|
||||
call_with_print([sys.executable, os.path.normpath(
|
||||
os.path.join(repo_path, 'letsencrypt-auto-source/pieces/pipstrap.py'))])
|
||||
|
||||
if os.environ.get('TRAVIS'):
|
||||
# When this script is executed on Travis, the following print will make the log
|
||||
# be folded until the end command is printed (see finally section).
|
||||
|
|
|
|||
|
|
@ -54,7 +54,6 @@ def _compile_wheels(repo_path, build_path, venv_python):
|
|||
def _prepare_build_tools(venv_path, venv_python, repo_path):
|
||||
print('Prepare build tools')
|
||||
subprocess.check_call([sys.executable, '-m', 'venv', venv_path])
|
||||
subprocess.check_call([venv_python, os.path.join(repo_path, 'letsencrypt-auto-source', 'pieces', 'pipstrap.py')])
|
||||
subprocess.check_call([venv_python, os.path.join(repo_path, 'tools', 'pip_install.py'), 'pynsist'])
|
||||
subprocess.check_call(['choco', 'upgrade', '--allow-downgrade', '-y', 'nsis', '--version', NSIS_VERSION])
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue