@@ -42,12 +42,7 @@ set "my_WINPYDIRBASE=%my_basedir%\bu%my_flavor%\WPy%my_arch%-%my_python_target_r
42
42
rem a building env need is a Python with packages: WinPython + build + flit + packaging + mkshim400.py
43
43
set my_buildenv = C:\WinPdev\WPy64-310111
44
44
45
-
46
-
47
-
48
- echo -------------------------------------- >> %my_archive_log%
49
- echo (%date% %time% ) preparing winPython for %my_pyver% (%my_python_target% )release %my_release%%m y_flavor% (%my_release_level% ) *** %my_arch% bit ***>> %my_archive_log%
50
- echo -------------------------------------- >> %my_archive_log%
45
+ call :log_section preparing winPython for %my_pyver% (%my_python_target% )release %my_release%%m y_flavor% (%my_release_level% ) *** %my_arch% bit ***
51
46
52
47
rem Pre-clear previous build infrastructure
53
48
if " %my_preclear_build_directory% " == " Yes" (
@@ -63,20 +58,18 @@ if "%my_preclear_build_directory%"=="Yes" (
63
58
rmdir /S /Q dist
64
59
)
65
60
66
- REM Create a new build
67
- echo -------------------------------------- >> %my_archive_log%
68
- echo " (%date% %time% ) Create a new build" >> %my_archive_log%
69
- echo -------------------------------------- >> %my_archive_log%
61
+ call :log_section Create a new build
62
+
70
63
cd /D %~dp0
71
64
set path = %my_original_path%
72
65
call %my_buildenv% \scripts\env.bat
73
66
@ echo on
74
67
75
- REM Create basic build infrastructure
68
+ call : log_section Create basic build infrastructure
76
69
echo " (%date% %time% ) Create basic build infrastructure" >> %my_archive_log%
77
70
python.exe -c " from make import *;make_all(%my_release% , '%my_release_level% ', basedir_wpy=r'%my_WINPYDIRBASE% ', verbose=True, flavor='%my_flavor% ', source_dirs=r'%my_source_dirs% ', toolsdirs=r'%my_toolsdirs% ')" >> %my_archive_log%
78
71
79
- REM Check infrastructure is in place
72
+ call : log_section Check infrastructure is in place
80
73
echo " (%date% %time% ) Check infrastructure" >> %my_archive_log%
81
74
set WINPYDIRBASE = %my_WINPYDIRBASE%
82
75
@@ -92,10 +85,7 @@ if not exist %my_WINPYDIRBASE%\scripts\env.bat (
92
85
exit
93
86
)
94
87
95
- REM Add pre-requisite packages
96
- echo -------------------------------------- >> %my_archive_log%
97
- echo " (%date% %time% ) Add pre-requisite packages" >> %my_archive_log%
98
- echo -------------------------------------- >> %my_archive_log%
88
+ call :log_section Add pre-requisite packages
99
89
100
90
set path = %my_original_path%
101
91
call %my_WINPYDIRBASE% \scripts\env.bat
@@ -112,17 +102,13 @@ if not "Z%my_requirements_pre%Z"=="ZZ" (
112
102
echo " No pre-requisite packages" >> %my_archive_log%
113
103
)
114
104
115
- REM Add requirement packages
116
- echo -------------------------------------- >> %my_archive_log%
117
- echo " (%date% %time% ) Add requirement packages" >> %my_archive_log%
118
- echo -------------------------------------- >> %my_archive_log%
105
+ call :log_section Add requirement packages
106
+
119
107
python -m pip install -r %my_requirements% -c %my_constraints% --pre --no-index --trusted-host=None --find-links=%my_find_links% >> %my_archive_log%
120
108
python -c " from wppm import wppm;dist=wppm.Distribution(r'%WINPYDIR% ');dist.patch_standard_packages('', to_movable=True)"
121
109
122
- REM Add Wheelhouse (to replace per pip lock direct ? would allow paralellism)
123
- echo -------------------------------------- >> %my_archive_log%
124
- echo " (%date% %time% ) Add lockfile wheels" >> %my_archive_log%
125
- echo -------------------------------------- >> %my_archive_log%
110
+ call :log_section Add lockfile wheels
111
+
126
112
set path = %my_original_path%
127
113
@ echo on
128
114
call %my_WINPYDIRBASE% \scripts\env.bat
@@ -164,9 +150,7 @@ echo %my_WINPYDIRBASE%\python\scripts\wppm.exe "%pip_lock_includedweb%" -ws "%m
164
150
%my_WINPYDIRBASE% \python\scripts\wppm.exe " %pip_lock_includedweb% " -ws " %my_find_links% " -wd " %my_WINPYDIRBASE% \wheelhouse\included.wheels"
165
151
)
166
152
167
- echo -------------------------------------- >> %my_archive_log% ;
168
- echo " (%date% %time% ) generate pylock.toml files and requirement.txt with hash files" >> %my_archive_log%
169
- echo -------------------------------------- >> %my_archive_log%
153
+ call :log_section generate pylock.toml files and requirement.txt with hash files
170
154
171
155
set path = %my_original_path%
172
156
call %my_WINPYDIRBASE% \scripts\env.bat
@@ -212,10 +196,8 @@ copy/Y %pip_lock_web% %my_changelog_lockfile%
212
196
copy/Y %req_lock_web% %my_changelog_reqfile%
213
197
214
198
215
- REM Archive success
216
- echo -------------------------------------- >> %my_archive_log%
217
- echo " (%date% %time% ) Archive success" >> %my_archive_log%
218
- echo -------------------------------------- >> %my_archive_log%
199
+ call :log_section Archive success
200
+
219
201
set path = %my_original_path%
220
202
call %my_WINPYDIRBASE% \scripts\env.bat
221
203
@@ -237,10 +219,19 @@ rem compress
237
219
set stem = WinPython%my_arch% -%WINPYVER2%%my_flavor%%my_release_level%
238
220
%target_python_exe% -c " from wppm import utils;utils.command_installer_7zip(r'%my_WINPYDIRBASE% ', r'%my_WINPYDIRBASE% \..',r'%stem% ', r'%my_create_installer% ')"
239
221
240
- echo -------------------------------------- >> %my_archive_log%
241
- echo " (%date% %time% ) END OF CREATION" >> %my_archive_log%
242
- echo -------------------------------------- >> %my_archive_log%
222
+ call :log_section END OF CREATION
223
+
243
224
start notepad.exe %my_archive_log%
244
225
start notepad.exe %my_archive_log% .packages_versions.txt
245
226
246
- set path = %my_original_path%
227
+ set path = %my_original_path%
228
+ pause
229
+ exit
230
+
231
+ :log_section
232
+ echo . >> %my_archive_log%
233
+ echo -------------------------------------- >> %my_archive_log%
234
+ echo (%date% %time% ) %* >> %my_archive_log%
235
+ echo -------------------------------------- >> %my_archive_log%
236
+ echo . >> %my_archive_log%
237
+ exit /b
0 commit comments