Skip to content

Commit 252b056

Browse files
authored
Merge pull request #1658 from stonebig/master
update broken toolchain
2 parents 188e58f + 2654b81 commit 252b056

File tree

1 file changed

+21
-17
lines changed

1 file changed

+21
-17
lines changed

generate_a_winpython_distro.bat

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ rem generate_a_winpython_distro.bat: to be launched from a winpython directory,
22
@echo on
33

44
REM Initialize variables
5-
if "%my_release_level%"=="" set my_release_level=b4
5+
if "%my_release_level%"=="" set my_release_level=
66
if "%my_create_installer%"=="" set my_create_installer=True
77

88
rem Set archive directory and log file
@@ -25,10 +25,10 @@ rem 2021-04-22 : path PyPy3 (as we don't try to copy PyPy3.exe to Python.exe)
2525
if "%target_python_exe%"=="" set target_python_exe=python.exe
2626

2727
rem Set Python target release based on my_python_target
28-
if %my_python_target%==311 set my_python_target_release=3119& set my_release=1
29-
if %my_python_target%==312 set my_python_target_release=31210& set my_release=1
30-
if %my_python_target%==313 set my_python_target_release=3133& set my_release=1
31-
if %my_python_target%==314 set my_python_target_release=3140& set my_release=0
28+
if %my_python_target%==311 set my_python_target_release=3119& set my_release=2
29+
if %my_python_target%==312 set my_python_target_release=31210& set my_release=2
30+
if %my_python_target%==313 set my_python_target_release=3135& set my_release=1
31+
if %my_python_target%==314 set my_python_target_release=3140& set my_release=1
3232

3333
echo -------------------------------------- >>%my_archive_log%
3434
echo (%date% %time%) preparing winPython for %my_pyver% (%my_python_target%)release %my_release%%my_flavor% (%my_release_level%) *** %my_arch% bit ***>>%my_archive_log%
@@ -59,7 +59,7 @@ call %my_buildenv%\scripts\env.bat
5959

6060
REM Create basic build infrastructure
6161
echo "(%date% %time%) Create basic build infrastructure">>%my_archive_log%
62-
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%', toolsdirs=r'%my_toolsdirs%', docsdirs=r'%my_docsdirs%', create_installer='False', python_target_release='%my_python_target_release%')">>%my_archive_log%
62+
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%', toolsdirs=r'%my_toolsdirs%', create_installer='False', python_target_release='%my_python_target_release%')">>%my_archive_log%
6363

6464
REM Check infrastructure is in place
6565
echo "(%date% %time%) Check infrastructure">>%my_archive_log%
@@ -99,7 +99,7 @@ echo -------------------------------------- >>%my_archive_log%
9999
echo "(%date% %time%) Add requirement packages">>%my_archive_log%
100100
echo -------------------------------------- >>%my_archive_log%
101101
python -m pip install -r %my_requirements% -c %my_constraints% --pre --no-index --trusted-host=None --find-links=%my_find_links% >>%my_archive_log%
102-
python -c "from winpython import wppm;dist=wppm.Distribution(r'%WINPYDIR%');dist.patch_standard_packages('spyder', to_movable=True)"
102+
python -c "from wppm import wppm;dist=wppm.Distribution(r'%WINPYDIR%');dist.patch_standard_packages('spyder', to_movable=True)"
103103

104104
REM Add Wheelhouse (to replace per pip lock direct ? would allow paralellism)
105105
echo -------------------------------------- >>%my_archive_log%
@@ -125,13 +125,19 @@ set pip_lock_includedweb=%LOCKDIR%pylock.%my_flavor%-%WINPYARCH%bit-%WINPYVERLOC
125125
set req_lock_includedlocal=%LOCKDIR%requirement.%my_flavor%-%WINPYARCH%bit-%WINPYVERLOCK%_includedwheelslocal.txt
126126
set req_lock_includedweb=%LOCKDIR%requirement.%my_flavor%-%WINPYARCH%bit-%WINPYVERLOCK%_includedwheels.txt
127127

128+
set pip_lock_includedlocal=%LOCKDIR%pylock.%WINPYARCH%-%WINPYVERLOCK%%my_flavor%%my_release_level%_wheelslocal.toml
129+
set pip_lock_includedweb=%LOCKDIR%pylock.%WINPYARCH%-%WINPYVERLOCK%%my_flavor%%my_release_level%_wheels.toml
130+
set req_lock_includedlocal=%LOCKDIR%requir.%WINPYARCH%-%WINPYVERLOCK%%my_flavor%%my_release_level%_wheelslocal.txt
131+
set req_lock_includedweb=%LOCKDIR%requir.%WINPYARCH%-%WINPYVERLOCK%%my_flavor%%my_release_level%_wheels.txt
132+
133+
128134
if not "Z%wheelhousereq%Z"=="ZZ" if exist "%wheelhousereq%" (
129135
echo JOYYYwheelhousereq=%wheelhousereq%
130136
echo z%pip_lock_includedlocal%z=%pip_lock_includedlocal%
131137
rem no winpython in it naturally, with deps
132138
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%
133139
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%')"
140+
python.exe -c "from wppm import wheelhouse as wh;wh.pylock_to_req(r'%pip_lock_includedlocal%', r'%req_lock_includedlocal%')"
135141

136142
rem same with frozen web from local
137143
python.exe -m pip lock --no-deps --require-hashes -c C:\WinP\constraints.txt -r "%req_lock_includedlocal%" -o %pip_lock_includedweb%
@@ -154,20 +160,17 @@ set LOCKDIR=%WINPYDIRBASE%\..\
154160
set WINPYVERLOCK=%WINPYVER2:.=_%
155161
set req=%LOCKDIR%requirement.%my_flavor%-%WINPYARCH%bit-%WINPYVERLOCK%_raw.txt
156162
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
161163

162164
set pip_lock_web=%LOCKDIR%pylock.%WINPYARCH%-%WINPYVERLOCK%%my_flavor%%my_release_level%.toml
163165
set pip_lock_local=%LOCKDIR%pylock.%WINPYARCH%-%WINPYVERLOCK%%my_flavor%%my_release_level%_local.toml
164-
set req_lock_web=%LOCKDIR%requirement.%WINPYARCH%-%WINPYVERLOCK%%my_flavor%%my_release_level%.txt
165-
set req_lock_local=%LOCKDIR%requirement.%WINPYARCH%-%WINPYVERLOCK%%my_flavor%%my_release_level%_local.txt
166+
set req_lock_web=%LOCKDIR%requir.%WINPYARCH%-%WINPYVERLOCK%%my_flavor%%my_release_level%.txt
167+
set req_lock_local=%LOCKDIR%requir.%WINPYARCH%-%WINPYVERLOCK%%my_flavor%%my_release_level%_local.txt
166168

167169

168170
set my_archive_lockfile=%my_archive_dir%\pylock.%my_flavor%-%WINPYARCH%bit-%WINPYVERLOCK%_%date:/=-%at_%my_time%.toml
169171
set my_archive_lockfile_local=%my_archive_dir%\pylock.%my_flavor%-%WINPYARCH%bit-%WINPYVERLOCK%_%date:/=-%at_%my_time%.local.toml
170-
set my_changelog_lockfile=%~dp0changelogs\pylock.%my_flavor%-%WINPYARCH%bit-%WINPYVERLOCK%.toml
172+
set my_changelog_lockfile=%~dp0changelogs\pylock.%WINPYARCH%-%WINPYVERLOCK%%my_flavor%%my_release_level%.toml
173+
set my_changelog_reqfile=%~dp0changelogs\requir.%WINPYARCH%-%WINPYVERLOCK%%my_flavor%%my_release_level%.txt
171174

172175
python.exe -m pip freeze>%req%
173176
findstr /v "winpython" %req% > %wanted_req%
@@ -180,14 +183,15 @@ rem pip lock from local WheelHouse, from the frozen req
180183
python.exe -m pip lock --no-deps --no-index --trusted-host=None --find-links=C:\WinP\packages.srcreq -c C:\WinP\constraints.txt -r "%wanted_req%" -o %pip_lock_local%
181184

182185
rem generating also classic requirement with hash-256, from obtained pylock.toml
183-
python.exe -c "from winpython import wheelhouse as wh;wh.pylock_to_req(r'%pip_lock_web%', r'%req_lock_web%')"
184-
python.exe -c "from winpython import wheelhouse as wh;wh.pylock_to_req(r'%pip_lock_local%', r'%req_lock_local%')"
186+
python.exe -c "from wppm import wheelhouse as wh;wh.pylock_to_req(r'%pip_lock_web%', r'%req_lock_web%')"
187+
python.exe -c "from wppm import wheelhouse as wh;wh.pylock_to_req(r'%pip_lock_local%', r'%req_lock_local%')"
185188

186189
rem compare the two (result from pypi and local Wheelhouse must be equal)
187190
fc "%req_lock_web%" "%req_lock_local%"
188191

189192
copy/Y %pip_lock_web% %my_archive_lockfile%
190193
copy/Y %pip_lock_web% %my_changelog_lockfile%
194+
copy/Y %req_lock_web% %my_changelog_reqfile%
191195

192196

193197
REM Archive success

0 commit comments

Comments
 (0)