Include A Library In Python Application
I am trying to find a way to include a library in a Ubuntu/Python/PyGtk application even though It is not included in the stock python enviornment and I can't add it as a dependenc
Solution 1:
I think this should work though I'm not sure.
You put the folder with the name pygal
from the pygal egg in your application directory. You can take it from your python installation - it should have this path:
/usr/local/lib/python2.7/dist-packages/pygal-0.13.0-py2.7.egg/pygal
or if you use python 3.1
/usr/local/lib/python3.1/dist-packages/pygal-0.13.0-py3.1.egg/pygal
or download it from pipy
.
You can use it like any python library:
from pygal import *
Solution 2:
I've actually figured out how to package this as a *deb file that I can include in my future PPA (or possibly submit to the community) that will (hopefully) cleanly install the python package on the system. I found a great write up in the Debian wiki that actually doesn't seem cryptic to a newbie like myself, oddly enough. http://wiki.debian.org/Python/Packaging#Example_1:_Python_extension
Post a Comment for "Include A Library In Python Application"