8000 Merge pull request #1338 from stonebig/master · winpython/winpython@e69033b · GitHub
[go: up one dir, main page]

Skip to content

Commit e69033b

Browse files
authored
Merge pull request #1338 from stonebig/master
compatibility clean-up
2 parents af5231c + 51e2f7f commit e69033b

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

generate_a_winpython_distro.bat

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ rem 2020-12-05 : add a constrints.txt file from a recent pip list
77
rem 2021-03-20 : track successes packages combination are archived for future contraint update
88
rem 2021-04-22 : path PyPy3 (as we don't try to copy PyPy3.exe to Python.exe)
99
rem 2023-08-21a: add a pre_step with my_requirements_pre.txt + my_find_links_pre
10+
rem 2024-05-12a: use python -m pip instead of pip , and remove --upgrade %new_resolver%
1011
rem *****************************
1112

1213
rem algorithm:
@@ -46,11 +47,12 @@ echo ------------------
4647
echo 0.0 Initialize variables
4748
echo ------------------
4849

49-
if "%my_release_level%"=="" set my_release_level=b4
50+
if "%my_release_level%"=="" set my_release_level=b2
5051

5152
set my_basedir=%my_root_dir_for_builds%\bd%my_python_target%
5253

53-
set my_buildenv=C:\WinPdev\WPy64-3890
54+
rem since 2024-05-01, a building env need is reduced to a WinPythondot 3.8+ augmented with packages: flit + packaging
55+
set my_buildenv=C:\WinPdev\WPy64-310111
5456

5557
if "%my_constraints%"=="" set my_constraints=C:\WinP\constraints.txt
5658

@@ -79,7 +81,7 @@ if %my_python_target%==311 (
7981

8082
if %my_python_target%==312 (
8183
set my_python_target_release=3123
82-
set my_release=0
84+
set my_release=1
8385
)
8486

8587
if %my_python_target%==313 (
@@ -270,9 +272,9 @@ rem echo python.exe -c "import sys;from pathlib import Path;f=open(Path(sys.pre
270272
rem F/2024-04-10
271273

272274
rem D/2020-07-05: install msvc_runtime before packages that may want to compile
273-
echo pip install msvc_runtime --pre --no-index --trusted-host=None --find-links=%my_find_links% --upgrade
274-
echo pip install msvc_runtime --pre --no-index --trusted-host=None --find-links=%my_find_links% --upgrade>>%my_archive_log%
275-
pip install msvc_runtime --pre --no-index --trusted-host=None --find-links=%my_find_links% --upgrade
275+
echo python -m pip install msvc_runtime --pre --no-index --trusted-host=None --find-links=%my_find_links% --upgrade
276+
echo python -m pip install msvc_runtime --pre --no-index --trusted-host=None --find-links=%my_find_links% --upgrade>>%my_archive_log%
277+
python -m pip install msvc_runtime --pre --no-index --trusted-host=None --find-links=%my_find_links% --upgrade
276278
rem F/2020-07-05: install msvc_runtime before packages that may want to compile
277279

278280

@@ -292,11 +294,11 @@ if not "Z%my_requirements_pre%Z"=="ZZ" (
292294
rem 2023-08-21a: add a pre_step with my_requirements_pre.txt + my_find_links_pre
293295
if "%my_find_links_pre%"=="" set my_find_links_pre=%my_find_links%
294296

295-
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%
296-
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%
297+
echo python -m pip install -r %my_requirements_pre% -c %my_constraints% --pre --no-index --trusted-host=None --find-links=%my_find_links_pre%
298+
echo python -m pip install -r %my_requirements_pre% -c %my_constraints% --pre --no-index --trusted-host=None --find-links=%my_find_links_pre% >>%my_archive_log%
297299
echo if pip doesn't work, check the path of %my_WINPYDIRBASE%
298300

299-
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%
301+
python -m pip install -r %my_requirements_pre% -c %my_constraints% --pre --no-index --trusted-host=None --find-links=%my_find_links_pre% >>%my_archive_log%
300302
) else (
301303
echo no packages pre_requirements
302304
echo no packages pre_requirements>>%my_archive_log%
@@ -312,13 +314,13 @@ echo 2.5 add requirement packages_versions>>%my_archive_log%
312314
echo %date% %time% >>%my_archive_log%
313315
echo ----------------------------->>%my_archive_log%
314316

315-
echo pip install -r %my_requirements% -c %my_constraints% --pre --no-index --trusted-host=None --find-links=%my_find_links% --upgrade %new_resolver%
316-
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%
317+
echo python -m pip install -r %my_requirements% -c %my_constraints% --pre --no-index --trusted-host=None --find-links=%my_find_links%
318+
echo python -m pip install -r %my_requirements% -c %my_constraints% --pre --no-index --trusted-host=None --find-links=%my_find_links% >>%my_archive_log%
317319
echo if pip doesn't work, check the path of %my_WINPYDIRBASE%
318320

319321

320322
rem 2020-12-05 : add a constraints.txt file from a recent pip list
321-
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%
323+
python -m pip install -r %my_requirements% -c %my_constraints% --pre --no-index --trusted-host=None --find-links=%my_find_links% >>%my_archive_log%
322324

323325
echo mid of step 2/3
324326

winpython/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@
2828
OTHER DEALINGS IN THE SOFTWARE.
2929
"""
3030

31-
__version__ = '8.0.20240501'
31+
__version__ = '8.0.20240512'
3232
__license__ = __doc__
3333
__project_url__ = 'http://winpython.github.io/'

winpython/piptree.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def get_packages_ini_metadata(name):
6666
return get_package_metadata("packages.ini", name, False, update=False, suggested_summary=None)
6767

6868
class pipdata:
69-
"""Wrapper around Distribution.discover() or pip inspect"""
69+
"""Wrapper around Distribution.discover() or Distribution.distributions()"""
7070

7171
def __init__(self, Target=None):
7272

@@ -99,11 +99,9 @@ def __init__(self, Target=None):
9999
"sys_platform": sys.platform,
100100
}
101101

102-
# get pip_inpsect raw data in json form
103102
if Target == None:
104103
Target = sys.executable
105104

106-
# faster then pip_inspect = utils.exec_shell_cmd(f'set pythonutf8=1 & python -X utf8=1 -m pip inspect', sys.prefix)
107105
if sys.executable==Target:
108106
# self-Distro inspection case (use all packages reachable per sys.path I presume )
109107
pip_json_installed=Distribution.discover()

winpython/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,7 @@ def direct_pip_install(
847847
verbose=False,
848848
install_options=None,
849849
):
850-
"""Direct install via pip !"""
850+
"""Direct install via python -m pip !"""
851851
copy_to = str(Path(fname).parent)
852852

853853
if python_exe is None:
@@ -858,7 +858,7 @@ def direct_pip_install(
858858
cmd = [python_exe, '-m', 'pip', 'install']
859859
if install_options:
860860
cmd += install_options # typically ['--no-deps']
861-
print('pip install_options', install_options)
861+
print('python -m pip install_options', install_options)
862862
cmd += [fname]
863863

864864
if verbose:

0 commit comments

Comments
 (0)
0