Use Python module to run Pip
setup.py used systemcalls for package management pip. This call is platform dependent as on ubuntu distros this needs to be pip3. On these platforms pip points to the python2 version. By direct calling the pip module from within the running python process we know for sure we are triggering the correct one. Differential revision: https://developer.blender.org/D4952/ Reviewed by: sybren
This commit is contained in:
6
setup.py
6
setup.py
@@ -23,6 +23,7 @@ import shutil
|
|||||||
import subprocess
|
import subprocess
|
||||||
import re
|
import re
|
||||||
import pathlib
|
import pathlib
|
||||||
|
import pip
|
||||||
import zipfile
|
import zipfile
|
||||||
|
|
||||||
from distutils import log
|
from distutils import log
|
||||||
@@ -121,9 +122,8 @@ class BuildWheels(Command):
|
|||||||
|
|
||||||
def download_wheel(self, requirement):
|
def download_wheel(self, requirement):
|
||||||
"""Downloads a wheel from PyPI and saves it in self.wheels_path."""
|
"""Downloads a wheel from PyPI and saves it in self.wheels_path."""
|
||||||
|
pip.main([
|
||||||
subprocess.check_call([
|
'download',
|
||||||
'pip', 'download',
|
|
||||||
'--no-deps',
|
'--no-deps',
|
||||||
'--dest', str(self.wheels_path),
|
'--dest', str(self.wheels_path),
|
||||||
requirement[0]
|
requirement[0]
|
||||||
|
Reference in New Issue
Block a user