Distributing Packages / os independent installation folder

Achim Domma achim.domma at syynx.de
Fri Jun 7 05:11:23 EDT 2002


Hi,

I'm building a python interface to ImageMagick. I already succeded in
building an installer with distutils, but have some questions regarding
portability:

- where should my package and shared librarie go to? On windows I put the
dll into python22/DLLs and the rest into a folder
python22/Lib/site-packages/ImageMagick. What to do on other plattforms? I
don't expect a DLLs folder on Linux. ;-)

- In my __init__.py I have to change one environment variable. Currently I
do it like this:

import os
os.environ['MAGICK_HOME'] = r'C:\Python22\Lib\site-packages\ImageMagick'
from _ImageMagick import *

Is there an plattform independent way to get the installation folder of my
package? On windows I can get the python folder from registry, but this will
also break on linux.

greetings
Achim





More information about the Python-list mailing list