A Python parser for MediaWiki wikicode https://mwparserfromhell.readthedocs.io/
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

win_wrapper.cmd 1.9 KiB

9 年前
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. :: To build extensions for 64 bit Python 3, we need to configure environment
  2. :: variables to use the MSVC 2010 C++ compilers from GRMSDKX_EN_DVD.iso of:
  3. :: MS Windows SDK for Windows 7 and .NET Framework 4 (SDK v7.1)
  4. ::
  5. :: To build extensions for 64 bit Python 2, we need to configure environment
  6. :: variables to use the MSVC 2008 C++ compilers from GRMSDKX_EN_DVD.iso of:
  7. :: MS Windows SDK for Windows 7 and .NET Framework 3.5 (SDK v7.0)
  8. ::
  9. :: 32 bit builds do not require specific environment configurations.
  10. ::
  11. :: Note: this script needs to be run with the /E:ON and /V:ON flags for the
  12. :: cmd interpreter, at least for (SDK v7.0)
  13. ::
  14. :: More details at:
  15. :: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows
  16. :: http://stackoverflow.com/a/13751649/163740
  17. ::
  18. :: Author: Olivier Grisel
  19. :: License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/
  20. @ECHO OFF
  21. SET COMMAND_TO_RUN=%*
  22. SET WIN_SDK_ROOT=C:\Program Files\Microsoft SDKs\Windows
  23. SET WIN_WDK=c:\Program Files (x86)\Windows Kits\10\Include\wdf
  24. SET MAJOR_PYTHON_VERSION=%PYTHON_VERSION:~0,1%
  25. SET MINOR_PYTHON_VERSION=%PYTHON_VERSION:~2%
  26. IF %MAJOR_PYTHON_VERSION% == 2 (
  27. SET WINDOWS_SDK_VERSION="v7.0"
  28. ) ELSE IF %MAJOR_PYTHON_VERSION% == 3 (
  29. SET WINDOWS_SDK_VERSION="v7.1"
  30. IF %MINOR_PYTHON_VERSION% GEQ 5 (
  31. SET NO_SET_SDK_64=Y
  32. )
  33. ) ELSE (
  34. ECHO Unsupported Python version: "%MAJOR_PYTHON_VERSION%"
  35. EXIT 1
  36. )
  37. IF "%PYTHON_ARCH%"=="32" (
  38. call %COMMAND_TO_RUN% || EXIT 1
  39. ) ELSE IF "%NO_SET_SDK_64%"=="Y" (
  40. IF EXIST "%WIN_WDK%" (
  41. :: See: https://connect.microsoft.com/VisualStudio/feedback/details/1610302/
  42. REN "%WIN_WDK%" 0wdf
  43. )
  44. call %COMMAND_TO_RUN% || EXIT 1
  45. ) ELSE (
  46. SET DISTUTILS_USE_SDK=1
  47. SET MSSdk=1
  48. "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Setup\WindowsSdkVer.exe" -q -version:%WINDOWS_SDK_VERSION%
  49. "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release
  50. call %COMMAND_TO_RUN% || EXIT 1
  51. )