forked from github.com/pypiserver
Debugging of pypi-server -Ux execution of pip install -d which has been replaced by pip download since version 10.0.0
This commit is contained in:
parent
e85ed3f5e6
commit
c9b0d59f3e
@ -4,6 +4,8 @@ from subprocess import call
|
||||
|
||||
from . import core
|
||||
import itertools
|
||||
import pip
|
||||
from distutils.version import StrictVersion
|
||||
|
||||
if sys.version_info >= (3, 0):
|
||||
from xmlrpc.client import Server
|
||||
@ -140,9 +142,14 @@ def update(pkgset, destdir=None, dry_run=False, stable_only=True):
|
||||
sys.stdout.write("# update %s from %s to %s\n" %
|
||||
(pkg.pkgname, pkg.replaces.version, pkg.version))
|
||||
|
||||
cmd = ["pip", "-q", "install", "--no-deps", "-i", "https://pypi.org/simple",
|
||||
"-d", destdir or os.path.dirname(pkg.replaces.fn),
|
||||
"%s==%s" % (pkg.pkgname, pkg.version)]
|
||||
if StrictVersion(pip.__version__) < StrictVersion('10.0.0'):
|
||||
cmd = ["pip", "-q", "install", "--no-deps", "-i", "https://pypi.org/simple",
|
||||
"-d", destdir or os.path.dirname(pkg.replaces.fn),
|
||||
"%s==%s" % (pkg.pkgname, pkg.version)]
|
||||
else:
|
||||
cmd = ["pip", "-q", "download", "--no-deps", "-i", "https://pypi.org/simple",
|
||||
"-d", destdir or os.path.dirname(pkg.replaces.fn),
|
||||
"%s==%s" % (pkg.pkgname, pkg.version)]
|
||||
|
||||
sys.stdout.write("%s\n\n" % (" ".join(cmd),))
|
||||
if not dry_run:
|
||||
|
Loading…
Reference in New Issue
Block a user