Commit ca57f4d0 by Eric Coissac

Patch the install scripts to run with latest version of PIP

parent f6c75e8a
...@@ -37282,14 +37282,14 @@ import shutil ...@@ -37282,14 +37282,14 @@ import shutil
import sys import sys
import tempfile import tempfile
import urllib.request, urllib.error, urllib.parse import urllib.request, urllib.error, urllib.parse
import imp #import imp
import zipimport import zipimport
import importlib import importlib
import glob import glob
import tarfile import tarfile
import pkgutil import pkgutil
import stat import stat
import pip import subprocess
from distutils.errors import DistutilsError from distutils.errors import DistutilsError
from distutils.version import StrictVersion from distutils.version import StrictVersion
...@@ -37331,8 +37331,9 @@ def cleanModules(): ...@@ -37331,8 +37331,9 @@ def cleanModules():
def pip_download_package(package): def pip_download_package(package):
tmpdir = getTmpDir() 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: if 'http_proxy' in os.environ and 'https_proxy' not in os.environ:
os.environ['https_proxy']=os.environ['http_proxy'] os.environ['https_proxy']=os.environ['http_proxy']
...@@ -37340,17 +37341,14 @@ def pip_download_package(package): ...@@ -37340,17 +37341,14 @@ def pip_download_package(package):
if 'https_proxy' in os.environ: if 'https_proxy' in os.environ:
args.append('--proxy=%s' % os.environ['http_proxy']) 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('--index-url=https://pypi.python.org/simple/')
args.append('--no-deps') args.append('--no-deps')
args.append('--pre') args.append('--pre')
args.append('--no-cache-dir') args.append('--no-cache-dir')
args.append(package) args.append(package)
subprocess.run(args)
if os.system(" ".join(args)) != 0:
args.pop(-2)
os.system(" ".join(args))
filename = glob.glob(os.path.join(tmpdir,"%s*" % package))[0] filename = glob.glob(os.path.join(tmpdir,"%s*" % package))[0]
tar = tarfile.open(filename) tar = tarfile.open(filename)
...@@ -39,6 +39,23 @@ VERSION=open(os.path.join(directory,'VERSION')).read().strip() ...@@ -39,6 +39,23 @@ VERSION=open(os.path.join(directory,'VERSION')).read().strip()
if __name__=="__main__": 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 from obidistutils.serenity import serenity_mode
serenity=serenity_mode(PACKAGE,VERSION) 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