diff options
author | Giampaolo Rodola' <g.rodola@gmail.com> | 2014-02-06 17:05:16 +0100 |
---|---|---|
committer | Giampaolo Rodola' <g.rodola@gmail.com> | 2014-02-06 17:05:16 +0100 |
commit | c4fdb14bf7a928249ab84c48f84a54b714042709 (patch) | |
tree | 36a1a81947347e370bb41c6476a4cb377d5d860e /make.bat | |
parent | 0ce4e64ec50233f28cea555bd8c49307feb2c551 (diff) | |
parent | c756223580fc091affbc97946057e8e015e721a6 (diff) | |
download | psutil-c4fdb14bf7a928249ab84c48f84a54b714042709.tar.gz |
merge
Diffstat (limited to 'make.bat')
-rw-r--r-- | make.bat | 56 |
1 files changed, 45 insertions, 11 deletions
@@ -3,14 +3,21 @@ rem ========================================================================== rem Shortcuts for various tasks, emulating UNIX "make" on Windows. rem It is primarly intended as a shortcut for compiling / installing -rem psutil and running tests (just run "make.bat test"). +rem psutil ("make.bat build", "make.bat install") and running tests +rem ("make.bat test"). +rem rem This script is modeled after my Windows installation which uses: rem - mingw32 for Python 2.4 and 2.5 rem - Visual studio 2008 for Python 2.6, 2.7, 3.2 rem - Visual studio 2010 for Python 3.3+ +rem rem By default C:\Python27\python.exe is used. -rem To use another Python version run: -rem set PYTHON=C:\Python24\python.exe & make.bat test +rem To compile for a specific Python version run: +rem +rem set PYTHON=C:\Python24\python.exe & make.bat build +rem +rem If you compile by using mingw on Python 2.4 and 2.5 you need to patch +rem distutils first: http://stackoverflow.com/questions/13592192 rem ========================================================================== @@ -119,23 +126,50 @@ if "%1" == "memtest" ( if "%1" == "build-exes" ( :build-exes - call :clean - C:\Python26\python.exe setup.py build bdist_wininst & if %errorlevel% neq 0 goto :error - C:\Python27\python.exe setup.py build bdist_wininst & if %errorlevel% neq 0 goto :error - C:\Python33\python.exe setup.py build bdist_wininst & if %errorlevel% neq 0 goto :error + rem mingw 32 versions + C:\Python24\python.exe setup.py build -c mingw32 bdist_wininst || goto :error + C:\Python25\python.exe setup.py build -c mingw32 bdist_wininst || goto :error + 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 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 + echo OK goto :eof ) if "%1" == "upload-exes" ( :upload-exes - C:\Python26\python.exe setup.py bdist_wininst upload & if %errorlevel% neq 0 goto :error - C:\Python27\python.exe setup.py bdist_wininst upload & if %errorlevel% neq 0 goto :error - C:\Python33\python.exe setup.py bdist_wininst upload & if %errorlevel% neq 0 goto :error + rem mingw 32 versions + C:\Python25\python.exe setup.py build -c mingw32 bdist_wininst upload || goto :error + rem "standard" 32 bit versions, using VS 2008 (2.6, 2.7) or VS 2010 (3.3+) + C:\Python26\python.exe setup.py bdist_wininst upload || goto :error + C:\Python27\python.exe setup.py bdist_wininst upload || goto :error + C:\Python33\python.exe setup.py bdist_wininst upload || goto :error + C:\Python34\python.exe setup.py bdist_wininst upload || goto :error + rem 64 bit versions + rem Python 2.7 + 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 upload || goto :error + C:\Python33-64\python.exe setup.py build bdist_wininst upload || goto :error + C:\Python34-64\python.exe setup.py build bdist_wininst upload || goto :error + echo OK goto :eof ) goto :help :error - echo last command returned an error; exiting + echo last command exited with error code %errorlevel% exit /b %errorlevel% + goto :eof |