Skip to content

The Script in env_for_icons.bat No Longer Calls for env.bat #1927

Open

Description

@RoyiAvital

In previous versions all scripts would run env.bat.
Now env_for_icons.bat does not call it, hence all configuration in env.bat is not applied.

Activity

  1. RoyiAvital commented on Dec 29, 2025

    @RoyiAvital
    Author

    This basically broke all portability of the WinPython system.

  2. RoyiAvital commented on Dec 29, 2025

    @RoyiAvital
    Author

    I think the whole architecture of the project should be streamlined into a single winpythonenv.bat file and launchers.
    What prevents that?

    Better yet, do it using PowerShell.

  3. stonebig commented on Dec 30, 2025

    @stonebig
    Contributor

    This basically broke all portability of the WinPython system.

    Why do you say it "basically" broke something ? Example ?

    The change you see was done a release ago, as trying to reduce DOS lines to zero.

    Reasoning was that:

    • Powershell is not allowed by default on users, and there are two versions of it
    • python is a scripting langage, so why not using python rather than powershell.

    Rechecking, the only change I see is a missing "set PYTHONIOENCODING=utf-8", that is maybe a mistake.

  4. RoyiAvital commented on Dec 30, 2025

    @RoyiAvital
    Author

    If you want to reduce the surface of batch files, why 2 files which sets different environments?
    The portability is broken as env.bat defines set HOME=%WINPYDIRBASE%\settings.
    Which means, the programs which use the user home, writes settings there.
    So if the folder moves, settings move with it.

    Since env_for_icons.bat does not define it, the computer default %HOME% is used.
    I suggest to have a single file to set the environment.

    By the way, not all applications respect %HOME%.
    I for one adds (I create the folders as well):

    set ALLUSERSPROFILE=%WINPYDIRBASE%\settings\ProgramData
    set APPDATA=%WINPYDIRBASE%\settings\AppData
    set HOMEPATH=%WINPYDIRBASE%\settings
    set LOCALAPPDATA=%WINPYDIRBASE%\settings\AppData\Local
    set ProgramData=%WINPYDIRBASE%\settings\ProgramData
    set Public=%WINPYDIRBASE%\settings\Public

    This gives me full portability.

  5. added this to the 2026-01 pandas-3 milestone on Dec 30, 2025
  6. stonebig commented on Jan 1, 2026

    @stonebig
    Contributor

    ok, so:

    • the segment [env.bat] of winpython.ini is now played by winpythonini.py:
      • it's supposed to replace the env.bat call
      • it includes PYTHONIOENCODING=utf-8
    • now the powershell launcher
      • calls also winpythonini.py to get a resulting set of "set variable1=value1&&set variable2=value2..."
      • and makes them a global set of variables, so it's still available on the command line

    Winpythonini.py gets its dataset from the:

    • env.ini file in the same directory as itself
    • and from python.exe..\settings\winpython.ini (created per winpythonini.py itself if not found)
  7. RoyiAvital commented on Jan 1, 2026

    @RoyiAvital
    Author

    Have you also dropped env_for_icons.bat?
    I don't see the point in having 2 files to set a single configuration.

  8. stonebig commented on Jan 1, 2026

    @stonebig
    Contributor

    env.bat may go away at some point

  9. RoyiAvital commented on Jan 2, 2026

    @RoyiAvital
    Author

    I think currently env_for_icons.bat should be gone. There is not point in both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions