8000 make pseudo-wheel part of winpython a true wheel 'wppm' by stonebig · Pull Request #1654 · winpython/winpython · GitHub
[go: up one dir, main page]

Skip to content

make pseudo-wheel part of winpython a true wheel 'wppm' #1654

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
make pseudo-wheel part of winpython a true wheel 'wppm'
looks the needed direction towards pure pylock.toml
  • Loading branch information
stonebig committed Jun 28, 2025
commit 9f94cda3aa00e86f2643a073215a1e8e30d33e31
10 changes: 5 additions & 5 deletions make.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import subprocess
import sys
from pathlib import Path
from winpython import wppm, utils, diff
from wppm import wppm, utils, diff

# Define constant paths for clarity
CHANGELOGS_DIRECTORY = Path(__file__).parent / "changelogs"
Expand Down Expand Up @@ -222,7 +222,7 @@ def build(self, rebuild: bool = True, requirements_files_list=None, winpy_dirnam
utils.python_execmodule("ensurepip", self.distribution.target)
self.distribution.patch_standard_packages("pip")

essential_packages = ["pip", "setuptools", "wheel", "winpython"]
essential_packages = ["pip", "setuptools", "wheel", "wppm"]
for package_name in essential_packages:
actions = ["install", "--upgrade", "--pre", package_name] + self.install_options
self._print_action(f"Piping: {' '.join(actions)}")
Expand All @@ -247,8 +247,8 @@ def build(self, rebuild: bool = True, requirements_files_list=None, winpy_dirnam
diff.write_changelog(self.winpyver2, None, CHANGELOGS_DIRECTORY, self.flavor, self.distribution.architecture, basedir=self.winpython_directory.parent)

def rebuild_winpython_package(source_directory: Path, target_directory: Path, architecture: int = 64, verbose: bool = False):
"""Rebuilds the winpython package from source using flit."""
for file in target_directory.glob("winpython-*"):
"""Rebuilds the winpython or wppm package from source using flit."""
for file in target_directory.glob("w*p*-*.*"):
if file.suffix in (".exe", ".whl", ".gz"):
file.unlink()
utils.buildflit_wininst(source_directory, copy_to=target_directory, verbose=True)
Expand Down Expand Up @@ -295,7 +295,7 @@ def make_all(build_number: int, release_level: str, pyver: str, architecture: in
os.makedirs(build_directory, exist_ok=True)
# use source_dirs as the directory to re-build Winpython wheel
winpython_source_dir = Path(__file__).resolve().parent
rebuild_winpython_package(winpython_source_dir, Path(source_dirs), architecture, verbose)
# 2025-06-28 no more: rebuild_winpython_package(winpython_source_dir, Path(source_dirs), architecture, verbose)

builder = WinPythonDistributionBuilder(
build_number, release_level, build_directory, wheels_directory=source_dirs,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
call "%~dp0env_for_icons.bat"
"%PYTHON%" -c "from winpython.utils import patch_sourcefile;patch_sourcefile(r'%~dp0..\settings\winpython.ini', '[active_environment', '[inactive_environment' )"
"%PYTHON%" -c "from winpython.utils import patch_sourcefile;patch_sourcefile(r'%~dp0..\settings\winpython.ini', '[inactive_environment_common]', '[active_environment_common]' )"
"%PYTHON%" -c "from wppm.utils import patch_sourcefile;patch_sourcefile(r'%~dp0..\settings\winpython.ini', '[active_environment', '[inactive_environment' )"
"%PYTHON%" -c "from wppm.utils import patch_sourcefile;patch_sourcefile(r'%~dp0..\settings\winpython.ini', '[inactive_environment_common]', '[active_environment_common]' )"
4 changes: 2 additions & 2 deletions portable/scripts/make_working_directory_be_not_winpython.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
call "%~dp0env_for_icons.bat"
"%PYTHON%" -c "from winpython.utils import patch_sourcefile;patch_sourcefile(r'%~dp0..\settings\winpython.ini', '[active_environment', '[inactive_environment' )"
"%PYTHON%" -c "from winpython.utils import patch_sourcefile;patch_sourcefile(r'%~dp0..\settings\winpython.ini', '[inactive_environment_per_user]', '[active_environment_per_user]' )"
"%PYTHON%" -c "from wppm.utils import patch_sourcefile;patch_sourcefile(r'%~dp0..\settings\winpython.ini', '[active_environment', '[inactive_environment' )"
"%PYTHON%" -c "from wppm.utils import patch_sourcefile;patch_sourcefile(r'%~dp0..\settings\winpython.ini', '[inactive_environment_per_user]', '[active_environment_per_user]' )"
2 changes: 1 addition & 1 deletion portable/scripts/make_working_directory_be_winpython.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
call "%~dp0env_for_icons.bat"
"%PYTHON%" -c "from winpython.utils import patch_sourcefile;patch_sourcefile(r'%~dp0..\settings\winpython.ini', '[active_environment', '[inactive_environment' )"
"%PYTHON%" -c "from wppm.utils import patch_sourcefile;patch_sourcefile(r'%~dp0..\settings\winpython.ini', '[active_environment', '[inactive_environment' )"
2 changes: 1 addition & 1 deletion portable/scripts/upgrade_pip.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ call "%~dp0env.bat"
echo this will upgrade pip with latest version, then patch it for WinPython portability ok ?
pause
"%WINPYDIR%\python.exe" -m pip install --upgrade pip
"%WINPYDIR%\python.exe" -c "from winpython import wppm;dist=wppm.Distribution(r'%WINPYDIR%');dist.patch_standard_packages('pip', to_movable=True)
"%WINPYDIR%\python.exe" -c "from wppm import wppm;dist=wppm.Distribution(r'%WINPYDIR%');dist.patch_standard_packages('pip', to_movable=True)
pause
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ requires = ["flit_core"]
build-backend = "flit_core.buildapi"

[project]
name = "winpython"
name = "wppm"
authors = [
{name = "Pierre Raybaut"},
{name = "stonebig"},
]
dependencies = []
requires-python = ">=3.8"
requires-python = ">=3.10"
readme = "README.rst"
license = {file = "LICENSE"}
classifiers=[
Expand All @@ -25,12 +25,12 @@ classifiers=[
'Topic :: Software Development :: Widget Sets',
]
dynamic = ["version",]
description="WinPython distribution tools, including WPPM"
description="WinPython Package Management"
keywords = ["Portable","Windows"]

[project.urls]
Documentation = "https://winpython.github.io/"
Source = "https://github.com/winpython/winpython"

[project.scripts]
wppm = "winpython.wppm:main"
wppm = "wppm.wppm:main"
66 changes: 33 additions & 33 deletions winpython/__init__.py → wppm/__init__.py
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
# -*- coding: utf-8 -*-
"""
WinPython License Agreement (MIT License)
-----------------------------------------
Copyright (c) 2012-2013 Pierre Raybaut
Copyright (c) 2014-2025+ The Winpython development team https://github.com/winpython/
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
"""
__version__ = '16.6.20250620'
__license__ = __doc__
__project_url__ = 'http://winpython.github.io/'
# -*- coding: utf-8 -*-
"""
WinPython License Agreement (MIT License)
-----------------------------------------

Copyright (c) 2012-2013 Pierre Raybaut
Copyright (c) 2014-2025+ The Winpython development team https://github.com/winpython/

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
"""

__version__ = '17.0.20250628'
__license__ = __doc__
__project_url__ = 'http://winpython.github.io/'
Loading
0