Skip to content

[BUG]: pyinstaller strip=True fails on Windows. #99

@junhaoliao

Description

@junhaoliao

🐛 Bug description [Please make everyone to understand it]

Running .\build.bat, which invokes pyisntaller, fails on Windows.

48585 INFO: Executing: strip C:\Users\junhao\AppData\Local\pyinstaller\bincache10py31264bit\api-ms-win-core-errorhandling-l1-1-0.dll
48587 WARNING: Failed to run strip on 'C:\\Users\\junhao\\AppData\\Local\\pyinstaller\\bincache10py31264bit\\api-ms-win-core-errorhandling-l1-1-0.dll'!
Traceback (most recent call last):
  File "C:\Users\junhao\PycharmProjects\MineContext\.venv\Lib\site-packages\PyInstaller\building\utils.py", line 250, in process_collected_binary
    p = subprocess.run(
        ^^^^^^^^^^^^^^^
  File "C:\Users\junhao\AppData\Roaming\uv\python\cpython-3.12.12-windows-x86_64-none\Lib\subprocess.py", line 548, in run
    with Popen(*popenargs, **kwargs) as process:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\junhao\AppData\Roaming\uv\python\cpython-3.12.12-windows-x86_64-none\Lib\subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Users\junhao\AppData\Roaming\uv\python\cpython-3.12.12-windows-x86_64-none\Lib\subprocess.py", line 1538, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [WinError 2] The system cannot find the file specified

🧑‍💻 Step to reproduce

  1. Sync the repo on a Windows 11 computer with uv installed
  2. uv sync
  3. Activate the virtual environment and run .\build.bat in CMD
  4. Observed the above failures

👾 Expected result

No error or warning should be printed during build.

🚑 Any additional information

In fact, pyinstaller recommend turn the --strip flag off on Windows

https://pyinstaller.org/en/stable/usage.html#cmdoption-s

-s, --strip
Apply a symbol-table strip to the executable and shared libs (not recommended for Windows)

🛠️ MineContext Version

9a4259f

💻 Platform Details

Microsoft Windows [Version 10.0.26200.5751]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions