-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
bugSomething isn't workingSomething isn't workingcompatibilityCompatibility with a specification or another toolCompatibility with a specification or another toolhelp wantedContribution especially encouragedContribution especially encouraged
Description
Summary
e.g. a script in the wheel looks like:
#!python -E
import sys
from cmake import cpack
if __name__ == '__main__':
if sys.argv[0].endswith('-script.pyw'):
sys.argv[0] = sys.argv[0][: -11]
elif sys.argv[0].endswith('.exe'):
sys.argv[0] = sys.argv[0][: -4]
sys.exit(cpack())
The script gets installed as:
#!/bin/sh
'''exec' '/private/var/folders/hb/2n_7f3yn20v06lzz3129dtw80000gn/T/cibw-run-sz3abzyq/cp39-macosx_universal2/venv-test-x86_64/bin/python3' "$0" "$@"
' ''' -E
import sys
from cmake import cpack
if __name__ == '__main__':
if sys.argv[0].endswith('-script.pyw'):
sys.argv[0] = sys.argv[0][: -11]
elif sys.argv[0].endswith('.exe'):
sys.argv[0] = sys.argv[0][: -4]
sys.exit(cpack())
The -E argument is not being written where it should be.
pip installing the same wheel creates a working script.
The spec is unclear but the assumption in pip (or maybe distutils) is that arguments present behind the interpreter shall be left untouched (i.e. not removed).
Platform
macOS 15
Version
uv 0.7.19
Python version
Python 3.12.10
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcompatibilityCompatibility with a specification or another toolCompatibility with a specification or another toolhelp wantedContribution especially encouragedContribution especially encouraged