diff options
Diffstat (limited to 'make.bat')
-rw-r--r-- | make.bat | 44 |
1 files changed, 22 insertions, 22 deletions
@@ -26,8 +26,16 @@ if "%TSCRIPT%" == "" ( set TSCRIPT=test\test_psutil.py ) -rem Needed to compile using Mingw. -set PATH=C:\MinGW\bin;%PATH% +set PYTHON26=C:\Python26\python.exe +set PYTHON27=C:\Python27\python.exe +set PYTHON33=C:\Python33\python.exe +set PYTHON34=C:\Python34\python.exe +set PYTHON26-64=C:\Python26-64\python.exe +set PYTHON27-64=C:\Python27-64\python.exe +set PYTHON33-64=C:\Python33-64\python.exe +set PYTHON34-64=C:\Python34-64\python.exe + +set ALL_PYTHONS=%PYTHON26% %PYTHON27% %PYTHON33% %PYTHON34% %PYTHON26-64% %PYTHON27-64% %PYTHON33-64% %PYTHON34-64% rem Needed to locate the .pypirc file and upload exes on PYPI. set HOME=%USERPROFILE% @@ -73,7 +81,7 @@ if "%1" == "build" ( %PYTHON% setup.py build if %errorlevel% neq 0 goto :error rem copies *.pyd files in ./psutil directory in order to allow - rem "import psutil" when using the interactive interpreter from + rem "import psutil" when using the interactive interpreter from rem within this directory. %PYTHON% setup.py build_ext -i if %errorlevel% neq 0 goto :error @@ -123,42 +131,34 @@ if "%1" == "test-memleaks" ( if "%1" == "build-exes" ( :build-exes - rem "standard" 32 bit versions, using VS 2008 (2.6, 2.7) or VS 2010 (3.3+) - C:\Python26\python.exe setup.py build bdist_wininst || goto :error - C:\Python27\python.exe setup.py build bdist_wininst || goto :error - C:\Python33\python.exe setup.py build bdist_wininst || goto :error - C:\Python34\python.exe setup.py build bdist_wininst || goto :error - rem 64 bit versions - rem Python 2.7 + VS 2008 requires vcvars64.bat to be run first: + rem 64 bit versions. + rem Python 2.7 64 bit + VS 2008 requires vcvars64.bat to be run first: rem http://stackoverflow.com/questions/11072521/ rem Windows SDK and .NET Framework 3.5 SP1 also need to be installed (sigh) "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars64.bat" - C:\Python27-64\python.exe setup.py build bdist_wininst || goto :error - C:\Python33-64\python.exe setup.py build bdist_wininst || goto :error - C:\Python34-64\python.exe setup.py build bdist_wininst || goto :error + for %%P in (%ALL_PYTHONS%) do ( + %%P setup.py build bdist_wininst || goto :error + ) echo OK goto :eof ) if "%1" == "build-wheels" ( :build-wheels - C:\Python26\python.exe setup.py build bdist_wheel || goto :error - C:\Python27\python.exe setup.py build bdist_wheel || goto :error - C:\Python33\python.exe setup.py build bdist_wheel || goto :error - C:\Python34\python.exe setup.py build bdist_wheel || goto :error - rem 64 bit versions - rem Python 2.7 + VS 2008 requires vcvars64.bat to be run first: + rem 64 bit versions. + rem Python 2.7 64 bit + VS 2008 requires vcvars64.bat to be run first: rem http://stackoverflow.com/questions/11072521/ rem Windows SDK and .NET Framework 3.5 SP1 also need to be installed (sigh) "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars64.bat" - C:\Python27-64\python.exe setup.py build bdist_wheel || goto :error - C:\Python33-64\python.exe setup.py build bdist_wheel || goto :error - C:\Python34-64\python.exe setup.py build bdist_wheel || goto :error + for %%P in (%ALL_PYTHONS%) do ( + %%P setup.py build bdist_wheel || goto :error + ) echo OK goto :eof ) if "%1" == "build-all" ( + :build-all rem for some reason this needs to be called twice (f**king windows...) call :build-exes call :build-exes |