Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Include wheels in distribution #1481

Closed
Closed
@chrisrodrigue

Description

@chrisrodrigue

I want to propose that WinPython include the original wheels in the distribution instead of a pre-installed/configured Python environment. This has two benefits.

The first benefit is that it allows the users to verify the integrity of the .whl files for tampering, by confirming that the SHA256 of the wheel files match the ones in PyPI. This is excellent from a security standpoint.

The second benefit is that it would allow users the flexibility to create virtual environments and install only the packages that they need into them using pip install or uv pip install. This is preferred over putting C:WinPython\python\Scripts and C:\WinPython\python on the system PATH, because it allows for dependency isolation in projects and avoids the need for a mutable system environment.

The only downside is that WinPython users would have a bit of initial setup to do. They would need to create the venv and pip install the packages they need. I would argue that this is a universal practice in Python that every user should know how to do... but WinPython could still provide a helper script (i.e. setup.bat) to take care of it.

From WinPython root, create requirements.txt containing all WinPython packages:

python\python.exe -m pip freeze > requirements.txt
mkdir wheels
python\python.exe -m pip download -r requirements.txt -d wheels

Note that in my testing with WinPython 3.13.1.1slimb2 I had to manually remove the following packages from requirements.txt because pip download could not find these pinned versions on PyPI:

  • adodbapi==2.6.1.3
  • baresql==0.8.0
  • db.py==0.5.4b1
  • formlayout==1.2.1a1
  • pdfrw==0.4.post2
  • ppci==0.5.9
  • PySimpleGUI==4.60.4
  • sqlite_bro==0.13.1
  • winpython==11.4.20250119

Assuming the new WinPython distribution has a wheels directory instead of pre-installed packages, use setup.bat script after unzipping:

From WinPython root:

cd python
python -m venv .venv --prompt WinPython
.venv\Scripts\activate
pip install --no-index --find-links=wheels/ -r requirements.txt

After running setup.bat, users can either put C:\WinPython\.venv\Scripts on the PATH or activate it using C:\WinPython\.venv\Scripts\activate when they need to work 😄

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions