From: Sakurai Y. <You...@ys...> - 2016-09-20 02:06:38
|
Hello there, I’d like to share one patch, as attached, which enables to build py2exe with Python 3.5. The points were: 1. Run vcvarsall.bat of VC 14 (VS2015) manually before building py2exe. 2. Append “/DLL” option to link arguments in setup.py. 3. Modify assert condition to recognize new extension suffix (.cp35-win32.pyd) in py2exe/runtime.py. My building test executable seems to work w/o problems at the moment. You can also find outcome of the build using my patch as below. Best regards, Youhei *** C:\Users\sakurai\workspace\py2exe\trunk\py2exe-3>python --version Python 3.5.2 C:\Users\sakurai\workspace\py2exe\trunk\py2exe-3>set INCLUDE= C:\Users\sakurai\workspace\py2exe\trunk\py2exe-3>"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" C:\Users\sakurai\workspace\py2exe\trunk\py2exe-3>set INCLUDE INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE;C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um;C:\Program Files (x86)\Windows Kits\8.1\include\\shared;C:\Program Files (x86)\Windows Kits\8.1\include\\um;C:\Program Files (x86)\Windows Kits\8.1\include\\winrt; C:\Users\sakurai\workspace\py2exe\trunk\py2exe-3>C:\Python35\python.exe setup.py build running build running build_py creating build creating build\lib copying zipextimporter.py -> build\lib creating build\lib\py2exe copying py2exe\boot_common.py -> build\lib\py2exe copying py2exe\boot_ctypes_com_server.py -> build\lib\py2exe copying py2exe\boot_service.py -> build\lib\py2exe copying py2exe\build_exe.py -> build\lib\py2exe copying py2exe\distutils_buildexe.py -> build\lib\py2exe copying py2exe\dllfinder.py -> build\lib\py2exe copying py2exe\hooks.py -> build\lib\py2exe copying py2exe\icons.py -> build\lib\py2exe copying py2exe\mf3.py -> build\lib\py2exe copying py2exe\mf34.py -> build\lib\py2exe copying py2exe\patch_distutils.py -> build\lib\py2exe copying py2exe\py2exe_distutils.py -> build\lib\py2exe copying py2exe\resources.py -> build\lib\py2exe copying py2exe\runtime.py -> build\lib\py2exe copying py2exe\setup_template.py -> build\lib\py2exe copying py2exe\versioninfo.py -> build\lib\py2exe copying py2exe\_wapi.py -> build\lib\py2exe copying py2exe\__init__.py -> build\lib\py2exe copying py2exe\__main__.py -> build\lib\py2exe running build_interpreters creating build\temp.win32-3.5 creating build\temp.win32-3.5\Release creating build\temp.win32-3.5\Release\source C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHONDLL=\"python35.dll\" -D_CRT_SECURE_NO_WARNINGS=1 -DPy_BUILD_CORE=1 -IC:\Python35\include -IC:\Python35\include /Tcsource/run.c /Fobuild\temp.win32-3.5\Release\source/run.obj run.c C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHONDLL=\"python35.dll\" -D_CRT_SECURE_NO_WARNINGS=1 -DPy_BUILD_CORE=1 -IC:\Python35\include -IC:\Python35\include /Tcsource/start.c /Fobuild\temp.win32-3.5\Release\source/start.obj start.c C:\Program Files (x86)\Windows Kits\8.1\bin\x86\rc.exe -DPYTHONDLL=\"python35.dll\" -D_CRT_SECURE_NO_WARNINGS=1 -DPy_BUILD_CORE=1 -IC:\Python35\include -IC:\Python35\include /fobuild\temp.win32-3.5\Release\source/icon.res source/icon.rc Microsoft (R) Windows (R) Resource Compiler Version 6.3.9600.17336 Copyright (C) Microsoft Corporation. All rights reserved. C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHONDLL=\"python35.dll\" -D_CRT_SECURE_NO_WARNINGS=1 -DPy_BUILD_CORE=1 -IC:\Python35\include -IC:\Python35\include /Tcsource/MemoryModule.c /Fobuild\temp.win32-3.5\Release\source/MemoryModule.obj MemoryModule.c C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHONDLL=\"python35.dll\" -D_CRT_SECURE_NO_WARNINGS=1 -DPy_BUILD_CORE=1 -IC:\Python35\include -IC:\Python35\include /Tcsource/MyLoadLibrary.c /Fobuild\temp.win32-3.5\Release\source/MyLoadLibrary.obj MyLoadLibrary.c C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHONDLL=\"python35.dll\" -D_CRT_SECURE_NO_WARNINGS=1 -DPy_BUILD_CORE=1 -IC:\Python35\include -IC:\Python35\include /Tcsource/_memimporter.c /Fobuild\temp.win32-3.5\Release\source/_memimporter.obj _memimporter.c C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHONDLL=\"python35.dll\" -D_CRT_SECURE_NO_WARNINGS=1 -DPy_BUILD_CORE=1 -IC:\Python35\include -IC:\Python35\include /Tcsource/actctx.c /Fobuild\temp.win32-3.5\Release\source/actctx.obj actctx.c C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHONDLL=\"python35.dll\" -D_CRT_SECURE_NO_WARNINGS=1 -DPy_BUILD_CORE=1 -IC:\Python35\include -IC:\Python35\include /Tcsource/python-dynload.c /Fobuild\temp.win32-3.5\Release\source/python-dynload.obj python-dynload.c C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\link.exe /nologo /INCREMENTAL:NO /LTCG /MANIFEST:EMBED,ID=1 /LIBPATH:C:\Python35\libs /LIBPATH:C:\Python35\PCbuild\win32 user32.lib shell32.lib build\temp.win32-3.5\Release\source/run.obj build\temp.win32-3.5\Release\source/start.obj build\temp.win32-3.5\Release\source/icon.res build\temp.win32-3.5\Release\source/MemoryModule.obj build\temp.win32-3.5\Release\source/MyLoadLibrary.obj build\temp.win32-3.5\Release\source/_memimporter.obj build\temp.win32-3.5\Release\source/actctx.obj build\temp.win32-3.5\Release\source/python-dynload.obj /OUT:build\lib\py2exe\run-py3.5-win32.exe /IMPLIB:build\temp.win32-3.5\Release\source\run-py3.5-win32.lib ライブラリ build\temp.win32-3.5\Release\source\run-py3.5-win32.lib とオブジェクト build\temp.win32-3.5\Release\source\run-py3.5-win32.exp を作成中 コード生成しています。 コード生成が終了しました。 C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHONDLL=\"python35.dll\" -D_CRT_SECURE_NO_WARNINGS=1 -DPy_BUILD_CORE=1 -IC:\Python35\include -IC:\Python35\include /Tcsource/run_w.c /Fobuild\temp.win32-3.5\Release\source/run_w.obj run_w.c C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHONDLL=\"python35.dll\" -D_CRT_SECURE_NO_WARNINGS=1 -DPy_BUILD_CORE=1 -IC:\Python35\include -IC:\Python35\include /Tcsource/start.c /Fobuild\temp.win32-3.5\Release\source/start.obj start.c C:\Program Files (x86)\Windows Kits\8.1\bin\x86\rc.exe -DPYTHONDLL=\"python35.dll\" -D_CRT_SECURE_NO_WARNINGS=1 -DPy_BUILD_CORE=1 -IC:\Python35\include -IC:\Python35\include /fobuild\temp.win32-3.5\Release\source/icon.res source/icon.rc Microsoft (R) Windows (R) Resource Compiler Version 6.3.9600.17336 Copyright (C) Microsoft Corporation. All rights reserved. C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHONDLL=\"python35.dll\" -D_CRT_SECURE_NO_WARNINGS=1 -DPy_BUILD_CORE=1 -IC:\Python35\include -IC:\Python35\include /Tcsource/MemoryModule.c /Fobuild\temp.win32-3.5\Release\source/MemoryModule.obj MemoryModule.c C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHONDLL=\"python35.dll\" -D_CRT_SECURE_NO_WARNINGS=1 -DPy_BUILD_CORE=1 -IC:\Python35\include -IC:\Python35\include /Tcsource/MyLoadLibrary.c /Fobuild\temp.win32-3.5\Release\source/MyLoadLibrary.obj MyLoadLibrary.c C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHONDLL=\"python35.dll\" -D_CRT_SECURE_NO_WARNINGS=1 -DPy_BUILD_CORE=1 -IC:\Python35\include -IC:\Python35\include /Tcsource/_memimporter.c /Fobuild\temp.win32-3.5\Release\source/_memimporter.obj _memimporter.c C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHONDLL=\"python35.dll\" -D_CRT_SECURE_NO_WARNINGS=1 -DPy_BUILD_CORE=1 -IC:\Python35\include -IC:\Python35\include /Tcsource/actctx.c /Fobuild\temp.win32-3.5\Release\source/actctx.obj actctx.c C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHONDLL=\"python35.dll\" -D_CRT_SECURE_NO_WARNINGS=1 -DPy_BUILD_CORE=1 -IC:\Python35\include -IC:\Python35\include /Tcsource/python-dynload.c /Fobuild\temp.win32-3.5\Release\source/python-dynload.obj python-dynload.c C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\link.exe /nologo /INCREMENTAL:NO /LTCG /MANIFEST:EMBED,ID=1 /LIBPATH:C:\Python35\libs /LIBPATH:C:\Python35\PCbuild\win32 user32.lib shell32.lib build\temp.win32-3.5\Release\source/run_w.obj build\temp.win32-3.5\Release\source/start.obj build\temp.win32-3.5\Release\source/icon.res build\temp.win32-3.5\Release\source/MemoryModule.obj build\temp.win32-3.5\Release\source/MyLoadLibrary.obj build\temp.win32-3.5\Release\source/_memimporter.obj build\temp.win32-3.5\Release\source/actctx.obj build\temp.win32-3.5\Release\source/python-dynload.obj /OUT:build\lib\py2exe\run_w-py3.5-win32.exe /IMPLIB:build\temp.win32-3.5\Release\source\run_w-py3.5-win32.lib ライブラリ build\temp.win32-3.5\Release\source\run_w-py3.5-win32.lib とオブジェクト build\temp.win32-3.5\Release\source\run_w-py3.5-win32.exp を作成中 コード生成しています。 コード生成が終了しました。 C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Python35\include -IC:\Python35\include /Tcsource/dll.c /Fobuild\temp.win32-3.5\Release\source/dll.obj dll.c C:\Program Files (x86)\Windows Kits\8.1\bin\x86\rc.exe -IC:\Python35\include -IC:\Python35\include /fobuild\temp.win32-3.5\Release\source/icon.res source/icon.rc Microsoft (R) Windows (R) Resource Compiler Version 6.3.9600.17336 Copyright (C) Microsoft Corporation. All rights reserved. C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\link.exe /nologo /INCREMENTAL:NO /LTCG /LIBPATH:C:\Python35\libs /LIBPATH:C:\Python35\PCbuild\win32 build\temp.win32-3.5\Release\source/dll.obj build\temp.win32-3.5\Release\source/icon.res /OUT:build\lib\py2exe\resources.dll /IMPLIB:build\temp.win32-3.5\Release\source\resources.lib /NOENTRY /DLL コード生成しています。 コード生成が終了しました。 C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHONDLL=\"python35.dll\" -D_CRT_SECURE_NO_WARNINGS=1 -DPy_BUILD_CORE=1 -IC:\Python35\include -IC:\Python35\include /Tcsource/run_ctypes_dll.c /Fobuild\temp.win32-3.5\Release\source/run_ctypes_dll.obj run_ctypes_dll.c C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHONDLL=\"python35.dll\" -D_CRT_SECURE_NO_WARNINGS=1 -DPy_BUILD_CORE=1 -IC:\Python35\include -IC:\Python35\include /Tcsource/start.c /Fobuild\temp.win32-3.5\Release\source/start.obj start.c C:\Program Files (x86)\Windows Kits\8.1\bin\x86\rc.exe -DPYTHONDLL=\"python35.dll\" -D_CRT_SECURE_NO_WARNINGS=1 -DPy_BUILD_CORE=1 -IC:\Python35\include -IC:\Python35\include /fobuild\temp.win32-3.5\Release\source/icon.res source/icon.rc Microsoft (R) Windows (R) Resource Compiler Version 6.3.9600.17336 Copyright (C) Microsoft Corporation. All rights reserved. C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHONDLL=\"python35.dll\" -D_CRT_SECURE_NO_WARNINGS=1 -DPy_BUILD_CORE=1 -IC:\Python35\include -IC:\Python35\include /Tcsource/MemoryModule.c /Fobuild\temp.win32-3.5\Release\source/MemoryModule.obj MemoryModule.c C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHONDLL=\"python35.dll\" -D_CRT_SECURE_NO_WARNINGS=1 -DPy_BUILD_CORE=1 -IC:\Python35\include -IC:\Python35\include /Tcsource/MyLoadLibrary.c /Fobuild\temp.win32-3.5\Release\source/MyLoadLibrary.obj MyLoadLibrary.c C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHONDLL=\"python35.dll\" -D_CRT_SECURE_NO_WARNINGS=1 -DPy_BUILD_CORE=1 -IC:\Python35\include -IC:\Python35\include /Tcsource/_memimporter.c /Fobuild\temp.win32-3.5\Release\source/_memimporter.obj _memimporter.c C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHONDLL=\"python35.dll\" -D_CRT_SECURE_NO_WARNINGS=1 -DPy_BUILD_CORE=1 -IC:\Python35\include -IC:\Python35\include /Tcsource/actctx.c /Fobuild\temp.win32-3.5\Release\source/actctx.obj actctx.c C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHONDLL=\"python35.dll\" -D_CRT_SECURE_NO_WARNINGS=1 -DPy_BUILD_CORE=1 -IC:\Python35\include -IC:\Python35\include /Tcsource/python-dynload.c /Fobuild\temp.win32-3.5\Release\source/python-dynload.obj python-dynload.c C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\link.exe /nologo /INCREMENTAL:NO /LTCG /LIBPATH:C:\Python35\libs /LIBPATH:C:\Python35\PCbuild\win32 user32.lib shell32.lib /EXPORT:DllCanUnloadNow,PRIVATE /EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllRegisterServer,PRIVATE /EXPORT:DllUnregisterServer,PRIVATE build\temp.win32-3.5\Release\source/run_ctypes_dll.obj build\temp.win32-3.5\Release\source/start.obj build\temp.win32-3.5\Release\source/icon.res build\temp.win32-3.5\Release\source/MemoryModule.obj build\temp.win32-3.5\Release\source/MyLoadLibrary.obj build\temp.win32-3.5\Release\source/_memimporter.obj build\temp.win32-3.5\Release\source/actctx.obj build\temp.win32-3.5\Release\source/python-dynload.obj /OUT:build\lib\py2exe\run_ctypes_dll-py3.5-win32.dll /IMPLIB:build\temp.win32-3.5\Release\source\run_ctypes_dll-py3.5-win32.lib /DLL ライブラリ build\temp.win32-3.5\Release\source\run_ctypes_dll-py3.5-win32.lib とオブジェクト build\temp.win32-3.5\Release\source\run_ctypes_dll-py3.5-win32.exp を作成中 コード生成しています。 コード生成が終了しました。 C:\Users\sakurai\workspace\py2exe\trunk\py2exe-3>echo %ERRORLEVEL% 0 C:\Users\sakurai\workspace\py2exe\trunk\py2exe-3>tree /F build\lib フォルダー パスの一覧 ボリューム シリアル番号は A695-7605 です C:\USERS\SAKURAI\WORKSPACE\PY2EXE\TRUNK\PY2EXE-3\BUILD\LIB │ zipextimporter.py │ └─py2exe boot_common.py boot_ctypes_com_server.py boot_service.py build_exe.py distutils_buildexe.py dllfinder.py hooks.py icons.py mf3.py mf34.py patch_distutils.py py2exe_distutils.py resources.dll resources.py run-py3.5-win32.exe runtime.py run_ctypes_dll-py3.5-win32.dll run_w-py3.5-win32.exe setup_template.py versioninfo.py _wapi.py __init__.py __main__.py ________________________________ CONFIDENTIALITY NOTICE This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify us by email to in...@ys... with a copy of this message. You must not, directly or indirectly, use, disclose, distribute, print or copy any part of this message if you are not the intended recipient. Y Soft and any of its subsidiaries each reserves the right to monitor all e-mail communications through its networks. Y Soft is neither liable for the proper, complete transmission of the information contained in this communication nor any delay in its receipt. This email was scanned for the presence of computer viruses. In the unfortunate event of infection Y Soft does not accept liability. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them. |