Use specific cibw directory on Windows to prevent collisions with installed software
This commit is contained in:
@@ -29,7 +29,7 @@ def get_nuget_args(configuration):
|
|||||||
python_name = "python" if configuration.version[0] == '3' else "python2"
|
python_name = "python" if configuration.version[0] == '3' else "python2"
|
||||||
if configuration.arch == "32":
|
if configuration.arch == "32":
|
||||||
python_name = python_name + "x86"
|
python_name = python_name + "x86"
|
||||||
return [python_name, "-Version", configuration.version, "-OutputDirectory", "C:/python"]
|
return [python_name, "-Version", configuration.version, "-OutputDirectory", "C:/cibw/python"]
|
||||||
|
|
||||||
def get_python_configurations(build_selector):
|
def get_python_configurations(build_selector):
|
||||||
PythonConfiguration = namedtuple('PythonConfiguration', ['version', 'arch', 'identifier'])
|
PythonConfiguration = namedtuple('PythonConfiguration', ['version', 'arch', 'identifier'])
|
||||||
@@ -65,6 +65,9 @@ def build(project_dir, output_dir, test_command, test_requires, test_extras, bef
|
|||||||
return subprocess.check_call(' '.join(args), env=env, cwd=cwd)
|
return subprocess.check_call(' '.join(args), env=env, cwd=cwd)
|
||||||
def download(url, dest):
|
def download(url, dest):
|
||||||
print('+ Download ' + url + ' to ' + dest)
|
print('+ Download ' + url + ' to ' + dest)
|
||||||
|
dest_dir = os.path.dirname(dest)
|
||||||
|
if not os.path.exists(dest_dir):
|
||||||
|
os.makedirs(dest_dir)
|
||||||
response = urlopen(url)
|
response = urlopen(url)
|
||||||
try:
|
try:
|
||||||
with open(dest, 'wb') as file:
|
with open(dest, 'wb') as file:
|
||||||
@@ -89,10 +92,10 @@ def build(project_dir, output_dir, test_command, test_requires, test_extras, bef
|
|||||||
built_wheel_dir = os.path.join(temp_dir, 'built_wheel')
|
built_wheel_dir = os.path.join(temp_dir, 'built_wheel')
|
||||||
|
|
||||||
# install nuget as best way to provide python
|
# install nuget as best way to provide python
|
||||||
nuget = 'C:\\nuget.exe'
|
nuget = 'C:\\cibw\\nuget.exe'
|
||||||
download('https://dist.nuget.org/win-x86-commandline/latest/nuget.exe', nuget)
|
download('https://dist.nuget.org/win-x86-commandline/latest/nuget.exe', nuget)
|
||||||
# get pip fo this installation which not have.
|
# get pip fo this installation which not have.
|
||||||
get_pip_script = 'C:\\get-pip.py'
|
get_pip_script = 'C:\\cibw\\get-pip.py'
|
||||||
download('https://bootstrap.pypa.io/get-pip.py', get_pip_script)
|
download('https://bootstrap.pypa.io/get-pip.py', get_pip_script)
|
||||||
|
|
||||||
python_configurations = get_python_configurations(build_selector)
|
python_configurations = get_python_configurations(build_selector)
|
||||||
|
|||||||
Reference in New Issue
Block a user