Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/certbot/certbot.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrien Ferrand <ferrand.ad@gmail.com>2019-02-27 00:33:39 +0300
committerAdrien Ferrand <ferrand.ad@gmail.com>2019-02-27 00:33:39 +0300
commita49393bc8ce7815776e3875094166538cf76e457 (patch)
tree2d329e5ddf917b7e0c270f14aae1502b83ac27fa
parentaa400d67f09dbff473aec497377822631aeceea9 (diff)
parentb61fc28b4e28d00a062d7ee248b22287001ba2c4 (diff)
Merge branch 'fix-pipstrap-on-windows' into no-keyauthorization-windowsno-keyauthorization-windows
-rwxr-xr-xletsencrypt-auto-source/letsencrypt-auto15
-rwxr-xr-xletsencrypt-auto-source/pieces/pipstrap.py15
-rwxr-xr-xtools/_venv_common.py2
3 files changed, 16 insertions, 16 deletions
diff --git a/letsencrypt-auto-source/letsencrypt-auto b/letsencrypt-auto-source/letsencrypt-auto
index 02656521f..dbde1ce4c 100755
--- a/letsencrypt-auto-source/letsencrypt-auto
+++ b/letsencrypt-auto-source/letsencrypt-auto
@@ -1219,7 +1219,7 @@ anything goes wrong, it will exit with a non-zero status code.
from __future__ import print_function
from distutils.version import StrictVersion
from hashlib import sha256
-from os import environ
+from os import environ, name
from os.path import join
from pipes import quote
from shutil import rmtree
@@ -1354,12 +1354,13 @@ def main():
temp,
digest)
for path, digest in PACKAGES]
- check_output('pip install --no-index --no-deps -U ' +
- # Disable cache since we're not using it and it otherwise
- # sometimes throws permission warnings:
- ('--no-cache-dir ' if has_pip_cache else '') +
- ' '.join(quote(d) for d in downloads),
- shell=True)
+ # On Windows, pip self-upgrade is not possible, it must be done through python interpreter.
+ command = ['pip'] if name != 'nt' else ['python', '-m', 'pip']
+ command.extend(['install', '--no-index', '--no-deps', '-U'])
+ # Disable cache since it is not used and it otherwise sometimes throws permission warnings:
+ command.extend(['--no-cache-dir'] if has_pip_cache else [])
+ command.extend(downloads)
+ check_output(command)
except HashError as exc:
print(exc)
except Exception:
diff --git a/letsencrypt-auto-source/pieces/pipstrap.py b/letsencrypt-auto-source/pieces/pipstrap.py
index 6a00dd9cb..014adecd2 100755
--- a/letsencrypt-auto-source/pieces/pipstrap.py
+++ b/letsencrypt-auto-source/pieces/pipstrap.py
@@ -21,7 +21,7 @@ anything goes wrong, it will exit with a non-zero status code.
from __future__ import print_function
from distutils.version import StrictVersion
from hashlib import sha256
-from os import environ
+from os import environ, name
from os.path import join
from pipes import quote
from shutil import rmtree
@@ -156,12 +156,13 @@ def main():
temp,
digest)
for path, digest in PACKAGES]
- check_output('pip install --no-index --no-deps -U ' +
- # Disable cache since we're not using it and it otherwise
- # sometimes throws permission warnings:
- ('--no-cache-dir ' if has_pip_cache else '') +
- ' '.join(quote(d) for d in downloads),
- shell=True)
+ # On Windows, pip self-upgrade is not possible, it must be done through python interpreter.
+ command = ['pip'] if name != 'nt' else ['python', '-m', 'pip']
+ command.extend(['install', '--no-index', '--no-deps', '-U'])
+ # Disable cache since it is not used and it otherwise sometimes throws permission warnings:
+ command.extend(['--no-cache-dir'] if has_pip_cache else [])
+ command.extend(downloads)
+ check_output(command)
except HashError as exc:
print(exc)
except Exception:
diff --git a/tools/_venv_common.py b/tools/_venv_common.py
index 540842773..ee889906c 100755
--- a/tools/_venv_common.py
+++ b/tools/_venv_common.py
@@ -156,8 +156,6 @@ def main(venv_name, venv_args, args):
new_environ['PATH'] = os.pathsep.join([get_venv_bin_path(venv_name), new_environ['PATH']])
subprocess_with_print('python {0}'.format('./letsencrypt-auto-source/pieces/pipstrap.py'),
env=new_environ, shell=True)
- subprocess_with_print('python -m pip install --upgrade "setuptools>=30.3"',
- env=new_environ, shell=True)
subprocess_with_print('python {0} {1}'.format('./tools/pip_install.py', ' '.join(args)),
env=new_environ, shell=True)