Re: Where to install application .py files?

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

 



Hans de Goede wrote:
Hi,

I'm trying to package some educational games written in python. Upstream
delivers a horrible INSTALL.sh which drops the .py files under:
/usr/lib/games/childsplay

Now this is obviously wrong IMHO, but what is correct. pirut installs
its .py files under /usr/lib/python2.4/site-packages/pirut,
system-config-network installs them under
/usr/share/system-config-network. I thought that
/usr/lib/python2.4/site-packages was mainly for python modules / libs
which can be used by multiple python programs and that .py files which
are program code (iow not "sharable" / reusable) should indeed go under
/usr/share/%{name}.

Also on my 64bit system I have python stuff under both
/usr/lib/python2.4/site-packages/ and /usr/lib64/python2.4/site-packages/

Thanks & Regards,

Hans

The modules should go into

/usr/lib/python2.4/site-packages/

and the rest should go into /usr/share/%{name}

check out yum, it install a the yum python module into

/usr/lib/python2.4/site-packages/yum

and the code for the yum client is installed into /usr/share/yum-cli.

it can depends on how the python application is coded, if you install a module in site-packages/ you can access the module by doing a

import modulename

in any python application, you can also install the module in
/usr/share/appl.name/modulename, but then it can only be used python application located in /usr/share/appl.name/ .

I think the best way, is to install modules under /usr/lib/python2.4/site-packages/ and the rest of the application in
/usr/share/appl.name.

This is the way i do it in yumex.

Tim Lauridsen Tim

--
fedora-extras-list mailing list
fedora-extras-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-extras-list

[Index of Archives]     [Fedora General Discussion]     [Fedora Art]     [Fedora Docs]     [Fedora Package Review]     [Fedora Desktop]     [Big List of Linux Books]     [Yosemite Backpacking]     [KDE Users]

  Powered by Linux