From c457767edf814f92e1da8cb9d08fa52404ea074c Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Wed, 29 May 2019 10:28:34 +0200 Subject: [PATCH] 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 --- setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 40f0023..ffef5ea 100755 --- a/setup.py +++ b/setup.py @@ -23,6 +23,7 @@ import shutil import subprocess import re import pathlib +import pip import zipfile from distutils import log @@ -121,9 +122,8 @@ class BuildWheels(Command): def download_wheel(self, requirement): """Downloads a wheel from PyPI and saves it in self.wheels_path.""" - - subprocess.check_call([ - 'pip', 'download', + pip.main([ + 'download', '--no-deps', '--dest', str(self.wheels_path), requirement[0]