Mailinglist Archive: opensuse-packaging (121 mails)

< Previous Next >
Re: [opensuse-packaging] Including python modules using .pth file
Hi Chris,

there is no precedence according to my knowledge and I don't know about
any guidelines from openSUSE or other distributions.

I would suggest to only resort to using the .pth files if it requires
drastic measures during %install, a lot of patching and would cause
issues for users of that package (e.g. if the package expects the python
source to be inside it's "main" install tree).

However, that's only my personal opinion.


Cheers,

Dan

Chris Coutinho <chrisbcoutinho@xxxxxxxxx> writes:

Hi,

There are some packages that include python modules/packages that are
not installable via setup.py. Since they might not end up on the
normal python search path, python fails to find them and the build
looks 'broken'

For example, paraview (a package within the science project) installs
its shared libraries into its own /usr/lib64/paraview subdirectory.
The associated python3 packages get placed into
/usr/lib64/paraview/python3.x/site-packages/. Another project I
recently submitted places its python modules into
/usr/share/<package>/Python. Both of these cases end up with import
errors, and can be solved by fixing how the packages are installed.

Rather than moving the packages into the system site-packages
directory, I propose to simply throw a <package>.pth file into the
site directory for python 2 or 3 (or both if applicable) pointing to
the packages python modules.

Is there precedent regarding this issue?

Regards,
Chris
--
To unsubscribe, e-mail: opensuse-packaging+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-packaging+owner@xxxxxxxxxxxx

--
Dan Čermák <dcermak@xxxxxxxx>
Software Engineer Development tools
SUSE Linux GmbH, Maxfeldstr. 5, D-90409 Nürnberg
Tel: +49-911-74053-0; Fax: +49-911-7417755; https://www.suse.com/
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284
(AG Nürnberg)
--
To unsubscribe, e-mail: opensuse-packaging+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-packaging+owner@xxxxxxxxxxxx

< Previous Next >
References