Skip to content

Commit 45def81

Browse files
committed
Jupyterlab2 farewell and pip --log audit addition
1 parent c33d0f2 commit 45def81

File tree

2 files changed

+36
-156
lines changed

2 files changed

+36
-156
lines changed

generate_a_winpython_distro.bat

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ rem Override other scripts (simpler maintenance)
4040

4141
set my_buildenv=C:\WinPython-64bit-3.6.8.0
4242

43-
rem handle alpha
44-
if "%my_release_level%"=="" set my_release_level=
43+
rem handle alpha set my_release_level=a0
44+
if "%my_release_level%"=="" set my_release_level=b1
4545

4646
rem ---------
4747
rem newAge 20191022
@@ -55,11 +55,11 @@ if %my_python_target%==37 (
5555
)
5656
if %my_python_target%==38 (
5757
set my_python_target_release=387
58-
set my_release=0
58+
set my_release=1
5959
)
6060
if %my_python_target%==39 (
6161
set my_python_target_release=391
62-
set my_release=0
62+
set my_release=1
6363
)
6464

6565
if %my_python_target%==310 (
@@ -216,23 +216,20 @@ echo pip install msvc_runtime --pre --no-index --trusted-host=None --find-link
216216
pip install msvc_runtime --pre --no-index --trusted-host=None --find-links=C:\WinP\packages.srcreq --upgrade
217217
rem F/2020-07-05: install msvc_runtime before packages that may want to compile
218218

219-
rem D/20200807a : test new resolver= "--use-feature=2020-resolver"
220-
rem just to go back to normal, do set new_resolver=
221-
rem D/20201107 : issues with new resolver infinity looping, waiting pip-20.2.5
222-
rem (if pip<20.3) set new_resolver=--use-feature=2020-resolver
223-
rem (if pip>=20.3) set new_resolver=--use-deprecated=legacy-resolver
224-
rem set new_resolver=--use-deprecated=legacy-resolver
225219

226220
rem 2020-12-05 : add a constraints.txt file from a recent pip list
227221

228-
echo pip install -r %my_requirements% -c %my_constraints% --pre --no-index --trusted-host=None --find-links=C:\WinP\packages.srcreq --upgrade %new_resolver%
229-
echo pip install -r %my_requirements% -c %my_constraints% --pre --no-index --trusted-host=None --find-links=C:\WinP\packages.srcreq --upgrade %new_resolver%>>%my_archive_log%
222+
rem 2021-01-09 : temporary log file to trace conflicts on very loong resolver time
223+
rem if issue, search "ERROR:" in --log C:\WinP\log.txt
224+
echo ".">C:\WinP\log.txt
230225

226+
echo pip install -r %my_requirements% -c %my_constraints% --pre --no-index --trusted-host=None --log C:\WinP\log.txt --find-links=C:\WinP\packages.srcreq --upgrade %new_resolver%
227+
echo pip install -r %my_requirements% -c %my_constraints% --pre --no-index --trusted-host=None --log C:\WinP\log.txt --find-links=C:\WinP\packages.srcreq --upgrade %new_resolver%>>%my_archive_log%
228+
start notepad.exe C:\WinP\log.txt
231229
echo if pip doesn't work, check the path of %my_WINPYDIRBASE%
232230

233-
pip install -r %my_requirements% -c %my_constraints% --pre --no-index --trusted-host=None --find-links=C:\WinP\packages.srcreq --upgrade %new_resolver%>>%my_archive_log%
231+
pip install -r %my_requirements% -c %my_constraints% --pre --no-index --trusted-host=None --log C:\WinP\log.txt --find-links=C:\WinP\packages.srcreq --upgrade %new_resolver%>>%my_archive_log%
234232

235-
rem F/20200807a : test new resolver= "--use-feature=2020-resolver"
236233
echo mid of step 2/3
237234

238235

run_complement_newbuild.bat

Lines changed: 25 additions & 142 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,17 @@ echo keep me in ansi =utf-8 without BOM (notepad plus plus or win10 screwing u
44
rem 2020-09-26 Jupyterlab-3 simplification
55
rem 2020-09-27 Jupyterlab-3 5S (looking for missing detail)
66
rem 2020-10-25no_more_needed "nbextension enable" no more needed for bqplot, ipyleaflet, ipympl
7+
rem 2021-01-16: jupyterlab2 stuff removal
78

89
rem use this in case we go back to jupyterlab-2
910
if "%jupyterlab2%"=="" set jupyterlab2=0
1011
echo jupyterlab2=%jupyterlab2%
1112
if %jupyterlab2%==1 then echo "do jupyterlab2 %jupyterlab2% stuff"
13+
1214
rem if build error, launch "WinPython Command Prompt.exe" dos ico, then try manual install of requirements.txt
13-
rem that is: pip install --pre --no-index --trusted-host=None --find-links=C:\WinP\packages.srcreq -c C:\WinP\constraints.txt -r c:\....\requirements.txt
15+
rem that is: pip install --pre --no-index --trusted-host=None --log C:\WinP\log.txt --find-links=C:\WinP\packages.srcreq -c C:\WinP\constraints.txt -r c:\....\requirements.txt
1416
rem ( drag & drop "requirements.txt" file in the dos window a the end of the line, to get full path)
17+
rem if issue, search "ERROR:" in --log C:\WinP\log.txt
1518
rem then drag & drop "run_complement_newbuild.bat" file in the dos window and launch it
1619

1720
@echo off
@@ -48,30 +51,11 @@ if "%jupyterlab2%"=="1" if exist "%WINPYDIR%\Lib\site-packages\jupyterlab" "%WI
4851

4952
@echo on
5053
rem * ===================
51-
echo jupyterlab manager (if npm there)
54+
echo jupyterlab pre-clean meaningless in 3.0
5255
rem * ==================
5356
@echo off
5457
rem pre-clean Whatever jupyterlab version
55-
if exist "%WINPYDIR%\Lib\site-packages\jupyterlab" "%WINPYDIR%\Scripts\jupyter.exe" lab clean
56-
57-
rem jupyter labextension list
58-
59-
if "%jupyterlab2%"=="1" 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-
rem 2020-10-25no_more_needed if exist "%WINPYDIR%\Lib\site-packages\bqplot" "%WINPYDIR%\Scripts\jupyter.exe" nbextension enable --py --sys-prefix bqplot
66-
67-
if "%jupyterlab2%"=="1" if exist "%WINPYDIR%\Lib\site-packages\bqplot" "%WINPYDIR%\Scripts\jupyter.exe" labextension install --no-build bqplot
68-
69-
70-
rem * ==================
71-
echo finish install of bokeh for jupyterlab (2019-08-10)
72-
rem * =================
73-
74-
if "%jupyterlab2%"=="1" if exist "%WINPYDIR%\Lib\site-packages\bokeh" "%WINPYDIR%\Scripts\jupyter.exe" labextension install --no-build @bokeh/jupyter_bokeh
58+
rem if exist "%WINPYDIR%\Lib\site-packages\jupyterlab" "%WINPYDIR%\Scripts\jupyter.exe" lab clean
7559

7660

7761
rem * ==================
@@ -80,24 +64,6 @@ rem * =================
8064
if exist "%WINPYDIR%\Lib\site-packages\ipydatawidgets" "%WINPYDIR%\Scripts\jupyter.exe" nbextension install --py --sys-prefix ipydatawidgets
8165
if exist "%WINPYDIR%\Lib\site-packages\ipydatawidgets" "%WINPYDIR%\Scripts\jupyter.exe" nbextension enable --py --sys-prefix ipydatawidgets
8266

83-
if "%jupyterlab2%"=="1" if exist "%WINPYDIR%\Lib\site-packages\ipydatawidgets" "%WINPYDIR%\Scripts\jupyter.exe" labextension install --no-build jupyterlab-datawidgets
84-
85-
86-
rem * ==================
87-
echo finish install of ipyleaflet
88-
rem * =================
89-
rem 2020-10-25no_more_needed if exist "%WINPYDIR%\Lib\site-packages\ipyleaflet" "%WINPYDIR%\Scripts\jupyter.exe" nbextension enable --py --sys-prefix ipyleaflet
90-
91-
if "%jupyterlab2%"=="1" if exist "%WINPYDIR%\Lib\site-packages\ipyleaflet" "%WINPYDIR%\Scripts\jupyter.exe" labextension install --no-build jupyter-leaflet
92-
93-
94-
rem * ==================
95-
echo finish install of pythreejs
96-
rem * =================
97-
rem 2020-10-25no_more_needed if exist "%WINPYDIR%\Lib\site-packages\pythreejs" "%WINPYDIR%\Scripts\jupyter.exe" nbextension enable --py --sys-prefix pythreejs
98-
99-
if "%jupyterlab2%"=="1" if exist "%WINPYDIR%\Lib\site-packages\pythreejs" "%WINPYDIR%\Scripts\jupyter.exe" labextension install --no-build jupyter-threejs
100-
10167

10268
rem * ==================
10369
echo finish install of ipyvolume / ipywebrtc
@@ -106,20 +72,11 @@ if exist "%WINPYDIR%\Lib\site-packages\ipywebrtc" "%WINPYDIR%\Scripts\jupyter.e
10672
if exist "%WINPYDIR%\Lib\site-packages\ipyvolume" "%WINPYDIR%\Scripts\jupyter.exe" nbextension enable --py --sys-prefix ipyvolume
10773

10874

109-
rem * ==================
110-
echo finish install of ipyvolume / ipywebrtc
111-
rem * =================
112-
113-
if "%jupyterlab2%"=="1" if exist "%WINPYDIR%\Lib\site-packages\ipywebrtc" "%WINPYDIR%\Scripts\jupyter.exe" labextension install --no-build jupyter-webrtc
114-
if "%jupyterlab2%"=="1" if exist "%WINPYDIR%\Lib\site-packages\ipywebrtc" "%WINPYDIR%\Scripts\jupyter.exe" labextension install --no-build ipyvolume
115-
116-
11775
rem * ==================
11876
echo finish install of pdvega
11977
rem * =================
12078
if exist "%WINPYDIR%\Lib\site-packages\vega3" "%WINPYDIR%\Scripts\jupyter.exe" nbextension enable --py --sys-prefix vega3
12179

122-
if "%jupyterlab2%"=="1" if exist "%WINPYDIR%\Lib\site-packages\jupyterlab" "%WINPYDIR%\Scripts\jupyter.exe" labextension install --no-build @jupyterlab/vega3-extension
12380

12481
rem * ==================
12582
echo finish install of rise
@@ -128,75 +85,40 @@ if exist "%WINPYDIR%\Lib\site-packages\rise" "%WINPYDIR%\Scripts\jupyter.exe" n
12885
if exist "%WINPYDIR%\Lib\site-packages\rise" "%WINPYDIR%\Scripts\jupyter.exe" nbextension enable --py --sys-prefix rise
12986

13087

131-
rem * ==================
132-
echo finish install of ipympl (2017-10-29)
133-
rem * =================
134-
rem 2020-10-25no_more_needed if exist "%WINPYDIR%\Lib\site-packages\ipympl" "%WINPYDIR%\Scripts\jupyter.exe" nbextension enable --py --sys-prefix ipympl
135-
136-
if "%jupyterlab2%"=="1" if exist "%WINPYDIR%\Lib\site-packages\ipympl" "%WINPYDIR%\Scripts\jupyter.exe" labextension install --no-build jupyter-matplotlib
137-
138-
rem * =================
139-
echo finish install of holoviews jupyterlab 2018-02-27
140-
rem * =================
141-
142-
if "%jupyterlab2%"=="1" if exist "%WINPYDIR%\Lib\site-packages\holoviews" "%WINPYDIR%\Scripts\jupyter.exe" labextension install --no-build @pyviz/jupyterlab_pyviz
143-
14488
rem * ==================
14589
echo finish install of nteract_on_jupyter (2018-12-27)
14690
rem * =================
14791
if exist "%WINPYDIR%\Lib\site-packages\nteract_on_jupyter" "%WINPYDIR%\Scripts\jupyter.exe" serverextension enable nteract_on_jupyter
14892

14993

150-
rem * ==================
151-
echo finish install of Qgrid(2020-03-10)
152-
rem * =================
153-
if exist "%WINPYDIR%\Lib\site-packages\qgrid" "%WINPYDIR%\Scripts\jupyter.exe" nbextension enable --py --sys-prefix qgrid
154-
155-
if "%jupyterlab2%"=="1" if exist "%WINPYDIR%\Lib\site-packages\qgrid" "%WINPYDIR%\Scripts\jupyter.exe" labextension install --no-build qgrid2
156-
157-
rem * ==================
158-
echo finish install of Jupyterlab-sql
159-
rem * ==================
160-
161-
rem if exist "%WINPYDIR%\Lib\site-packages\jupyterlab_sql" "%WINPYDIR%\Scripts\jupyter.exe" serverextension enable jupyterlab_sql --py --sys-prefix
162-
if "%jupyterlab2%"=="1" if exist "%WINPYDIR%\Lib\site-packages\jupyterlab_sql" "%WINPYDIR%\Scripts\jupyter.exe" labextension install --no-build @jupyterlab-sql
163-
164-
16594
rem * ==================
16695
echo finish install of Voila (2019-07-21)
16796
rem * =================
16897
if exist "%WINPYDIR%\Lib\site-packages\voila" "%WINPYDIR%\Scripts\jupyter.exe" serverextension enable voila --sys-prefix
16998

170-
if "%jupyterlab2%"=="1" if exist "%WINPYDIR%\Lib\site-packages\voila" "%WINPYDIR%\Scripts\jupyter.exe" labextension install --no-build @jupyter-voila/jupyterlab-preview
17199

172100
rem * ==================
173-
echo install of dataregistry (2019-07-28)(no more 2020-07-27)
101+
echo install of pydeck (2020-02-02)
174102
rem * =================
175-
if "%jupyterlab2%"=="1" if exist "%WINPYDIR%\Lib\site-packages\voila" "%WINPYDIR%\Scripts\jupyter.exe" labextension install @jupyterlab/dataregistry-extension
103+
if exist "%WINPYDIR%\Lib\site-packages\pydeck" "%WINPYDIR%\Scripts\jupyter.exe" nbextension enable --py --sys-prefix pydeck
176104

177105

178106
rem * ==================
179-
echo install of pydeck (2020-02-02)
107+
echo install of labextension install dask-labextension (2020-02-05)
180108
rem * =================
181-
if exist "%WINPYDIR%\Lib\site-packages\pydeck" "%WINPYDIR%\Scripts\jupyter.exe" nbextension enable --py --sys-prefix pydeck
182-
if "%jupyterlab2%"=="1" if exist "%WINPYDIR%\Lib\site-packages\pydeck" "%WINPYDIR%\Scripts\jupyter.exe" labextension install --no-build @deck.gl/jupyter-widget
109+
rem no more if exist "%WINPYDIR%\Lib\site-packages\dask_labextension" "%WINPYDIR%\Scripts\jupyter.exe" serverextension enable dask_labextension
110+
183111

184112
rem * ==================
185-
echo install of labextension install dask-labextension (2020-02-05)
113+
echo finish install of ipygany (2020-12-29)
186114
rem * =================
187-
if "%jupyterlab2%"=="1" if exist "%WINPYDIR%\Lib\site-packages\dask_labextension" "%WINPYDIR%\Scripts\jupyter.exe" labextension install --no-build dask-labextension
188-
if exist "%WINPYDIR%\Lib\site-packages\dask_labextension" "%WINPYDIR%\Scripts\jupyter.exe" serverextension enable dask_labextension
115+
if exist "%WINPYDIR%\Lib\site-packages\ipygany" "%WINPYDIR%\Scripts\jupyter.exe" nbextension enable --py --sys-prefix ipygany
189116

190117
rem * =================
191118
echo finish install seaborn iris example
192119
rem * =================
193120
if exist "%WINPYDIR%\Lib\site-packages\seaborn" "%WINPYDIR%\python.exe" -c "import seaborn as sns;sns.set();sns.load_dataset('iris')"
194121

195-
rem * =================
196-
echo finish install PyQtdoc
197-
rem * =================
198-
if exist "%WINPYDIR%\Scripts\PyQtdoc_win_post_install.bat" "%WINPYDIR%\Scripts\PyQtdoc_win_post_install.bat" "-install"
199-
200122

201123
rem * =================
202124
echo opengl PyQt5 patch 2018-01-06
@@ -221,56 +143,32 @@ rem * =================
221143
rem echo tornado Python-3.8.0 fix 2019-06-28 https://github.com/tornadoweb/tornado/issues/2656#issuecomment-491400255
222144
rem * ==================
223145

146+
rem KEEP as example for next time needed
147+
224148
set qt56p=%WINPYDIR%\Lib\site-packages\tornado-6.0.3.dist-info
225149
if exist "%qt56p%" (
226-
%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' )"
227-
echo "DID I patch %qt56p% ??"
228-
rem pause
150+
%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' )"
151+
rem echo "DID I patch %qt56p% ??"
229152
) else (
230-
echo "I DIDN'T patch of %qt56p% !"
231-
rem pause
153+
rem echo "I DIDN'T patch of %qt56p% !"
232154
)
233155

234-
235-
236-
rem * ===================
237-
echo 2018-03-25 Jupyterlab simplified wrap-up (https://github.com/jupyter/notebook/pull/3116#issuecomment-355672998)
238-
rem * ===================
239-
rem reduce time by building only once
240-
rem at each extension do:
241-
rem "%WINPYDIR%\Scripts\jupyter.exe" labextension install --no-build
242-
rem at the end:
243-
rem jupyter lab build
244-
rem )
245-
246156
echo JUPYTERLAB_DIR=%JUPYTERLAB_DIR% default is ~/.jupyter/lab
247157
echo JUPYTERLAB_SETTINGS_DIR=%JUPYTERLAB_SETTINGS_DIR% , default is ~/.jupyter/lab/user-settings/
248158
echo JUPYTERLAB_WORKSPACES_DIR=%JUPYTERLAB_WORKSPACES_DIR% , default is ~/.jupyter/lab/workspaces/
249159

250160
%WINPYDIR%\Scripts\jupyter.exe" lab path
251161

252162

253-
254-
if "%jupyterlab2%"=="1" if exist "%WINPYDIR%\Lib\site-packages\jupyterlab" (
255-
"%WINPYDIR%\Scripts\jupyter.exe" lab build
256-
jupyter labextension list
257-
)
258-
259163
rem jupyter labextension update --all (will rebuild if needed)
164+
rem 2020-12-31 tweaks
165+
rem see https://jupyter.readthedocs.io/en/latest/use/jupyter-directories.html
166+
if exist "%WINPYDIR%\Lib\site-packages\jupyterlab" (
167+
"%WINPYDIR%\Scripts\jupyter.exe"jupyter labextension list
168+
"%WINPYDIR%\Scripts\jupyter.exe"jupyter --paths
169+
)
260170

261-
262-
263-
264-
rem * ===================
265-
echo remove enum34 from Tensorfow (2017-12-22)
266-
rem * ===================
267-
if exist "%WINPYDIR%\Lib\site-packages\enum" "%WINPYDIR%\scripts\pip.exe" uninstall -y enum34
268-
269-
270-
rem * ===================
271-
echo remove typing from altair (2018-11-01)
272-
rem * ===================
273-
if exist "%WINPYDIR%\Lib\site-packages\typing.py" "%WINPYDIR%\scripts\pip.exe" uninstall -y typing
171+
if exist "%WINPYDIR%\Lib\site-packages\notebook" "%WINPYDIR%\Scripts\jupyter.exe" nbextension list
274172

275173

276174
rem * ===================
@@ -310,21 +208,6 @@ if exist "%WINPYDIR%\Lib\site-packages\pipdeptree" pipdeptree
310208
@echo on
311209
goto the_end
312210

313-
rem ====================
314-
rem installation via requirements.txt, requirements2.txt and requirements3.txt files
315-
rem ====================
316-
317-
rem pip install cvxpy --no-index --find-links=C:\WinPython\packages.srcreq --trusted-host=None
318-
319-
set link_srcreq=--find-links=%origin%packages.srcreq
320-
321-
set my_req=%origin%requirements.txt
322-
if exist %my_req% pip install -r %my_req% --no-index %link_srcreq% --trusted-host=None
323-
324-
set my_req=%origin%requirements2.txt
325-
if exist %my_req% pip install -r %my_req% --no-index %link_srcreq% --trusted-host=None
326211

327-
set my_req=%origin%requirements3.txt
328-
if exist %my_req% pip install -r %my_req% --no-index %link_srcreq% --trusted-host=None
329212

330213
:the_end

0 commit comments

Comments
 (0)