-
Notifications
You must be signed in to change notification settings - Fork 52
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
--executable option to override sys.executable #257
Comments
riastradh
pushed a commit
to riastradh/pypa-installer
that referenced
this issue
Jan 15, 2025
riastradh
pushed a commit
to riastradh/pypa-installer
that referenced
this issue
Jan 28, 2025
riastradh
pushed a commit
to riastradh/pypa-installer
that referenced
this issue
Jan 28, 2025
Secrus
pushed a commit
that referenced
this issue
Jan 29, 2025
Co-authored-by: Taylor R Campbell <[email protected]>
Secrus
added a commit
that referenced
this issue
Jan 30, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
python -m installer
supports several options for controlling the paths in the output when they don't match the Python system that is running:--destdir
puts everything relative to a system root--prefix
overridessys.prefix
for the installation prefix within that system root where files are installedBut there appears to be no way to control the path that is stored in
#!
lines of entry points thatinstaller
creates. In contrast, for example, historically with setuptools,python setup.py install
would respect[build] executable = '/path/to/python'
in setup.cfg; this functionality doesn't appear to be available through installer. It would be nice ifpython -m installer
additionally supported:--executable
overridessys.executable
for the Python executable path within that system root used in#!
lines generated for entry pointsThis is important for cross-compilation into a fixed file system layout in the destdir that is independent of where Python happened to be installed on a development machine. For example, if I set up a virtualenv in /home/riastradh/venv for a cross-compilation toolchain,
sys.executable
will be /home/riastradh/venv/bin/python, but the scripts installed in the destdir need to start with#!/opt/pkg/bin/python
-- just like files installed in the destdir need to go under /opt/pkg/lib/python3.12/site-packages according to--prefix
, rather than under /home/riastradh/venv/lib/python3.12/site-packages according tosys.prefix
.The text was updated successfully, but these errors were encountered: