1 | set PYTHON=c:\python27\python |
---|
2 | set EASY_INSTALL=c:\python27\scripts\easy_install.exe |
---|
3 | set PATH=c:\python27;c:\mingw\bin;%PATH% |
---|
4 | set PYLINT= C:\Python27\Scripts\pylint |
---|
5 | set INNO="C:\Program Files (x86)\Inno Setup 5\ISCC.exe" |
---|
6 | set GIT_SED=C:\"Program Files (x86)"\Git\bin\sed.exe |
---|
7 | set SAS_COMPILER=mingw |
---|
8 | |
---|
9 | |
---|
10 | set PYTHONPATH=%PYTHONPATH%;%WORKSPACE%\sasview\utils |
---|
11 | set PYTHONPATH=%PYTHONPATH%;%WORKSPACE%\sasview\sasview-install |
---|
12 | |
---|
13 | echo %PYTHONPATH% |
---|
14 | echo %WORKSPACE% |
---|
15 | |
---|
16 | |
---|
17 | :: SET SASVIEW GITHASH ################################################ |
---|
18 | cd %WORKSPACE% |
---|
19 | cd sasview\src\sas\sasview |
---|
20 | git rev-parse HEAD > tmpFile_githash |
---|
21 | SET /p githash= < tmpFile_githash |
---|
22 | DEL tmpFile_githash |
---|
23 | %GIT_SED% -i.bak "s/GIT_COMMIT/%githash%/g" __init__.py |
---|
24 | |
---|
25 | |
---|
26 | |
---|
27 | :: MAKE DIR FOR EGGS ################################################## |
---|
28 | cd %WORKSPACE% |
---|
29 | cd sasview |
---|
30 | MD sasview-install |
---|
31 | MD utils |
---|
32 | |
---|
33 | |
---|
34 | :: SASMODELS build #################################################### |
---|
35 | cd %WORKSPACE% |
---|
36 | cd sasmodels |
---|
37 | %PYTHON% setup.py build |
---|
38 | |
---|
39 | |
---|
40 | |
---|
41 | :: SASMODELS doc ###################################################### |
---|
42 | cd doc |
---|
43 | make html |
---|
44 | |
---|
45 | |
---|
46 | :: SASMODELS build egg ################################################ |
---|
47 | cd %WORKSPACE% |
---|
48 | cd sasmodels |
---|
49 | %PYTHON% setup.py bdist_egg |
---|
50 | %PYTHON% -m sasmodels.model_test all |
---|
51 | |
---|
52 | :: SASMODELS install egg ############################################## |
---|
53 | cd %WORKSPACE% |
---|
54 | cd sasmodels |
---|
55 | cd dist |
---|
56 | echo F | xcopy sasmodels-*.egg sasmodels.egg /Y |
---|
57 | %EASY_INSTALL% -d %WORKSPACE%\sasview\utils sasmodels.egg |
---|
58 | |
---|
59 | |
---|
60 | :: NOW BUILD SASVIEW |
---|
61 | |
---|
62 | :: SASVIEW build egg ################################################ |
---|
63 | :: Remember to modify C:\Python27\Lib\distutils\distutils.cfg to you compiler |
---|
64 | cd %WORKSPACE% |
---|
65 | cd sasview |
---|
66 | %PYTHON% setup.py build docs bdist_egg |
---|
67 | |
---|
68 | |
---|
69 | :: SASVIEW utest ###################################################### |
---|
70 | cd %WORKSPACE%\sasview\test |
---|
71 | %PYTHON% utest_sasview.py |
---|
72 | |
---|
73 | |
---|
74 | :: SASVIEW INSTALL EGG ################################################ |
---|
75 | cd %WORKSPACE% |
---|
76 | cd sasview |
---|
77 | cd dist |
---|
78 | echo F | xcopy sasview-*.egg sasview.egg /Y |
---|
79 | %EASY_INSTALL% -d %WORKSPACE%\sasview\sasview-install sasview.egg |
---|
80 | |
---|
81 | |
---|
82 | :: TINYCC build #################################################### |
---|
83 | cd %WORKSPACE% |
---|
84 | cd tinycc |
---|
85 | %PYTHON% setup.py build |
---|
86 | xcopy /S build\lib\* %WORKSPACE%\sasview\utils\ |
---|
87 | |
---|
88 | :: SASVIEW INSTALLER ################################################## |
---|
89 | cd %WORKSPACE% |
---|
90 | cd sasview |
---|
91 | cd installers |
---|
92 | %PYTHON% setup_exe.py py2exe |
---|
93 | %PYTHON% installer_generator.py |
---|
94 | %INNO% installer.iss |
---|
95 | cd Output |
---|
96 | xcopy setupSasView.exe %WORKSPACE%\sasview\dist |
---|
97 | |
---|
98 | :: SASVIEW PYLINT ##################################################### |
---|
99 | cd %WORKSPACE%\sasview |
---|
100 | %PYLINT% --rcfile "build_tools/pylint.rc" -f parseable sasview-install/sasview.egg/sas sasview > test/sasview.txt |
---|
101 | |
---|
102 | |
---|
103 | :: GO BACK ############################################################ |
---|
104 | cd %WORKSPACE% |
---|