A Python parser for MediaWiki wikicode https://mwparserfromhell.readthedocs.io/
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

win_wrapper.cmd 2.3 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. :: Extract the major and minor versions, and allow for the minor version to be
  25. :: more than 9. This requires the version number to have two dots in it.
  26. SET MAJOR_PYTHON_VERSION=%PYTHON_VERSION:~0,1%
  27. IF "%PYTHON_VERSION:~3,1%" == "." (
  28. SET MINOR_PYTHON_VERSION=%PYTHON_VERSION:~2,1%
  29. ) ELSE (
  30. SET MINOR_PYTHON_VERSION=%PYTHON_VERSION:~2,2%
  31. )
  32. :: Based on the Python version, determine what SDK version to use, and whether
  33. :: to set the SDK for 64-bit.
  34. IF %MAJOR_PYTHON_VERSION% == 2 (
  35. SET WINDOWS_SDK_VERSION="v7.0"
  36. SET SET_SDK_64=Y
  37. ) ELSE (
  38. IF %MAJOR_PYTHON_VERSION% == 3 (
  39. SET WINDOWS_SDK_VERSION="v7.1"
  40. IF %MINOR_PYTHON_VERSION% LEQ 4 (
  41. SET SET_SDK_64=Y
  42. ) ELSE (
  43. SET SET_SDK_64=N
  44. IF EXIST "%WIN_WDK%" (
  45. :: See: https://connect.microsoft.com/VisualStudio/feedback/details/1610302/
  46. REN "%WIN_WDK%" 0wdf
  47. )
  48. )
  49. ) ELSE (
  50. ECHO Unsupported Python version: "%MAJOR_PYTHON_VERSION%"
  51. EXIT 1
  52. )
  53. )
  54. IF %PYTHON_ARCH% == 64 (
  55. IF %SET_SDK_64% == Y (
  56. SET DISTUTILS_USE_SDK=1
  57. SET MSSdk=1
  58. "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Setup\WindowsSdkVer.exe" -q -version:%WINDOWS_SDK_VERSION%
  59. "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release
  60. )
  61. )
  62. call %COMMAND_TO_RUN% || EXIT 1