You are not logged in.

#1 2009-12-29 04:39:25

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

[Solved] Python: Creating AUR package, binary can't find python module

I'm building a PKGBUILD for PyLotRO for the AUR and I'm using a Debian package.  I tried just copying the content of the data.tar.gz to the filesystem assuming the directory structure is the same for the packages but apparently it is not.  At least I'm figuring this is a filesystem problem but I don't know enough about python to be sure.  When I start the program, this is what I'm getting:

pylotro
Traceback (most recent call last):
  File "/usr/bin/pylotro", line 31, in <module>
    import PyLotROLauncher.Runner
ImportError: No module named PyLotROLauncher.Runner

I can see the file in the package that (I would think) would be the responsible module:

/usr/share/pyshared/PyLotROLauncher/Runner.py

So I'm thinking the python package must store modules in a different location?????

The package requires: 4suite, python, and pyqt.  Any thoughts about what do I need to do here??

Last edited by Gen2ly (2010-01-01 09:25:03)


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

#2 2009-12-29 10:57:43

Nezmer
Member
Registered: 2008-10-24
Posts: 559
Website

Re: [Solved] Python: Creating AUR package, binary can't find python module

Did you try putting stuff in /usr/lib/python2.6/site-packages/ ?

Last edited by Nezmer (2009-12-29 10:58:25)


English is not my native language .

Offline

#3 2009-12-29 11:10:41

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: [Solved] Python: Creating AUR package, binary can't find python module

why you are using debian package rather that the source?

http://www.lotrolinux.com/PyLotRO-0.1.11.tar.bz2

cd $srcdir/PyLotRO-$pkgver 
python setup.py install --root=$pkgdir || return 1

should be enough


Give what you have. To someone, it may be better than you dare to think.

Offline

#4 2009-12-29 19:53:13

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: [Solved] Python: Creating AUR package, binary can't find python module

Nezmer wrote:

Did you try putting stuff in /usr/lib/python2.6/site-packages/ ?

Yes, 'site-packages' is the correct place.  Thank you Nezmer.

wonder wrote:

why you are using debian package rather that the source?

http://www.lotrolinux.com/PyLotRO-0.1.11.tar.bz2

cd $srcdir/PyLotRO-$pkgver 
python setup.py install --root=$pkgdir || return 1

should be enough

Ah, beautiful.  Wasn't aware before that python install script could define a destdir.  Much better way of doing it.  Thanks wonder.

Last edited by Gen2ly (2009-12-29 20:44:12)


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

Board footer

Powered by FluxBB