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.
 
 
 
 

57 righe
1.9 KiB

  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. SET NO_SET_SDK_64=N
  27. IF %MAJOR_PYTHON_VERSION% == 2 (
  28. SET WINDOWS_SDK_VERSION="v7.0"
  29. ) ELSE IF %MAJOR_PYTHON_VERSION% == 3 (
  30. SET WINDOWS_SDK_VERSION="v7.1"
  31. IF %MINOR_PYTHON_VERSION% GEQ 5 (
  32. SET NO_SET_SDK_64=Y
  33. )
  34. ) ELSE (
  35. ECHO Unsupported Python version: "%MAJOR_PYTHON_VERSION%"
  36. EXIT 1
  37. )
  38. IF "%NO_SET_SDK_64%"=="Y" (
  39. IF EXIST "%WIN_WDK%" (
  40. :: See: https://connect.microsoft.com/VisualStudio/feedback/details/1610302/
  41. REN "%WIN_WDK%" 0wdf
  42. )
  43. call %COMMAND_TO_RUN% || EXIT 1
  44. ) ELSE IF "%PYTHON_ARCH%"=="64" (
  45. SET DISTUTILS_USE_SDK=1
  46. SET MSSdk=1
  47. "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Setup\WindowsSdkVer.exe" -q -version:%WINDOWS_SDK_VERSION%
  48. "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release
  49. call %COMMAND_TO_RUN% || EXIT 1
  50. ) ELSE (
  51. call %COMMAND_TO_RUN% || EXIT 1
  52. )