packaging python for install.

J

J

Hi everyone,

I have created an App that embedds the python interpreter and I am
now in the process of creating an installer. I am currently linking
python24.lib, but it is only 184k and I suspect that it imports other
dlls... I am also using numarray. Does anyone have any experiences in
packaging python with an application in a single installer ? Has that
been done before ?


Cheers
 
D

Daniel Dittmar

J said:
I have created an App that embedds the python interpreter and I am
now in the process of creating an installer. I am currently linking
python24.lib, but it is only 184k and I suspect that it imports other
dlls... I am also using numarray. Does anyone have any experiences in
packaging python with an application in a single installer ? Has that
been done before ?

- you need python24.dll (probably in %windir%\system32)
- you need some of the *.pyd found in you Pythondir\DLLs. You can use
Proces Explorer from www.sysinternals.com to see all the loaded DLLs and
..pyd that your running program accesses
- you need a large part of the Python library. Best: compile them to
..pyc files using Pythondir\Lib\compileall.py, pack them into one .zip
file and then add that .zip file to %PYTHONPATH%

Hint: Python will search for the Library files through the registry key
HKEY_LOCAL_MACHINE\SOFTWARE\PythonCore\<version>. You don't have to set
this entry with your installer (and you shouldn't, as it would break an
already existing Python installation). But you could rename it on your
machine as this allows you to test your installation without having to
copy everything to a clean machine.

Daniel
 
M

Miki

Hello J,
I have created an App that embedds the python interpreter and I am
now in the process of creating an installer. I am currently linking
python24.lib, but it is only 184k and I suspect that it imports other
dlls... I am also using numarray. Does anyone have any experiences in
packaging python with an application in a single installer ? Has that
been done before ?

http://starship.python.net/crew/theller/moin.cgi/ShippingEmbedded

HTH,
Miki
 
J

J

Hi Miki

Thx for you reply. I have tried the procedure but I am stuck with

python setup.py py2exe --includes mymodule.

I get the following error: "ImportError: No module named mymodule"

I don't know what mymodule should contain. Basically I want all of
python and numarray
to be part of the distribution. The script creates a directory called
dist, but that's about it...

Am I right to assume that mymodule just contains an bunch of import
statements ?


Cheers
Jochen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top