@@ -2,62 +2,61 @@ rem to launch from a winpython package directory, where 'make.py' is
2
2
@ echo on
3
3
4
4
rem *****************************
5
+ rem 2020-07-05: install msvc_runtime before packages that may want to compile
5
6
rem 2020-12-05 : add a constrints.txt file from a recent pip list
6
7
rem 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
19
10
rem *****************************
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
25
11
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
26
26
27
- rem ******************************
28
27
29
28
30
- rem this is initialised per the calling .bat
29
+ rem this is pre- initialised per the program calling this .bat
31
30
rem set my_original_path=%path%
32
- rem set my_buildenv=C:\WinPython-64bit-3.6.8.0
33
31
rem set my_root_dir_for_builds=D:\WinP
34
32
35
33
rem set my_python_target=34
36
34
rem set my_pyver=3.4
35
+ rem set my_flavor=mkl
37
36
rem set my_release=84
38
37
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
43
50
44
51
set 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%
46
52
47
- rem ***********************************************************
48
- rem Override other scripts (simpler maintenance)
53
+ set my_buildenv = C:\WinPdev\WPy64-3890
49
54
50
- set my_buildenv = C:\WinPython-64bit-3.6.8.0
55
+ if " %my_constraints% " == " " set my_constraints = C:\WinP\constraints.txt
51
56
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
55
59
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 --------
61
60
62
61
if %my_python_target% == 37 (
63
62
set my_python_target_release = 3712
@@ -68,40 +67,48 @@ if %my_python_target%==38 (
68
67
set my_release = 1
69
68
)
70
69
if %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
73
72
)
74
73
75
74
if %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
78
77
)
79
78
80
79
81
80
if %my_python_target% == 311 (
82
- set my_python_target_release = 3110
81
+ set my_python_target_release = 3114
83
82
set my_release = 1
84
83
)
85
84
86
85
86
+ if %my_python_target% == 312 (
87
+ set my_python_target_release = 3120
88
+ set my_release = 0
89
+ )
90
+
91
+
87
92
88
93
rem **** 2018-10-30 create_installer **
89
94
if " %my_create_installer% " == " " set my_create_installer = True
90
- rem ***********************************************************
91
95
92
96
rem set my_flavor=Slim
93
97
94
98
rem set my_arch=32
95
99
rem set my_preclear_build_directory=Yes
96
100
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
98
106
rem set my_find_links=D:\WinPython\packages.srcreq
99
107
100
108
rem set my_source_dirs=D:\WinPython\bd34\packages.src D:\WinPython\bd34\packages.win32.Slim
101
109
rem set my_toolsdirs=D:\WinPython\bd34\Tools.Slim
102
110
rem set my_docsdirs=D:\WinPython\bd34\docs.Slim
103
111
104
-
105
112
rem set my_install_options=--no-index --pre
106
113
107
114
set my_day = %date:/ =- %
@@ -130,11 +137,16 @@ echo ===============>>%my_archive_log%
130
137
if not " %my_preclear_build_directory% " == " Yes" goto no_preclear
131
138
132
139
140
+ echo ------------------
141
+ echo 1.0 Do a Pre-clear of previous build infrastructure
142
+ echo ------------------
133
143
echo ------------------>> %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%
135
145
echo %date% %time% >> %my_archive_log%
136
146
echo ------------------>> %my_archive_log%
137
147
148
+ rem 2019-05-10 PATCH for build problem (asking permission to overwrite the file)
149
+ del -y %userprofile% \.jupyter\jupyter_notebook_config.py
138
150
139
151
cd /D %my_root_dir_for_builds% \bd%my_python_target%
140
152
@@ -165,11 +177,14 @@ echo %date% %time%>>%my_archive_log%
165
177
166
178
:no_preclear
167
179
180
+ e
168
181
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%
171
186
echo %date% %time% >> %my_archive_log%
172
- echo ------------------>> %my_archive_log%
187
+ echo ---------------------------- >> %my_archive_log%
173
188
174
189
175
190
echo cd /D %~dp0 >> %my_archive_log%
@@ -181,9 +196,13 @@ set path=%my_original_path%
181
196
echo call %my_buildenv% \scripts\env.bat>> %my_archive_log%
182
197
call %my_buildenv% \scripts\env.bat
183
198
199
+ echo -----------------------------
200
+ echo 2.1 Create basic build infrastructure
201
+ echo %date% %time%
202
+ echo -----------------------------
184
203
echo ----------------------------->> %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%
187
206
echo ----------------------------->> %my_archive_log%
188
207
189
208
rem 2019-10-22 new age step1
@@ -203,12 +222,12 @@ rem echo python.exe -c "from make import *;make_all(%my_release%, '%my_release_
203
222
204
223
205
224
echo -----------------------------
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 -----------------------------
209
228
echo ----------------------------->> %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%
212
231
echo ----------------------------->> %my_archive_log%
213
232
rem 2019-10-22 new age step2
214
233
rem we use final environment to install requirements
@@ -238,25 +257,77 @@ set
238
257
echo beg of step 2/3
239
258
rem ok no pause
240
259
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%
241
268
rem 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
245
272
rem F/2020-07-05: install msvc_runtime before packages that may want to compile
246
273
247
274
248
- rem 2020-12-05 : add a constraints .txt file from a recent pip list
275
+ rem D/2023-08-21a : add a pre_step with my_requirements_pre .txt + my_find_links_pre
249
276
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%
250
290
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%
253
293
echo if pip doesn't work, check the path of %my_WINPYDIRBASE%
254
294
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
256
303
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%
258
316
259
317
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%
260
331
rem finalize
261
332
@ echo on
262
333
call %my_basedir% \run_complement_newbuild.bat %my_WINPYDIRBASE%
@@ -267,17 +338,24 @@ rem pause
267
338
rem *****************************
268
339
rem 2021-03-20 : track successes packages combination are archived for future contraint update
269
340
rem *****************************
341
+ echo -----------------------------
342
+ echo 2.9 archive success
343
+ echo %date% %time%
344
+ echo -----------------------------
270
345
echo ----------------------------->> %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%
273
348
echo ----------------------------->> %my_archive_log%
274
349
echo %target_python_exe% -m pip freeze> %my_archive_log% .packages_versions.txt>> %my_archive_log%
275
350
276
351
%target_python_exe% -m pip freeze> %my_archive_log% .packages_versions.txt
277
352
278
353
354
+ echo -----------------------------
355
+ echo 3.0 Generate Changelog and binaries
356
+ echo -----------------------------
279
357
echo ----------------------------->> %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%
281
359
echo %date% %time% >> %my_archive_log%
282
360
echo ----------------------------->> %my_archive_log%
283
361
@@ -296,6 +374,9 @@ echo python.exe -c "from make import *;make_all(%my_release%, '%my_release_leve
296
374
rem pause
297
375
python.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%
298
376
377
+ echo ===============
378
+ echo END OF creation
379
+ echo ===============
299
380
echo ===============>> %my_archive_log%
300
381
echo END OF creation>> %my_archive_log%
301
382
echo %date% %time% >> %my_archive_log%
0 commit comments