On Fri, 2010-03-19 at 15:14 +0100, Sebastian Hilbert wrote: > Hi all, > > I am turning to the mailing list as I cannot get a specific problem worked > out. > > I have packaged GNUmed (http://wiki.gnumed.de) for MS Windows XP. GNUmed > itself has a few modules that are imported like this: > > from Gnumed.pycommon import gmPG2 > > This works when the app is installed in Windows ( gmPG2 is installed in c: > \python25\lib\site-packages\Gnumed\pycommon) > > but not if the app is not installed (no \python25\lib\site- > packages\Gnumed\pycommon) > > The directory is pycommon(source files) is shiped in the same directory > gnumed.py (for gnumed.exe) is shiped > > (c:\workplace\gnumed-0.6.2\client\gnumed.py ; c: > \workplace\gnumed-0.6.2\client\pycommon\gmPG2) > > How do I tell pyinstaller or python respectively to use c: > \workplace\gnumed-0.6.2\client\pycommon instead of lib\site-packages ? > > Any help is appreciated.
Hi Sebastian, I think the problem is that, when you install the app under Windows, you create a top-level package named "Gnumed". Given the paths that you quoted: c:\workplace\gnumed-0.6.2\client\gnumed.py c:\workplace\gnumed-0.6.2\client\pycommon\gmPG2 there is absolutely no "Gnumed" package here. If you added it, such as: c:\workplace\gnumed-0.6.2\client\gnumed.py c:\workplace\gnumed-0.6.2\client\Gnumed c:\workplace\gnumed-0.6.2\client\Gnumed\__init__.py c:\workplace\gnumed-0.6.2\client\Gnumed\pycommon\gmPG2 it would probably work out of the box. Anyway, if you want to setup custom import paths for PyInstaller, you can modify the "path" variable that is passed to the Analysys() call in the spec file. That is basically the equivalent of a custom PYTHONPATH used by PyInstaller. Hope this helps! -- Giovanni Bajo :: [email protected] Develer S.r.l. :: http://www.develer.com My Blog: http://giovanni.bajo.it Last post: ctypes support in PyInstaller -- You received this message because you are subscribed to the Google Groups "PyInstaller" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pyinstaller?hl=en.
