Commit ca57f4d0 by Eric Coissac

Patch the install scripts to run with latest version of PIP

parent f6c75e8a
......@@ -37282,14 +37282,14 @@ import shutil
import sys
import tempfile
import urllib.request, urllib.error, urllib.parse
import imp
#import imp
import zipimport
import importlib
import glob
import tarfile
import pkgutil
import stat
import pip
import subprocess
from distutils.errors import DistutilsError
from distutils.version import StrictVersion
......@@ -37331,8 +37331,9 @@ def cleanModules():
def pip_download_package(package):
tmpdir = getTmpDir()
pipcommand = os.path.join(os.path.dirname(sys.executable),'pip3')
args = ['python3 -m pip install']
args = [pipcommand,'download']
if 'http_proxy' in os.environ and 'https_proxy' not in os.environ:
os.environ['https_proxy']=os.environ['http_proxy']
......@@ -37340,17 +37341,14 @@ def pip_download_package(package):
if 'https_proxy' in os.environ:
args.append('--proxy=%s' % os.environ['http_proxy'])
args.append('--download=%s' % tmpdir)
args.append('--dest=%s' % tmpdir)
# args.append('--index-url=https://pypi.python.org/simple/')
args.append('--no-deps')
args.append('--pre')
args.append('--no-cache-dir')
args.append(package)
if os.system(" ".join(args)) != 0:
args.pop(-2)
os.system(" ".join(args))
subprocess.run(args)
filename = glob.glob(os.path.join(tmpdir,"%s*" % package))[0]
tar = tarfile.open(filename)
......@@ -39,6 +39,23 @@ VERSION=open(os.path.join(directory,'VERSION')).read().strip()
if __name__=="__main__":
import sys
print("----------------")
print(" ".join(sys.argv))
print("----------------")
#
# Horrible hack
#
if sys.argv[0]=="-c":
sys.argv[0]="setup.py"
#
# End of the horrible hack
#
from obidistutils.serenity import serenity_mode
serenity=serenity_mode(PACKAGE,VERSION)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment