@@ -2,62 +2,61 @@ rem to launch from a winpython package directory, where 'make.py' is
22@ echo on
33
44rem *****************************
5+ rem 2020-07-05: install msvc_runtime before packages that may want to compile
56rem 2020-12-05 : add a constrints.txt file from a recent pip list
67rem 2021-03-20 : track successes packages combination are archived for future contraint update
7- rem 2021-04-22 : patch PyPy3 (as we don't try to copy PyPy3.exe to Python.exe)
8- rem 2021-04-22b: Patch PyPy3, give '%my_python_target_release%' to make (otherwise known only after unzip)
9- rem *****************************
10-
11- if " %my_constraints% " == " " set my_constraints = C:\WinP\constraints.txt
12-
13- rem *****************************
14- rem 2021-04-22 : path PyPy3 (as we don't try to copy PyPy3.exe to Python.exe)
15- rem *****************************
16- rem just replace python.exe (of the target distribution) per %target_python_exe%
17- if " %target_python_exe% " == " " set target_python_exe = python.exe
18-
8+ rem 2021-04-22 : path PyPy3 (as we don't try to copy PyPy3.exe to Python.exe)
9+ rem 2023-08-21a: add a pre_step with my_requirements_pre.txt + my_find_links_pre
1910rem *****************************
20- rem *****************************
21- rem 2019-05-10 PATCH for build problem (asking permission to overwrite the file)
22- rem
23- rem *****************************
24- del -y %userprofile% \.jupyter\jupyter_notebook_config.py
2511
12+ rem algorithm:
13+ rem 0.0 Initialize variables
14+ rem 1.0 Do 2021-04-22 : patch PyPy3 (as we don't try to copy PyPy3.exe to Python.exe)
15+ rem 2021-04-22b: Patch PyPy3, give '%my_python_target_release%' to make (otherwise known only after unzip)
16+ rem 2 a Pre-clear of previous build infrastructure
17+ rem 2.0 Create a new build
18+ rem 2.1 Create basic build infrastructure
19+ rem 2.2 check infrastructure is in place
20+ rem 2.3 add mandatory packages for build
21+ rem 2.4 add packages pre_requirements (if any)
22+ rem 2.5 add requirement packages
23+ rem 2.8 post-build (if specific workarounds)
24+ rem 2.9 archive success
25+ rem 3.0 Generate Changelog and binaries
2626
27- rem ******************************
2827
2928
30- rem this is initialised per the calling .bat
29+ rem this is pre- initialised per the program calling this .bat
3130rem set my_original_path=%path%
32- rem set my_buildenv=C:\WinPython-64bit-3.6.8.0
3331rem set my_root_dir_for_builds=D:\WinP
3432
3533rem set my_python_target=34
3634rem set my_pyver=3.4
35+ rem set my_flavor=mkl
3736rem set my_release=84
3837
39- rem *****************************
40- rem v2 2016-03-19 change
41- rem we don't use building rootdir (D:\winPython) anymore
42- rem we use only building basedir (D:\WinPython\basedir34Qt5)
38+
39+ rem set my_find_link=C:\WinP\packages.srcreq
40+
41+ rem this is optionaly pre-initialised per the calling program (simpler to manage here)
42+ rem set my_release_level=
43+
44+
45+ echo ------------------
46+ echo 0.0 Initialize variables
47+ echo ------------------
48+
49+ if " %my_release_level% " == " " set my_release_level = b4
4350
4451set my_basedir = %my_root_dir_for_builds% \bd%my_python_target%
45- rem set my_basedir=%my_root_dir_for_builds%\build%my_python_target%\%my_arch%
4652
47- rem ***********************************************************
48- rem Override other scripts (simpler maintenance)
53+ set my_buildenv = C:\WinPdev\WPy64-3890
4954
50- set my_buildenv = C:\WinPython-64bit-3.6.8.0
55+ if " %my_constraints% " == " " set my_constraints = C:\WinP\constraints.txt
5156
52- rem handle alpha set my_release_level=a0
53- if " %my_release_level% " == " " set my_release_level =
54- rem b5
57+ rem 2021-04-22 : path PyPy3 (as we don't try to copy PyPy3.exe to Python.exe)
58+ if " %target_python_exe% " == " " set target_python_exe = python.exe
5559
56- rem ---------
57- rem newAge 20191022
58- rem install with zero package, no installer, then do it from there
59- rem change is we must help by giving my_python_target_release
60- rem --------
6160
6261if %my_python_target% == 37 (
6362 set my_python_target_release = 3712
@@ -68,40 +67,48 @@ if %my_python_target%==38 (
6867 set my_release = 1
6968)
7069if %my_python_target% == 39 (
71- set my_python_target_release = 3910
72- set my_release = 0
70+ set my_python_target_release = 3915
71+ set my_release = 1
7372)
7473
7574if %my_python_target% == 310 (
76- set my_python_target_release = 3108
77- set my_release = 0
75+ set my_python_target_release = 31011
76+ set my_release = 2
7877)
7978
8079
8180if %my_python_target% == 311 (
82- set
6284
my_python_target_release = 3110
81+ set my_python_target_release = 3114
8382 set my_release = 1
8483)
8584
8685
86+ if %my_python_target% == 312 (
87+ set my_python_target_release = 3120
88+ set my_release = 0
89+ )
90+
91+
8792
8893rem **** 2018-10-30 create_installer **
8994if " %my_create_installer% " == " " set my_create_installer = True
90- rem ***********************************************************
9195
9296rem set my_flavor=Slim
9397
9498rem set my_arch=32
9599rem set my_preclear_build_directory=Yes
96100
97- rem set my_requi=C:\Winpents=d:\my_req1.txt d:\my_req2.txt d:\my_req3.txt d:\my_req4.txt
101+ rem 20230821 add a requirement_pre.txt +
102+ rem set my_requirements_pre=C:\WinP\bd311\requirements_mkl_pre.txt
103+ rem set my_find_links_pre=C:\WinP\packages_mkl.srcreq
104+
105+ rem set my_requirements=C:\Winpents=d:\my_req1.txt
98106rem set my_find_links=D:\WinPython\packages.srcreq
99107
100108rem set my_source_dirs=D:\WinPython\bd34\packages.src D:\WinPython\bd34\packages.win32.Slim
101109rem set my_toolsdirs=D:\WinPython\bd34\Tools.Slim
102110rem set my_docsdirs=D:\WinPython\bd34\docs.Slim
103111
104-
105112rem set my_install_options=--no-index --pre
106113
107114set my_day = %date:/ =- %
@@ -130,11 +137,16 @@ echo ===============>>%my_archive_log%
130137if not " %my_preclear_build_directory% " == " Yes" goto no_preclear
131138
132139
140+ echo ------------------
141+ echo 1.0 Do a Pre-clear of previous build infrastructure
142+ echo ------------------
133143echo ------------------>> %my_archive_log%
134- echo 1.0 Do Pre-clear >> %my_archive_log%
144+ echo 1.0 Do a Pre-clear of previous build infrastructure >> %my_archive_log%
135145echo %date% %time% >> %my_archive_log%
136146echo ------------------>> %my_archive_log%
137147
148+ rem 2019-05-10 PATCH for build problem (asking permission to overwrite the file)
149+ del -y %userprofile% \.jupyter\jupyter_notebook_config.py
138150
139151cd /D %my_root_dir_for_builds% \bd%my_python_target%
140152
@@ -165,11 +177,14 @@ echo %date% %time%>>%my_archive_log%
165177
166178:no_preclear
167179
180+ e
168181
169- echo ------------------>> %my_archive_log%
170- echo 2.0 Create a build>> %my_archive_log%
182+ echo -----------------------------
183+ echo 2.0 Create a new build
184+ echo ---------------------------- >> %my_archive_log%
185+ echo 2.0 Create a new build>> %my_archive_log%
171186echo %date% %time% >> %my_archive_log%
172- echo ------------------>> %my_archive_log%
187+ echo ---------------------------- >> %my_archive_log%
173188
174189
175190echo cd /D %~dp0 >> %my_archive_log%
@@ -181,9 +196,13 @@ set path=%my_original_path%
181196echo call %my_buildenv% \scripts\env.bat>> %my_archive_log%
182197call %my_buildenv% \scripts\env.bat
183198
199+ echo -----------------------------
200+ echo 2.1 Create basic build infrastructure
201+ echo %date% %time%
202+ echo -----------------------------
184203echo ----------------------------->> %my_archive_log%
185- echo 2.0 Create a build newage1/3 >> %my_archive_log%
186- echo %date% %time% >> %my_archive_log%
204+ echo 2.1 Create basic build infrastructure >> %my_archive_log%
205+ echo %date% %time% >> %my_archive_log%
187206echo ----------------------------->> %my_archive_log%
188207
189208rem 2019-10-22 new age step1
@@ -203,12 +222,12 @@ rem echo python.exe -c "from make import *;make_all(%my_release%, '%my_release_
203222
204223
205224echo -----------------------------
206- echo 2.0 Create a build newage2/3
207- echo %date% %time%
208- echo -----------------------------
225+ echo 2.2 check infrastructure is in place
226+ echo %date% %time%
227+ echo -----------------------------
209228echo ----------------------------->> %my_archive_log%
210- echo 2.0 Create a build newage2/3 >> %my_archive_log%
211- echo %date% %time% >> %my_archive_log%
229+ echo 2.2 check infrastructure is in place >> %my_archive_log%
230+ echo %date% %time% >> %my_archive_log%
212231echo ----------------------------->> %my_archive_log%
213232rem 2019-10-22 new age step2
214233rem we use final environment to install requirements
@@ -238,25 +257,77 @@ set
238257echo beg of step 2/3
239258rem ok no pause
240259
260+ echo -----------------------------
261+ echo 2.3 add mandatory packages for build
262+ echo %date% %time%
263+ echo -----------------------------
264+ echo ----------------------------->> %my_archive_log%
265+ echo 2.3 add mandatory packages for build>> %my_archive_log%
266+ echo %date% %time% >> %my_archive_log%
267+ echo ----------------------------->> %my_archive_log%
241268rem D/2020-07-05: install msvc_runtime before packages that may want to compile
242- echo pip install msvc_runtime --pre --no-index --trusted-host=None --find-links=C:\WinP\packages.srcreq --upgrade
243- echo pip install msvc_runtime --pre --no-index --trusted-host=None --find-links=C:\WinP\packages.srcreq --upgrade>> %my_archive_log%
244- pip install msvc_runtime --pre --no-index --trusted-host=None --find-links=C:\WinP\packages.srcreq --upgrade
269+ echo pip install msvc_runtime --pre --no-index --trusted-host=None --find-links=%my_find_links% --upgrade
270+ echo pip install msvc_runtime --pre --no-index --trusted-host=None --find-links=%my_find_links% --upgrade>> %my_archive_log%
271+ pip install msvc_runtime --pre --no-index --trusted-host=None --find-links=%my_find_links% --upgrade
245272rem F/2020-07-05: install msvc_runtime before packages that may want to compile
246273
247274
248- rem 2020-12-05 : add a constraints .txt file from a rece
436E
nt pip list
275+ rem D/2023-08-21a : add a pre_step with my_requirements_pre .txt + my_find_links_pre
249276
277+ echo -----------------------------
278+ echo 2.4 add packages pre_requirements (if any)
279+ echo %date% %time%
280+ echo -----------------------------
281+ echo ----------------------------->> %my_archive_log%
282+ echo 2.4 add packages pre_requirements (if any)
283+ echo %date% %time% >> %my_archive_log%
284+ echo ----------------------------->> %my_archive_log% rem F/20230821 add a pre_step with my_requirements_pre.txt + my_find_links_pre
285+
286+ if not " Z%my_requirements_pre% Z" == " ZZ" (
287+
288+ rem 2023-08-21a: add a pre_step with my_requirements_pre.txt + my_find_links_pre
289+ if " %my_find_links_pre% " == " " set my_find_links_pre = %my_find_links%
250290
251- echo pip install -r %my_requirements % -c %my_constraints% --pre --no-index --trusted-host=None --find-links=C:\WinP\packages.srcreq --upgrade %new_resolver%
252- 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%
291+ echo pip install -r %my_requirements_pre % -c %my_constraints% --pre --no-index --trusted-host=None --find-links=%my_find_links_pre% --upgrade %new_resolver%
292+ echo pip install -r %my_requirements_pre % -c %my_constraints% --pre --no-index --trusted-host=None --find-links=%my_find_links_pre% --upgrade %new_resolver% >> %my_archive_log%
253293echo if pip doesn't work, check the path of %my_WINPYDIRBASE%
254294
255- 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%
295+ pip install -r %my_requirements_pre% -c %my_constraints% --pre --no-index --trusted-host=None --find-links=%my_find_links_pre% --upgrade %new_resolver% >> %my_archive_log%
296+ )
297+ else
298+ (
299+ echo no packages pre_requirements
300+ echo no packages pre_requirements>> %my_archive_log%
301+ )
302+ rem F/2023-08-21a: add a pre_step with my_requirements_pre.txt + my_find_links_pre
256303
257- echo mid of step 2/3
304+ echo -----------------------------
305+ echo 2.5 add requirement packages
306+ echo %date% %time%
307+ echo -----------------------------
308+ echo ----------------------------->> %my_archive_log%
309+ echo 2.5 add requirement packages_versions>> %my_archive_log%
310+ echo %date% %time% >> %my_archive_log%
311+ echo ----------------------------->> %my_archive_log%
312+
313+ echo pip install -r %my_requirements% -c %my_constraints% --pre --no-index --trusted-host=None --find-links=%my_find_links% --upgrade %new_resolver%
314+ echo pip install -r %my_requirements% -c %my_constraints% --pre --no-index --trusted-host=None --find-links=%my_find_links% --upgrade %new_resolver% >> %my_archive_log%
315+ echo if pip doesn't work, check the path of %my_WINPYDIRBASE%
258316
259317
318+ rem 2020-12-05 : add a constraints.txt file from a recent pip list
319+ pip install -r %my_requirements% -c %my_constraints% --pre --no-index --trusted-host=None --find-links=%my_find_links% --upgrade %new_resolver% >> %my_archive_log%
320+
321+ echo mid of step 2/3
322+
323+ echo -----------------------------
324+ echo 2.8 post-build (if specific workarounds)
325+ echo %date% %time%
326+ echo -----------------------------
327+ echo ----------------------------->> %my_archive_log%
328+ echo 2.8 post-build (if specific workarounds)>> %my_archive_log%
329+ echo %date% %time% >> %my_archive_log%
330+ echo ----------------------------->> %my_archive_log%
260331rem finalize
261332@ echo on
262333call %my_basedir% \run_complement_newbuild.bat %my_WINPYDIRBASE%
@@ -267,17 +338,24 @@ rem pause
267338rem *****************************
268339rem 2021-03-20 : track successes packages combination are archived for future contraint update
269340rem *****************************
341+ echo -----------------------------
342+ echo 2.9 archive success
343+ echo %date% %time%
344+ echo -----------------------------
270345echo ----------------------------->> %my_archive_log%
271- echo 1.99 archive success
272- echo %date% %time% >> %my_archive_log%
346+ echo 2.9 archive success >> %my_archive_log%
347+ echo %date% %time% >> %my_archive_log%
273348echo ----------------------------->> %my_archive_log%
274349echo %target_python_exe% -m pip freeze> %my_archive_log% .packages_versions.txt>> %my_archive_log%
275350
276351%target_python_exe% -m pip freeze> %my_archive_log% .packages_versions.txt
277352
278353
354+ echo -----------------------------
355+ echo 3.0 Generate Changelog and binaries
356+ echo -----------------------------
279357echo ----------------------------->> %my_archive_log%
280- echo 2 .0 Create a build newage3/3 >> %my_archive_log%
358+ echo 3 .0 Generate Changelog and binaries >> %my_archive_log%
281359echo %date% %time% >> %my_archive_log%
282360echo ----------------------------->> %my_archive_log%
283361
@@ -296,6 +374,9 @@ echo python.exe -c "from make import *;make_all(%my_release%, '%my_release_leve
296374rem pause
297375python.exe -c " from make import *;make_all(%my_release% , '%my_release_level% ', pyver='%my_pyver% ', basedir=r'%my_basedir% ', verbose=True, architecture=%my_arch% , flavor='%my_flavor% ', install_options=r'%my_install_options% ', find_links=r'%my_find_links% ', source_dirs=r'%my_source_dirs% ', create_installer='%my_create_installer% ', remove_existing=False, python_target_release='%my_python_target_release% ')" >> %my_archive_log%
298376
377+ echo ===============
378+ echo END OF creation
379+ echo ===============
299380echo ===============>> %my_archive_log%
300381echo END OF creation>> %my_archive_log%
301382echo %date% %time% >> %my_archive_log%
0 commit comments