Python 2 to 3 conversion - embrace the pain

Steven D'Aprano steve+comp.lang.python at pearwood.info
Mon Mar 16 16:36:44 EDT 2015


On Tue, 17 Mar 2015 04:20 am, Michael Torrie wrote:

> On 03/16/2015 03:13 AM, INADA Naoki wrote:
>> I think application developers should use *only* Python 3 from this year.
>> If we start moving, more library developers will be able to start
>> writing Python 3 only code from next year.
> 
> An admirable sentiment, but I'm currently running the latest RHEL
> release (v7) and Python3 is not part of the standard install.  I can get
> it via Software Collections, but that installs to /opt and, by default,
> does not integrate into the system environment (there are good reasons
> for this of course). So Python3 apps will never be integrated fully on 
> his major distribution.  And it is a major server platform.

I'm sorry, that makes no sense to me. What does it matter whether Python3 is
installed to /opt or /usr or /bin or /who/the/feck/cares, so long as your
application runs when you run it? It's just another dependency, and no more
than one call to yum away.

I must admit that the Linux filesystem layout strikes me as awfully pedantic
and fussy. We're happy to use our home directory as an undifferentiated bag
with no structure, dumping binaries, scripts, documents, data files, config
files and everything else into $HOME, but for applications we have:

/bin
/sbin
/usr/bin
/usr/sbin
/usr/local/bin
/usr/local/sbin
/opt 

and probably more, to say nothing of

/lib
/usr/lib
/usr/local/lib



Yesterday I wrote:

    Alas, too many (Linux) developers insist on using the system Python
    as their application language. In most cases they could trivially
    run "aptitude install python3" and be done with it, but that's an 
    extra dependency and therefore Bad.

I never imagined that anyone would argue that they can't install and use
Python3 because of the location where it is installed. As an application
developer, apart from ensuring that the PATH is setup correctly and maybe
having to adjust a few hash-bang lines, how does the location of the Python
binary affect you?



-- 
Steven




More information about the Python-list mailing list