Your message dated Sat, 30 Jan 2016 17:04:46 -0500
with message-id <[email protected]>
and subject line 
has caused the Debian Bug report #751817,
regarding python-pip: change shebang to use /usr/bin/env?
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
751817: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=751817
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: python-pip
Version: 1.5.6-2
Severity: normal

Dear Maintainers,

Would it be otherwise ok to use "/usr/bin/env python3" in the shebang of
/usr/bin/pip3 ?
This way pip would also work directly from within an "activated" virtual
environment created with --system-site-packages (i.e.: one that doesn't
install it's own pip).
Currently I have to call

$ /path/to/venv/bin/python /usr/bin/pip3 (...)

in order for it to actually notice it's being called from inside a virtual
environment.

Python-policy says it is "strongly preferred" to use the direct path to
python in the shebang, but there's no rationale provided for this preference.
Is this maybe one of the cases where it would be acceptable?


Cheers

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (150, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.14-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=pt_BR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

--- End Message ---
--- Begin Message ---
Generally no, it's not a good idea to shebang /usr/bin/env.  The virtualenvs
should shebang their <venv>/bin/pip with <venv>/bin/python so it should invoke
the correct virtualized Python whether the venv is activated or not.  If that
doesn't work, it's a bug, but a different one!

One rational for the policy is so that system scripts know exactly which
Python they are intended to run with.  As a developer, it's okay to run
scripts with several different versions of Python for testing purposes (but
note that tools like tox are better suited to this), but as a user, you don't
want some random `python` program on $PATH to change how system scripts work.
I have personally seen system breakage occur because of such things!

Attachment: pgp4ZzFWX2rME.pgp
Description: OpenPGP digital signature


--- End Message ---
_______________________________________________
Python-modules-team mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team

Reply via email to