Re: An archlinux-python package for managing system default python version?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Fri, Jan 23, 2015 at 12:42 PM, Chi Hsuan Yen <yan12125@xxxxxxxxx> wrote:
>
> I mean, all python scripts should explicitly specify which python version
> to use rather than "python" only. However, the system default symlink is
> still necessary for invoking scripts. A system should provide a simple and
> stupid way for python users without enforcing the knownledge of different
> python versions. As python evolves, end users can still invoke python
> scripts without change their command lines. After all, such settings can
> provide a continuous and reliable environment. I need this workaround due
> to the convenience for building CyanogenMod. The correct way may be submit
> a bug report to Google, but, however, it's too long to get them all be
> fixed.


Well, in the meantime you can do what the PKGBUILDs do, and use

sed -i 's:\(env[ ]\+python$\|/usr/bin/python$\):\12:g'

to fix the shebangs automatically for each file needed.
You can simply apply that to all *.py files, or if some of them
specifically need python3 you can make a list of them and exclude
them/add python3 to them.

Obviously, the long-term goal should be to get that done as an upstream bugfix.

-- Eli Schwartz


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux