Skip to content

Commit c31b32d

Browse files
authored
Merge pull request #53 from jbvimort/WindowsWheelsGeneration
ENH: Correction of the python wheel generator for windows
2 parents 272ec30 + a8ac788 commit c31b32d

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

scripts/internal/windows_build_common.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
__all__ = ['DEFAULT_PY_ENVS', 'venv_paths']
22

3+
from subprocess import check_call
34
import os
45

56
DEFAULT_PY_ENVS = ["27-x64", "35-x64", "36-x64"]
@@ -8,7 +9,11 @@
89
ROOT_DIR = os.path.abspath(os.path.join(SCRIPT_DIR, "..", ".."))
910

1011
def venv_paths(python_version):
12+
13+
# Create venv
14+
venv_executable = "C:/Python%s/Scripts/virtualenv.exe" % (python_version)
1115
venv_dir = os.path.join(ROOT_DIR, "venv-%s" % python_version)
16+
check_call([venv_executable, venv_dir])
1217

1318
python_executable = os.path.join(venv_dir, "Scripts", "python.exe")
1419
python_include_dir = os.path.join(venv_dir, "Include")

scripts/windows_build_module_wheels.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ def build_wheels(py_envs=DEFAULT_PY_ENVS):
3030
if os.path.exists(requirements_file):
3131
check_call([pip, "install", "--upgrade", "-r", requirements_file])
3232
check_call([pip, "install", "cmake"])
33+
check_call([pip, "install", "scikit_build"])
34+
check_call([pip, "install", "ninja"])
3335

3436
build_type = "Release"
3537
source_path = ROOT_DIR
@@ -55,4 +57,4 @@ def build_wheels(py_envs=DEFAULT_PY_ENVS):
5557
check_call([python_executable, "setup.py", "clean"])
5658

5759
if __name__ == '__main__':
58-
build_wheels()
60+
build_wheels()

0 commit comments

Comments
 (0)