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

Re: linda ... Re: Correct location of .py and .pyc files



Cory Dodt <corydodt@twistedmatrix.com> wrote:

> I note that applications written in python, such as my aap package, go into
> /usr/lib/<package> per the policy (section 3.1.1), but linda does not support
> this.  _all packages (most things written in Python) belong in /usr/share
> according to linda, but /usr/lib according to Python policy.

Well, that is the case if the modules need not be imported by a user
("private modules").

> Of course I obey the policy and not linda, but this is annoying.
> (Particularly so when linda itself is written in Python -- and doesn't obey
> the Python policy! :-)

Perhaps it will be time to file a bug when the Python policy is not a
draft any more...

> As long as I'm on my rant chair, is there any reason why packages with private
> modules need to be in /usr/lib?  Python upstream doesn't care about private
> modules one way or the other.

You're right. I fail to understand this requirement of the Python policy
draft.

,----
| A program using /usr/bin/python as interpreter can come up with private
| python modules. These modules should be installed in
| /usr/lib/site-python/module, /usr/lib/pythonX.Y/site-packages/module
| (where pythonX.Y is the current python version) or /usr/lib/package. In
| the latter case, this directory should be added to sys.path at the
| program startup.
`----

If sys.path is to be altered by the program to make use of the modules,
it could very well be altered to contain /usr/share/package instead of
/usr/lib/package, at no cost.

The only reason I can see to the current recommendation is for
consistency within Python-related packages, since about everything else
belongs to /usr/lib.

Thoughts?

-- 
Florent



Reply to: