Skip to content

Commit 11d6e3e

Browse files
author
Francois Budin
committed
WIP: Remove support for Python 2.7 on Windows
ITKv5 will require C++11. On Windows, to compile ITK to work with Python2.7 from Python.org, one needs to use Visual Studio C++ 2008 which does not support C++11. Therefore ITK will not be built on Windows for Python 2.7 anymore.
1 parent 8ec9493 commit 11d6e3e

5 files changed

Lines changed: 6 additions & 8 deletions

‎docs/Build_ITK_Module_Python_packages.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Then, build the wheels::
109109
Windows
110110
-------
111111

112-
First, install Microsoft Visual C++ Compiler for Python 2.7, Visual Studio 2015, Git, and CMake, which should be added to the system PATH environmental variable.
112+
First, install Microsoft Visual Studio 2015, Git, and CMake, which should be added to the system PATH environmental variable.
113113

114114
Open a PowerShell terminal as Administrator, and install Python::
115115

‎docs/Build_ITK_Python_packages.rst‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Then, build the wheels::
6060
Windows
6161
-------
6262

63-
First, install Microsoft Visual C++ Compiler for Python 2.7, Visual Studio 2015, Git, and CMake, which should be added to the system PATH environmental variable.
63+
First, install Microsoft Visual Studio 2015, Git, and CMake, which should be added to the system PATH environmental variable.
6464

6565
Open a PowerShell terminal as Administrator, and install Python::
6666

@@ -81,7 +81,6 @@ In a PowerShell prompt::
8181

8282
Mode LastWriteTime Length Name
8383
---- ------------- ------ ----
84-
-a---- 4/9/2017 5:21 PM 59435508 itk-4.11.0.dev20170407-cp27-cp27m-win_amd64.whl
8584
-a---- 4/9/2017 11:14 PM 63274441 itk-4.11.0.dev20170407-cp35-cp35m-win_amd64.whl
8685
-a---- 4/10/2017 2:08 AM 63257220 itk-4.11.0.dev20170407-cp36-cp36m-win_amd64.whl
8786

‎scripts/internal/windows_build_common.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from subprocess import check_call
44
import os
55

6-
DEFAULT_PY_ENVS = ["27-x64", "35-x64", "36-x64"]
6+
DEFAULT_PY_ENVS = ["35-x64", "36-x64"]
77

88
SCRIPT_DIR = os.path.dirname(__file__)
99
ROOT_DIR = os.path.abspath(os.path.join(SCRIPT_DIR, "..", ".."))
@@ -32,7 +32,7 @@ def venv_paths(python_version):
3232
pip = os.path.join(venv_dir, "Scripts", "pip.exe")
3333

3434
ninja_executable = os.path.join(
35-
ROOT_DIR, "venv-27-x64", "Scripts", "ninja.exe")
35+
ROOT_DIR, "venv-35-x64", "Scripts", "ninja.exe")
3636
print("NINJA_EXECUTABLE:%s" % ninja_executable)
3737

3838
# Update PATH

‎scripts/windows-download-cache-and-build-module-wheels.ps1‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ sz x doxygen-1.8.11.windows.bin.zip -oC:\P\doxygen -aoa -r
99
Invoke-WebRequest -Uri "https://midas3.kitware.com/midas/download/bitstream/462235/grep-win.zip" -OutFile "grep-win.zip"
1010
sz x grep-win.zip -oC:\P\grep -aoa -r
1111
$env:Path += ";C:\P\grep"
12-
C:\Python27-x64\python.exe C:\P\IPP\scripts\windows_build_module_wheels.py
12+
C:\Python35-x64\python.exe C:\P\IPP\scripts\windows_build_module_wheels.py

‎scripts/windows_build_wheels.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,14 +226,13 @@ def test_wheels(single_wheel=False):
226226
def build_wheels(py_envs=DEFAULT_PY_ENVS, single_wheel=False,
227227
cleanup=False, wheel_names=None):
228228

229-
prepare_build_env("27-x64")
230229
prepare_build_env("35-x64")
231230
prepare_build_env("36-x64")
232231

233232
with push_dir(directory=STANDALONE_DIR, make_directory=True):
234233

235234
cmake_executable = "cmake.exe"
236-
tools_venv = os.path.join(ROOT_DIR, "venv-27-x64")
235+
tools_venv = os.path.join(ROOT_DIR, "venv-35-x64")
237236
pip_install(tools_venv, "ninja")
238237
ninja_executable = os.path.join(tools_venv, "Scripts", "ninja.exe")
239238

0 commit comments

Comments
 (0)