forked from winpython/winpython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_complement_newbuild.bat
More file actions
340 lines (253 loc) · 14.8 KB
/
run_complement_newbuild.bat
File metadata and controls
340 lines (253 loc) · 14.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
rem first line check
echo keep me in ansi =utf-8 without BOM (notepad plus plus or win10 screwing up for compatibility)
echo rem labextendion 2019-06-28 test
@echo off
rem %1 is WINPYDIR being prepared
rem this .bat is placed at root (buildir34, buildir34\FlavorJulia, ...)
set origin=%~dp0
set new_winpydir=%1
cd /d %new_winpydir%
call scripts\env.bat
@echo off
rem * ==========================
rem * When Python has no mingwpy
rem * ==========================
if not exist "%WINPYDIR%\Lib\site-packages\mingwpy" set pydistutils_cfg=%WINPYDIR%\..\settings\pydistutils.cfg
if not exist "%WINPYDIR%\Lib\site-packages\mingwpy" echo [config]>%pydistutils_cfg%
rem * ==========================
rem * configure ipython-parallel
rem * ==========================
@echo off
if exist "%WINPYDIR%\Lib\site-packages\IPython" "%WINPYDIR%\Scripts\jupyter-notebook.exe" --generate-config
rem starting Jupyter 5+, use ipcluster
if exist "%WINPYDIR%\Scripts\ipcluster.exe" "%WINPYDIR%\Scripts\ipcluster.exe" nbextension enable
rem 2018-03-10
if exist "%WINPYDIR%\Scripts\ipcluster.exe" jupyter nbextension install --sys-prefix --py ipyparallel
if exist "%WINPYDIR%\Scripts\ipcluster.exe" jupyter nbextension enable --sys-prefix --py ipyparallel
rem if not exist "ipcluster.exe" echo c.NotebookApp.server_extensions.append('ipyparallel.nbextension')>>"%winpydir%\..\settings\.jupyter\jupyter_notebook_config.py"
@echo off
rem * ===========================
echo finish install of jupyterlab
rem * ===========================
rem other suggestion from https://github.com/nteract/nteract
rem npm install -g --production windows-build-tools
rem 2018-01-15 node-gyp experience 2018-01-19removetest
rem npm config set python "C:/WinPython/basedir27/buildZero/winpython-32bit-2.7.x.2/python-2.7.13/python.exe"
rem npm config set PYTHON "C:/WinP/bd27/buildZero/winpython-32bit-2.7.x.2/python-2.7.13/python.exe"
rem "%WINPYDIR%\..\tools\n\node_modules\npm\bin\node-gyp-bin\node-gyp.cmd" configure --msvs_version=2015
rem if exist "%WINPYDIR%\Lib\site-packages\jupyterlab" "%WINPYDIR%\Scripts\jupyter.exe" serverextension enable --py jupyterlab --sys-prefix
@echo on
rem * ===================
echo jupyterlab manager (if npm there)
rem * ==================
@echo off
rem jupyter lab clean
rem jupyter labextension list
rem jupyter labextension disable bqplot jupyter-leaflet jupyter-matplotlib jupyter-threejs jupyterlab-datawidgets jupyterlab_bokeh
rem 2018-07-07 for jupyterlab-0.32.x: https://www.npmjs.com/package/@jupyter-widgets/jupyterlab-manager
if not "%WINPYARCH%"=="WIN32" if exist "%WINPYDIR%\Lib\site-packages\jupyterlab" "%WINPYDIR%\Scripts\jupyter.exe" labextension install --no-build @jupyter-widgets/jupyterlab-manager
rem * ==================
echo finish install of bqplot
rem * =================
if exist "%WINPYDIR%\Lib\site-packages\bqplot" "%WINPYDIR%\Scripts\jupyter.exe" nbextension enable --py --sys-prefix bqplot
rem labextendion2
if not "%WINPYARCH%"=="WIN32" if exist "%WINPYDIR%\Lib\site-packages\bqplot" "%WINPYDIR%\Scripts\jupyter.exe" labextension install --no-build bqplot
rem * ==================
echo finish install of bokeh for jupyterlab (2019-08-10)
rem * =================
if not "%WINPYARCH%"=="WIN32" if exist "%WINPYDIR%\Lib\site-packages\bokeh" "%WINPYDIR%\Scripts\jupyter.exe" labextension install --no-build jupyterlab_bokeh
rem * ==================
echo finish install of ipydatawidgets (2018-03-10)
rem * =================
if exist "%WINPYDIR%\Lib\site-packages\ipydatawidgets" "%WINPYDIR%\Scripts\jupyter.exe" nbextension install --py --sys-prefix ipydatawidgets
if exist "%WINPYDIR%\Lib\site-packages\ipydatawidgets" "%WINPYDIR%\Scripts\jupyter.exe" nbextension enable --py --sys-prefix ipydatawidgets
rem labextendion
rem no need: included per default in jlab-1
if not "%WINPYARCH%"=="WIN3x2" if exist "%WINPYDIR%\Lib\site-packages\ipydatawidgets" "%WINPYDIR%\Scripts\jupyter.exe" labextension install --no-build jupyterlab-datawidgets
rem * ==================
echo finish install of ipyleaflet
rem * =================
if exist "%WINPYDIR%\Lib\site-packages\ipyleaflet" "%WINPYDIR%\Scripts\jupyter.exe" nbextension enable --py --sys-prefix ipyleaflet
rem labextendion
rem jupyter-leaflet-0.10.7 not ok with jupyterlab-1 (but doesn't work ?)
rem labextendion3 2017-07-02
if not "%WINPYARCH%"=="WIN32" if exist "%WINPYDIR%\Lib\site-packages\ipyleaflet" "%WINPYDIR%\Scripts\jupyter.exe" labextension install --no-build jupyter-leaflet
rem * ==================
echo finish install of pythreejs
rem * =================
if exist "%WINPYDIR%\Lib\site-packages\pythreejs" "%WINPYDIR%\Scripts\jupyter.exe" nbextension enable --py --sys-prefix pythreejs
rem labextendion
if not "%WINPYARCH%"=="WIN3x2" if exist "%WINPYDIR%\Lib\site-packages\pythreejs" "%WINPYDIR%\Scripts\jupyter.exe" labextension install --no-build jupyter-threejs
rem * ==================
echo finish install of ipyvolume / ipywebrtc
rem * =================
if exist "%WINPYDIR%\Lib\site-packages\ipywebrtc" "%WINPYDIR%\Scripts\jupyter.exe" nbextension enable --py --sys-prefix ipywebrtc
if exist "%WINPYDIR%\Lib\site-packages\ipyvolume" "%WINPYDIR%\Scripts\jupyter.exe" nbextension enable --py --sys-prefix ipyvolume
rem * ==================
echo finish install of ipyvolume / ipywebrtc
rem * =================
rem labextendion if exist "%WINPYDIR%\Lib\site-packages\ipywebrtc" "%WINPYDIR%\Scripts\jupyter.exe" labextension install --no-build jupyter-webrtc
rem labextendion if exist "%WINPYDIR%\Lib\site-packages\ipywebrtc" "%WINPYDIR%\Scripts\jupyter.exe" labextension install --no-build ipyvolume
rem * ==================
echo finish install of pdvega
rem * =================
if exist "%WINPYDIR%\Lib\site-packages\vega3" "%WINPYDIR%\Scripts\jupyter.exe" nbextension enable --py --sys-prefix vega3
rem 2019-03-30 workaround altair-3
rem no need: included per default in jlab-1
if not "%WINPYARCH%"=="WIN32" if exist "%WINPYDIR%\Lib\site-packages\jupyterlab" "%WINPYDIR%\Scripts\jupyter.exe" labextension install --no-build @jupyterlab/vega3-extension
rem * ==================
echo finish install of rise
rem * =================
if exist "%WINPYDIR%\Lib\site-packages\rise" "%WINPYDIR%\Scripts\jupyter.exe" nbextension install rise --py --sys-prefix
if exist "%WINPYDIR%\Lib\site-packages\rise" "%WINPYDIR%\Scripts\jupyter.exe" nbextension enable --py --sys-prefix rise
rem * ==================
echo finish install of ipympl (2017-10-29)
rem * =================
if exist "%WINPYDIR%\Lib\site-packages\ipympl" "%WINPYDIR%\Scripts\jupyter.exe" nbextension enable --py --sys-prefix ipympl
rem labextendion4
rem no need: included per default in jlab-1
if not "%WINPYARCH%"=="WIN3x2" if exist "%WINPYDIR%\Lib\site-packages\ipympl" "%WINPYDIR%\Scripts\jupyter.exe" labextension install --no-build jupyter-matplotlib
rem * =================
echo finish install of holoviews jupyterlab 2018-02-27
rem * =================
rem if exist "%WINPYDIR%\Lib\site-packages\holoviews" "%WINPYDIR%\Scripts\jupyter.exe" labextension install --no-build @pyviz/jupyterlab_pyviz
rem jupyterlan-1.0.0rc0 tempo patch
echo finish install of holoviews jupyterlab 2018-06-28
rem labextendion2
if not "%WINPYARCH%"=="WIN32" if exist "%WINPYDIR%\Lib\site-packages\holoviews" "%WINPYDIR%\Scripts\jupyter.exe" labextension install --no-build @pyviz/jupyterlab_pyviz
rem * ==================
echo finish install of nteract_on_jupyter (2018-12-27)
rem * =================
if exist "%WINPYDIR%\Lib\site-packages\nteract_on_jupyter" "%WINPYDIR%\Scripts\jupyter.exe" serverextension enable nteract_on_jupyter
rem * ==================
echo finish install of Qgrid(2019-04-26)
rem * =================
if exist "%WINPYDIR%\Lib\site-packages\qgrid" "%WINPYDIR%\Scripts\jupyter.exe" nbextension enable --py --sys-prefix qgrid
rem labextendion if exist "%WINPYDIR%\Lib\site-packages\qgrid" "%WINPYDIR%\Scripts\jupyter.exe" labextension install --no-build qgrid
rem * ==================
echo finish install of Jupyterlab-sql
rem * ==================
rem 2019-06-30 20190706
rem # wait spoofing end https://github.com/pbugnion/jupyterlab-sql/issues/89
rem if exist "%WINPYDIR%\Lib\site-packages\jupyterlab_sql" "%WINPYDIR%\Scripts\jupyter.exe" serverextension enable jupyterlab_sql --py --sys-prefix
rem labextendion if exist "%WINPYDIR%\Lib\site-packages\jupyterlab_sql" "%WINPYDIR%\Scripts\jupyter.exe" labextension install --no-build @jupyterlab-sql
rem requires jupyter lab build after
rem * ==================
echo finish install of Voila (2019-07-21)
rem * =================
if not "%WINPYARCH%"=="WIN32" if exist "%WINPYDIR%\Lib\site-packages\voila" "%WINPYDIR%\Scripts\jupyter.exe" labextension labextension install @jupyter-voila/jupyterlab-preview
rem * ==================
echo install of dataregistry (2019-07-28)
rem * =================
if not "%WINPYARCH%"=="WIN32" if exist "%WINPYDIR%\Lib\site-packages\voila" "%WINPYDIR%\Scripts\jupyter.exe" labextension labextension @jupyterlab/dataregistry
rem * =================
echo finish install seaborn iris example
rem * =================
if exist "%WINPYDIR%\Lib\site-packages\seaborn" "%WINPYDIR%\python.exe" -c "import seaborn as sns;sns.set();sns.load_dataset('iris')"
rem * =================
echo finish install PyQtdoc
rem * =================
if exist "%WINPYDIR%\Scripts\PyQtdoc_win_post_install.bat" "%WINPYDIR%\Scripts\PyQtdoc_win_post_install.bat" "-install"
rem * =================
echo opengl PyQt5 patch 2018-01-06
rem * ==================
set qt56p=%WINPYDIR%\Lib\site-packages\PyQt5\Qt\bin
set qt56dest=%WINPYDIR%\Lib\site-packages\PyQt5\Qt\bin\opengl32sw.dll
if exist "%qt56p%" if not exist "%qt56dest%" (
if "%WINPYARCH%"=="WIN32" copy "C:\WinPython\bd35\patch_qt570\opengl32sw-32\opengl32sw.dll" "%WINPYDIR%\Lib\site-packages\PyQt5\Qt\bin\opengl32sw.dll"
)
if not "%WINPYARCH%"=="WIN32" copy "C:\WinPython\bd35\patch_qt570\opengl32sw-64\opengl32sw.dll" "%WINPYDIR%\Lib\site-packages\PyQt5\Qt\bin\opengl32sw.dll"
)
rem * =================
rem echo sqlalchemy Python-3.8.0b1 fix 2019-06-16
rem * ==================
rem set qt56p=%WINPYDIR%\Lib\site-packages\SQLAlchemy-1.3.4.dist-info
rem if exist "%qt56p%" copy "C:\WinP\bd38\compat.py" "%WINPYDIR%\Lib\site-packages\sqlalchemy\util\compat.py"
rem * =================
echo tornado Python-3.8.0 fix 2019-06-28 https://github.com/tornadoweb/tornado/issues/2656#issuecomment-491400255
rem * ==================
set qt56p=%WINPYDIR%\Lib\site-packages\tornado-6.0.3.dist-info
if exist "%qt56p%" (
%WINPYDIR%\python.exe -c "from winpython.utils import patch_sourcefile;patch_sourcefile(r'%WINPYDIR%\Lib\site-packages\tornado\platform\asyncio.py', 'import asyncio', 'import asyncio;asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) # python-3.8.0' )"
echo "DID I patch %qt56p% ??"
rem pause
) else (
echo "I DIDN'T patch of %qt56p% !"
rem pause
)
rem * ===================
echo 2018-03-25 Jupyterlab simplified wrap-up (https://github.com/jupyter/notebook/pull/3116#issuecomment-355672998)
rem * ===================
rem reduce time by building only once
rem at each extension do:
rem "%WINPYDIR%\Scripts\jupyter.exe" labextension install --no-build
rem at the end:
rem 2019-08-28 : 32 bit sos "--minimize=False"
rem FAILED: if exist "%WINPYDIR%\Lib\site-packages\jupyterlab" "%WINPYDIR%\Scripts\jupyter.exe" lab build --minimize=False
rem trying the memory 3000 instead of 4096 for %WINPYARCH=%WIN32
rem set qt56p=%WINPYDIR%\Lib\jupyterlab\staging\package.json
rem if exist "%qt56p%" (
rem if "%WINPYARCH%"=="WIN32" %WINPYDIR%\python.exe -c "from winpython.utils import patch_sourcefile;patch_sourcefile(r'%qt56p%', 'max_old_space_size=4096 ', 'max_old_space_size=3000 ' )"
rem )
rem if exist "%qt56p%" (
rem if not "%WINPYARCH%"=="WIN32" %WINPYDIR%\python.exe -c "from winpython.utils import patch_sourcefile;patch_sourcefile(r'%qt56p%', 'max_old_space_size=3000 ', 'max_old_space_size=4096 ' )"
rem )
rem 2019-08_31 patch
rem if not "%WINPYARCH%"=="WIN32" if exist "%WINPYDIR%\Lib\site-packages\jupyterlab" (
rem if "%WINPYARCH%"=="WIN32" "%WINPYDIR%\Scripts\jupyter.exe" lab build --minimize=False
rem if not "%WINPYARCH%"=="WIN32" "%WINPYDIR%\Scripts\jupyter.exe" lab build
rem jupyter labextension list
rem )
rem 2019-10-22: in any case Jupytrelab want to build with
rem jupyter-matplotlib
rem jupyter-threejs
rem jupyter-datawidgets
if exist "%WINPYDIR%\Lib\site-packages\jupyterlab" (
"%WINPYDIR%\Scripts\jupyter.exe" lab build
jupyter labextension list
)
rem 2018-01-15 node-gyp experience
rem npm config set python "C:\WinPython\bd27\buildZero\winpython-32bit-2.7.x.2\python-2.7.13"
rem npm config delete python
rem * ===================
echo remove enum34 from Tensorfow (2017-12-22)
rem * ===================
if exist "%WINPYDIR%\Lib\site-packages\enum" "%WINPYDIR%\scripts\pip.exe" uninstall -y enum34
rem * ===================
echo remove typing from altair (2018-11-01)
rem * ===================
if exist "%WINPYDIR%\Lib\site-packages\typing.py" "%WINPYDIR%\scripts\pip.exe" uninstall -y typing
rem * ===================
echo clear jupyterlab staging (2018-03-09)
rem * ===================
if exist "%WINPYDIR%\share\jupyter\lab\staging" rmdir /S /Q "%WINPYDIR%\share\jupyter\lab\staging"
rem * ===================
echo clear Pyside2 QML (2018-04-29 : it's too big)
rem * ===================
rem 20181222
rem if exist "%WINPYDIR%\Lib\site-packages\PySide2\qml" rmdir /S /Q "%WINPYDIR%\Lib\site-packages\PySide2\qml"
@echo on
echo 2019-10-22 Spyder tweaks moved at the end as suspicion of problem creating (on Python-3.8)
rem * ============================
echo .spyder3\temp.py suspected of creating issue east of Italia
echo see https://groups.google.com/forum/#!topic/spyderlib/dH5VXlTc30s
rem * ============================
if exist "%WINPYDIR%\..\settings\.spyder-py3\temp.py" del "%WINPYDIR%\..\settings\.spyder-py3\temp.py"
rem * ====================
echo patch spyder update reflex (2019-05-18 : spyder, not spyderlib !)
rem * ====================
%WINPYDIR%\python.exe -c "from winpython.utils import patch_sourcefile;patch_sourcefile(r'%WINPYDIR%\Lib\site-packages\spyder\config\main.py', ' '+chr(39)+'check_updates_on_startup'+chr(39)+': True', ' '+chr(39)+'check_updates_on_startup'+chr(39)+': False' )"
@echo on
goto the_end
rem ====================
rem installation via requirements.txt, requirements2.txt and requirements3.txt files
rem ====================
rem pip install cvxpy --no-index --find-links=C:\WinPython\packages.srcreq --trusted-host=None
set link_srcreq=--find-links=%origin%packages.srcreq
set my_req=%origin%requirements.txt
if exist %my_req% pip install -r %my_req% --no-index %link_srcreq% --trusted-host=None
set my_req=%origin%requirements2.txt
if exist %my_req% pip install -r %my_req% --no-index %link_srcreq% --trusted-host=None
set my_req=%origin%requirements3.txt
if exist %my_req% pip install -r %my_req% --no-index %link_srcreq% --trusted-host=None
:the_end