@@ -2,7 +2,7 @@ rem generate_a_winpython_distro.bat: to be launched from a winpython directory,
22@ echo on
33
44REM Initialize variables
5- if " %my_release_level% " == " " set my_release_level = b2
5+ if " %my_release_level% " == " " set my_release_level = b3
66if " %my_create_installer% " == " " set my_create_installer = True
77
88rem Set archive directory and log file
@@ -101,21 +101,47 @@ echo -------------------------------------- >>%my_archive_log%
101101python -m pip install -r %my_requirements% -c %my_constraints% --pre --no-index --trusted-host=None --find-links=%my_find_links% >> %my_archive_log%
102102python -c " from winpython import wppm;dist=wppm.Distribution(r'%WINPYDIR% ');dist.patch_standard_packages('spyder', to_movable=True)"
103103
104- REM Archive success
104+ REM Add Wheelhouse (to replace per pip lock direct ? would allow paralellism)
105105echo -------------------------------------- >> %my_archive_log%
106- echo " (%date% %time% ) Archive success " >> %my_archive_log%
106+ echo " (%date% %time% ) Add lockfile wheels " >> %my_archive_log%
107107echo -------------------------------------- >> %my_archive_log%
108- %target_python_exe% -m pip freeze > %my_archive_log% .packages_versions.txt
109-
110- REM Generate changelog and binaries
111- echo " (%date% %time% ) Generate changelog and binaries" >> %my_archive_log%
112108set path = %my_original_path%
113- cd /D %~dp0
114- call %my_buildenv% \scripts\env.bat
115- 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% ', rebuild=False, python_target_release='%my_python_target_release% ')" >> %my_archive_log%
109+ @ echo on
110+ call %my_WINPYDIRBASE% \scripts\env.bat
111+ @ echo on
112+ set WINPYVERLOCK = %WINPYVER2:. =_ %
113+ set pylockinclude = %my_root_dir_for_builds% \bd%my_python_target% \bu%addlockfile% \pylock.%addlockfile% -%WINPYARCH% bit-%WINPYVERLOCK% .toml
114+ echo pylockinclude=" %pylockinclude% "
115+ if not " Z%addlockfile% Z" == " ZZ" if exist " %pylockinclude% " (
116+ echo %my_WINPYDIRBASE% \python\scripts\wppm.exe " %pylockinclude% " -ws " %my_find_links% " -wd " %my_WINPYDIRBASE% \wheelhouse\included.wheels" >> %my_archive_log%
117+ %my_WINPYDIRBASE% \python\scripts\wppm.exe " %pylockinclude% " -ws " %my_find_links% " -wd " %my_WINPYDIRBASE% \wheelhouse\included.wheels"
118+ )
116119
117- echo -------------------------------------- >> %my_archive_log%
118- echo " (%date% %time% ) generate pylock.tomle files and requirement_with_hash.txt files" >> %my_archive_log%
120+ @ echo on
121+ echo wheelhousereq=%wheelhousereq%
122+ set LOCKDIR = %WINPYDIRBASE% \..\
123+ set pip_lock_includedlocal = %LOCKDIR% pylock.%my_flavor% -%WINPYARCH% bit-%WINPYVERLOCK% _includedwheelslocal.toml
124+ set pip_lock_includedweb = %LOCKDIR% pylock.%my_flavor% -%WINPYARCH% bit-%WINPYVERLOCK% _includedwheels.toml
125+ set req_lock_includedlocal = %LOCKDIR% requirement.%my_flavor% -%WINPYARCH% bit-%WINPYVERLOCK% _includedwheelslocal.txt
126+ set req_lock_includedweb = %LOCKDIR% requirement.%my_flavor% -%WINPYARCH% bit-%WINPYVERLOCK% _includedwheels.txt
127+
128+ if not " Z%wheelhousereq% Z" == " ZZ" if exist " %wheelhousereq% " (
129+ echo JOYYYwheelhousereq=%wheelhousereq%
130+ echo z%pip_lock_includedlocal% z=%pip_lock_includedlocal%
131+ rem no winpython in it naturally, with deps
132+ python.exe -m pip lock --no-index --trusted-host=None --find-links=%my_find_links% -c C:\WinP\constraints.txt -r " %wheelhousereq% " -o %pip_lock_includedlocal%
133+ rem generating also classic requirement with hash-256, from obtained pylock.toml
134+ python.exe -c " from winpython import wheelhouse as wh;wh.pylock_to_req(r'%pip_lock_includedlocal% ', r'%req_lock_includedlocal% ')"
135+
136+ rem same with frozen web from local
137+ python.exe -m pip lock --no-deps --require-hashes -c C:\WinP\constraints.txt -r " %req_lock_includedlocal% " -o %pip_lock_includedweb%
138+
139+ echo %my_WINPYDIRBASE% \python\scripts\wppm.exe " %pip_lock_includedweb% " -ws " %my_find_links% " -wd " %my_WINPYDIRBASE% \wheelhouse\included.wheels" >> %my_archive_log%
140+ %my_WINPYDIRBASE% \python\scripts\wppm.exe " %pip_lock_includedweb% " -ws " %my_find_links% " -wd " %my_WINPYDIRBASE% \wheelhouse\included.wheels"
141+ )
142+
143+ echo -------------------------------------- >> %my_archive_log% ;
144+ echo " (%date% %time% ) generate pylock.toml files and requirement.txt with hash files" >> %my_archive_log%
119145echo -------------------------------------- >> %my_archive_log%
120146
121147set path = %my_original_path%
@@ -125,17 +151,17 @@ rem generate pip freeze requirements
125151echo %date% %time%
126152set LOCKDIR = %WINPYDIRBASE% \..\
127153
128- set WINPYVERLOCK = %WINPYVER :. =_ %
129- set req = %LOCKDIR% requirement.%WINPYVERLOCK% _raw.txt
130- set wanted_req = %LOCKDIR% requirement.%WINPYVERLOCK% .txt
131- set pip_lock_web = %LOCKDIR% pylock.%WINPYVERLOCK% .toml
132- set pip_lock_local = %LOCKDIR% pylock.%WINPYVER % _local.toml
133- set req_lock_web = %LOCKDIR% requirement_with_hash. %WINPYVERLOCK% .txt
134- set req_lock_local = %LOCKDIR% requirement_with_hash. %WINPYVERLOCK% _local.txt
154+ set WINPYVERLOCK = %WINPYVER2 :. =_ %
155+ set req = %LOCKDIR% requirement.%my_flavor% - %WINPYARCH% bit- % WINPYVERLOCK% _raw.txt
156+ set wanted_req = %LOCKDIR% requirement.%my_flavor% - %WINPYARCH% bit- % WINPYVERLOCK% .txt
157+ set pip_lock_web = %LOCKDIR% pylock.%my_flavor% - %WINPYARCH% bit- % WINPYVERLOCK% .toml
158+ set pip_lock_local = %LOCKDIR% pylock.%my_flavor% - %WINPYARCH% bit- %WINPYVERLOCK % _local.toml
159+ set req_lock_web = %LOCKDIR% requirement. %my_flavor% - %WINPYARCH% bit- %WINPYVERLOCK% .txt
160+ set req_lock_local = %LOCKDIR% requirement. %my_flavor% - %WINPYARCH% bit- %WINPYVERLOCK% _local.txt
135161
136- set my_archive_lockfile = %my_archive_dir% \pylock.%WINPYVERLOCK% _%date:/ =- % at_%my_time% .toml
137- set my_archive_lockfile_local = %my_archive_dir% \pylock.%WINPYVERLOCK% _%date:/ =- % at_%my_time% .local.toml
138- set my_changelog_lockfile = %~dp0 changelogs\pylock.%WINPYVERLOCK% .toml
162+ set my_archive_lockfile = %my_archive_dir% \pylock.%my_flavor% - %WINPYARCH% bit- % WINPYVERLOCK% _%date:/ =- % at_%my_time% .toml
163+ set my_archive_lockfile_local = %my_archive_dir% \pylock.%my_flavor% - %WINPYARCH% bit- % WINPYVERLOCK% _%date:/ =- % at_%my_time% .local.toml
164+ set my_changelog_lockfile = %~dp0 changelogs\pylock.%my_flavor% - %WINPYARCH% bit- % WINPYVERLOCK% .toml
139165
140166python.exe -m pip freeze> %req%
141167findstr /v " winpython" %req% > %wanted_req%
@@ -157,6 +183,25 @@ fc "%req_lock_web%" "%req_lock_local%"
157183copy/Y %pip_lock_web% %my_archive_lockfile%
158184copy/Y %pip_lock_web% %my_changelog_lockfile%
159185
186+
187+ REM Archive success
188+ echo -------------------------------------- >> %my_archive_log%
189+ echo " (%date% %time% ) Archive success" >> %my_archive_log%
190+ echo -------------------------------------- >> %my_archive_log%
191+ set path = %my_original_path%
192+ call %my_WINPYDIRBASE% \scripts\env.bat
193+
194+ %target_python_exe% -m pip freeze > %my_archive_log% .packages_versions.txt
195+
196+ REM Generate changelog and binaries
197+ echo " (%date% %time% ) Generate changelog and binaries" >> %my_archive_log%
198+ set path = %my_original_path%
199+ cd /D %~dp0
200+ call %my_buildenv% \scripts\env.bat
201+
202+ 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% ', rebuild=False, python_target_release='%my_python_target_release% ')" >> %my_archive_log%
203+
204+
160205echo -------------------------------------- >> %my_archive_log%
161206echo " (%date% %time% ) END OF CREATION" >> %my_archive_log%
162207echo -------------------------------------- >> %my_archive_log%
0 commit comments