On Tue, Jan 11, 2005 at 05:36:22PM -0200, Henrique de Moraes Holschuh wrote:
> On Tue, 11 Jan 2005, Paul Hampson wrote:
> > Someone, sometime wrote: (Sorry, lost the attribution at some point)
> > > Some people have pointed out that other PHP programs go to /usr/share
> > > as well. Just to complement: Perl modules also get installed to
> > > /usr/share if they are not architecture-specific. Python seems not to
> > > be that way, as its standard sys.path does not include /usr/share/*. 

> > On the other hand, python drops .pyc and .pyo files into the same
> > directory as the .py file at python install-time. I'd hazard a guess
> > that it can't find the .pyc and .pyo files if they're in a different
> > place than the .py file they come from.

> The bytecode is platform-independent, isn't it?  That means it also belongs
> to /usr/share.  OTOH, if .pyo is object code that is platform-dependent,
> then that means all that python stuff needs to be moved to /usr/lib, if
> python cannot be told to stop byte-compiling stuff under /usr/share.

My PowerPC Debian/Testing machine:
tbble:/usr/lib/python2.3$ md5sum filecmp.py*
87f6fca826c9ae5ce919b7b5c0374eaf  filecmp.py
9f1c4ed5de3263b262f794bb39c737fb  filecmp.pyc
9f1c4ed5de3263b262f794bb39c737fb  filecmp.pyo

tbble:/usr/lib/python2.3$ dpkg -l python2.3
ii  python2.3                            2.3.4-13

My i386 Debian/Testing machine:
tbble:/usr/lib/python2.3$ md5sum filecmp.py*
87f6fca826c9ae5ce919b7b5c0374eaf  filecmp.py
fd27e21da14a763132a94e6074e2d186  filecmp.pyc
fd27e21da14a763132a94e6074e2d186  filecmp.pyo

tbble:/usr/lib/python2.3$ dpkg -l python2.3
ii  python2.3                            2.3.4-13

On the other hand, my i386 Debian/Unstable machines:
tbble:/usr/lib/python2.3$ md5sum filecmp.py*
87f6fca826c9ae5ce919b7b5c0374eaf  filecmp.py
a1e61e03c0b25aab7ea5d8d9bea9a02f  filecmp.pyc
a1e61e03c0b25aab7ea5d8d9bea9a02f  filecmp.pyo

tbble:/usr/lib/python2.3$ dpkg -l python2.3
ii  python2.3                            2.3.4-19

So I reckon it _is_ platform dependant.
In fact, given it's regeneratable data, maybe /var/lib/python2.3
would make sense?

Maybe it'd be more useful if I actually learnt to program in
Python. ^_^

-- 
-----------------------------------------------------------
Paul "TBBle" Hampson, MCSE
7th year CompSci/Asian Studies student, ANU
The Boss, Bubblesworth Pty Ltd (ABN: 51 095 284 361)
[EMAIL PROTECTED]

"No survivors? Then where do the stories come from I wonder?"
-- Capt. Jack Sparrow, "Pirates of the Caribbean"

This email is licensed to the recipient for non-commercial
use, duplication and distribution.
-----------------------------------------------------------

Attachment: signature.asc
Description: Digital signature

Reply via email to