1+ @ echo off
2+ rem %1 is WINPYDIR being prepared
3+ rem this .bat is placed at root (buildir34, buildir34\FlavorJulia, ...)
4+ set origin = %~dp0
5+ set new_winpydir = %1
6+
7+ cd /d %new_winpydir%
8+
9+ call scripts\env.bat
10+ @ echo off
11+
12+
13+ rem * ==========================
14+ rem * When Python has no mingwpy
15+ rem * ==========================
16+ if not exist " %WINPYDIR% \Lib\site-packages\mingwpy" set pydistutils_cfg = %WINPYDIR% \..\settings\pydistutils.cfg
17+ if not exist " %WINPYDIR% \Lib\site-packages\mingwpy" echo [config]> %pydistutils_cfg%
18+
19+
20+ rem * ==========================
21+ rem * configure ipython-parallel
22+ rem * ==========================
23+ @ echo off
24+ if exist " %WINPYDIR% \Lib\site-packages\IPython" " %WINPYDIR% \Scripts\jupyter-notebook.exe" --generate-config
25+
26+ rem starting Jupyter 5+, use ipcluster
27+ if exist " %WINPYDIR% \Scripts\ipcluster.exe" " %WINPYDIR% \Scripts\ipcluster.exe" nbextension enable
28+
29+ rem 2018-03-10
30+ if exist " %WINPYDIR% \Scripts\ipcluster.exe" jupyter nbextension install --sys-prefix --py ipyparallel
31+ if exist " %WINPYDIR% \Scripts\ipcluster.exe" jupyter nbextension enable --sys-prefix --py ipyparallel
32+
33+ rem if not exist "ipcluster.exe" echo c.NotebookApp.server_extensions.append('ipyparallel.nbextension')>> "%winpydir%\..\settings\.jupyter\jupyter_notebook_config.py"
34+
35+ @ echo off
36+ rem * ===========================
37+ echo finish install of jupyterlab
38+ rem * ===========================
39+
40+ rem other suggestion from https://github.com/nteract/nteract
41+ rem npm install -g --production windows-build-tools
42+
43+ rem 2018-01-15 node-gyp experience 2018-01-19removetest
44+ rem npm config set python "C:/WinPython/basedir27/buildZero/winpython-32bit-2.7.x.2/python-2.7.13/python.exe"
45+ rem npm config set PYTHON "C:/WinP/bd27/buildZero/winpython-32bit-2.7.x.2/python-2.7.13/python.exe"
46+
47+ rem "%WINPYDIR%\..\tools\n\node_modules\npm\bin\node-gyp-bin\node-gyp.cmd" configure --msvs_version=2015
48+ rem if exist "%WINPYDIR%\Lib\site-packages\jupyterlab" "%WINPYDIR%\Scripts\jupyter.exe" serverextension enable --py jupyterlab --sys-prefix
49+
50+ @ echo on
51+ rem * ===================
52+ echo jupyterlab manager (if npm there)
53+ rem * ==================
54+ @ echo off
55+ rem jupyter lab clean
56+ rem jupyter labextension list
57+
58+ rem 2018-07-07 for jupyterlab-0.32.x: https://www.npmjs.com/package/@jupyter-widgets/jupyterlab-manager
59+ if exist " %WINPYDIR% \Lib\site-packages\jupyterlab" " %WINPYDIR% \Scripts\jupyter.exe" labextension install --no-build @ jupyter-widgets/jupyterlab-manager
60+
61+
62+ rem * ==================
63+ echo finish install of bqplot
64+ rem * =================
65+ if exist " %WINPYDIR% \Lib\site-packages\bqplot" " %WINPYDIR% \Scripts\jupyter.exe" nbextension enable --py --sys-prefix bqplot
66+ if exist " %WINPYDIR% \Lib\site-packages\bqplot" " %WINPYDIR% \Scripts\jupyter.exe" labextension install --no-build bqplot
67+
68+
69+ rem * ==================
70+ echo finish install of bokeh for jupyterlab (2017-09-16)
71+ rem * =================
72+ if exist " %WINPYDIR% \Lib\site-packages\bokeh" " %WINPYDIR% \Scripts\jupyter.exe" labextension install --no-build jupyterlab_bokeh
73+
74+
75+ rem * ==================
76+ echo finish install of ipydatawidgets (2018-03-10)
77+ rem * =================
78+ if exist " %WINPYDIR% \Lib\site-packages\ipydatawidgets" " %WINPYDIR% \Scripts\jupyter.exe" nbextension install --py --sys-prefix ipydatawidgets
79+ if exist " %WINPYDIR% \Lib\site-packages\ipydatawidgets" " %WINPYDIR% \Scripts\jupyter.exe" nbextension enable --py --sys-prefix ipydatawidgets
80+ if exist " %WINPYDIR% \Lib\site-packages\ipydatawidgets" " %WINPYDIR% \Scripts\jupyter.exe" labextension install --no-build jupyterlab-datawidgets
81+
82+
83+ rem * ==================
84+ echo finish install of ipyleaflet
85+ rem * =================
86+ if exist " %WINPYDIR% \Lib\site-packages\ipyleaflet" " %WINPYDIR% \Scripts\jupyter.exe" nbextension enable --py --sys-prefix ipyleaflet
87+ if exist " %WINPYDIR% \Lib\site-packages\ipyleaflet" " %WINPYDIR% \Scripts\jupyter.exe" labextension install --no-build jupyter-leaflet
88+
89+
90+ rem * ==================
91+ echo finish install of pythreejs
92+ rem * =================
93+ if exist " %WINPYDIR% \Lib\site-packages\pythreejs" " %WINPYDIR% \Scripts\jupyter.exe" nbextension enable --py --sys-prefix pythreejs
94+ if exist " %WINPYDIR% \Lib\site-packages\pythreejs" " %WINPYDIR% \Scripts\jupyter.exe" labextension install --no-build jupyter-threejs
95+
96+
97+ rem * ==================
98+ echo finish install of ipyvolume / ipywebrtc
99+ rem * =================
100+ if exist " %WINPYDIR% \Lib\site-packages\ipywebrtc" " %WINPYDIR% \Scripts\jupyter.exe" nbextension enable --py --sys-prefix ipywebrtc
101+ if exist " %WINPYDIR% \Lib\site-packages\ipyvolume" " %WINPYDIR% \Scripts\jupyter.exe" nbextension enable --py --sys-prefix ipyvolume
102+
103+
104+ rem * ==================
105+ echo finish install of ipyvolume / ipywebrtc
106+ rem * =================
107+ if exist " %WINPYDIR% \Lib\site-packages\ipywebrtc" " %WINPYDIR% \Scripts\jupyter.exe" labextension install --no-build jupyter-webrtc
108+ if exist " %WINPYDIR% \Lib\site-packages\ipywebrtc" " %WINPYDIR% \Scripts\jupyter.exe" labextension install --no-build ipyvolume
109+
110+
111+ rem * ==================
112+ echo finish install of pdvega
113+ rem * =================
114+ if exist " %WINPYDIR% \Lib\site-packages\vega3" " %WINPYDIR% \Scripts\jupyter.exe" nbextension enable --py --sys-prefix vega3
115+
116+
117+ rem * ==================
118+ echo finish install of rise
119+ rem * =================
120+ if exist " %WINPYDIR% \Lib\site-packages\rise" " %WINPYDIR% \Scripts\jupyter.exe" nbextension install rise --py --sys-prefix
121+ if exist " %WINPYDIR% \Lib\site-packages\rise" " %WINPYDIR% \Scripts\jupyter.exe" nbextension enable --py --sys-prefix rise
122+
123+
124+ rem * ==================
125+ echo finish install of ipympl (2017-10-29)
126+ rem * =================
127+ if exist " %WINPYDIR% \Lib\site-packages\ipympl" " %WINPYDIR% \Scripts\jupyter.exe" nbextension enable --py --sys-prefix ipympl
128+ if exist " %WINPYDIR% \Lib\site-packages\ipympl" " %WINPYDIR% \Scripts\jupyter.exe" labextension install --no-build jupyter-matplotlib
129+
130+
131+ rem * =================
132+ echo finish install of holoviews jupyterlab 2018-02-27
133+ rem * =================
134+ if exist " %WINPYDIR% \Lib\site-packages\holoviews" " %WINPYDIR% \Scripts\jupyter.exe" labextension install --no-build @ pyviz/jupyterlab_pyviz
135+
136+ rem * =================
137+ echo finish install seaborn iris example
138+ rem * =================
139+ if exist " %WINPYDIR% \Lib\site-packages\seaborn" " %WINPYDIR% \python.exe" -c " import seaborn as sns;sns.set();sns.load_dataset('iris')"
140+
141+ rem * =================
142+ echo finish install PyQtdoc
143+ rem * =================
144+ if exist " %WINPYDIR% \Scripts\PyQtdoc_win_post_install.bat" " %WINPYDIR% \Scripts\PyQtdoc_win_post_install.bat" " -install"
145+
146+
147+ rem * =================
148+ echo opengl PyQt5 patch 2018-01-06
149+ rem * ==================
150+ set qt56p = %WINPYDIR% \Lib\site-packages\PyQt5\Qt\bin
151+ set qt56dest = %WINPYDIR% \Lib\site-packages\PyQt5\Qt\bin\opengl32sw.dll
152+ if exist " %qt56p% " if not exist " %qt56dest% " (
153+ if " %WINPYARCH% " == " WIN32" copy " C:\WinPython\bd35\patch_qt570\opengl32sw-32\opengl32sw.dll" " %WINPYDIR% \Lib\site-packages\PyQt5\Qt\bin\opengl32sw.dll"
154+ )
155+ if not " %WINPYARCH% " == " WIN32" copy " C:\WinPython\bd35\patch_qt570\opengl32sw-64\opengl32sw.dll" " %WINPYDIR% \Lib\site-packages\PyQt5\Qt\bin\opengl32sw.dll"
156+ )
157+
158+
159+ rem * ============================
160+ echo .spyder3\temp.py suspected of creating issue east of Italia
161+ echo see https://groups.google.com/forum/#!topic/spyderlib/dH5VXlTc30s
162+ rem * ============================
163+ if exist " %WINPYDIR% \..\settings\.spyder-py3\temp.py" del " %WINPYDIR% \..\settings\.spyder-py3\temp.py"
164+
165+
166+ rem * ====================
167+ echo patch spyder update reflex (2017-03-25)
168+ rem * ====================
169+ %WINPYDIR% \python.exe -c " from winpython.utils import patch_sourcefile;patch_sourcefile(r'%WINPYDIR% \Lib\site-packages\spyderlib\config\main.py', ' '+chr(39)+'check_updates_on_startup'+chr(39)+': True', ' '+chr(39)+'check_updates_on_startup'+chr(39)+': False' )"
170+
171+
172+ rem * ===================
173+ echo 2018-03-25 Jupyterlab simplified wrap-up (https://github.com/jupyter/notebook/pull/3116#issuecomment-355672998)
174+ rem * ===================
175+ rem reduce time by building only once
176+ rem at each extension do:
177+ rem "%WINPYDIR%\Scripts\jupyter.exe" labextension install --no-build
178+ rem at the end:
179+ if exist " %WINPYDIR% \Lib\site-packages\jupyterlab" " %WINPYDIR% \Scripts\jupyter.exe" lab build
180+ if exist " %WINPYDIR% \Lib\site-packages\jupyterlab" jupyter labextension list
181+
182+
183+ rem 2018-01-15 node-gyp experience
184+ rem npm config set python "C:\WinPython\bd27\buildZero\winpython-32bit-2.7.x.2\python-2.7.13"
185+ rem npm config delete python
186+
187+
188+ rem * ===================
189+ echo remove enum34 from Tensorfow (2017-12-22)
190+ rem * ===================
191+ if exist " %WINPYDIR% \Lib\site-packages\enum" " %WINPYDIR% \scripts\pip.exe" uninstall -y enum34
192+
193+
194+ rem * ===================
195+ echo remove typing from altair (2018-11-01)
196+ rem * ===================
197+ if exist " %WINPYDIR% \Lib\site-packages\typing.py" " %WINPYDIR% \scripts\pip.exe" uninstall -y typing
198+
199+
200+ rem * ===================
201+ echo clear jupyterlab staging (2018-03-09)
202+ rem * ===================
203+ if exist " %WINPYDIR% \share\jupyter\lab\staging" rmdir /S /Q " %WINPYDIR% \share\jupyter\lab\staging"
204+
205+
206+ rem * ===================
207+ echo clear Pyside2 QML (2018-04-29 : it's too big)
208+ rem * ===================
209+ if exist " %WINPYDIR% \Lib\site-packages\PySide2\qml" rmdir /S /Q " %WINPYDIR% \Lib\site-packages\PySide2\qml"
210+
211+ @ echo on
212+ goto the_end
213+
214+ rem ====================
215+ rem installation via requirements.txt, requirements2.txt and requirements3.txt files
216+ rem ====================
217+
218+ rem pip install cvxpy --no-index --find-links=C:\WinPython\packages.srcreq --trusted-host=None
219+
220+ set link_srcreq = --find-links=%origin% packages.srcreq
221+
222+ set my_req = %origin% requirements.txt
223+ if exist %my_req% pip install -r %my_req% --no-index %link_srcreq% --trusted-host=None
224+
225+ set my_req = %origin% requirements2.txt
226+ if exist %my_req% pip install -r %my_req% --no-index %link_srcreq% --trusted-host=None
227+
228+ set my_req = %origin% requirements3.txt
229+ if exist %my_req% pip install -r %my_req% --no-index %link_srcreq% --trusted-host=None
230+
231+ :the_end
0 commit comments