[Python-apps-team] Where to install C extensions?

Nikolaus Rath Nikolaus at rath.org
Sun Nov 27 21:42:34 UTC 2011


Nikolaus Rath <Nikolaus-BTH8mxji4b0 at public.gmane.org> writes:
> I have an application that installs a (private) extension module. How is
> this best handled?
>
> The standard recipe
>
> 	python setup.py install --force --root=debian/tmp \
>                --install-lib=/usr/lib/[package] \
>                --install-scripts=/usr/share/[package] \
>                --no-compile -O0 --install-layout=deb
>
> installs architecture dependent files in /usr/share/.
>
> If I change --install-lib to /usr/share/[package], I get lots of .py
> files there, which does not seem nice either.
>
> If I manually move *.so from /usr/share/[pkg] to /usr/lib/[pkg], the
> scripts can't find the module anymore so I need to add symlinks from
> share to lib.

..and, in that case gdb does not find the corresponding debugging
symbols anymore, because dh_strip installs them in
/usr/lib/debug/usr/lib, while gdb searches in usr/lib/debug/share.



Best,

   -Nikolaus

-- 
 »Time flies like an arrow, fruit flies like a Banana.«

  PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6  02CF A9AD B7F8 AE4E 425C



More information about the Python-apps-team mailing list