views:

135

answers:

3

I want to make an executable file (.exe) of my Python application.

I want to know how to do it but have this in mind: I use a C++ DLL!

Do I have to put the DLL along side with the .exe or is there some other way?

+1  A: 

Use py2exe. You can put the DLL in the same folder as the final EXE and it should be loaded fine.

Max Shawabkeh
+3  A: 

py2exe can generate single file executables. see this link for examples.

The setup.py I use uses the following combination of options:

'compressed': 1,
 'optimize':2,
 'bundle_files': 1

I usually add external dlls (p.e. msvcr71.dll) in the same folder where the executable is.

To facilitate distribution and to automate installation after generating your exe you can use Inno Setup to create an installer that puts your exe and your dlls, and other documents (readme, etc) into the application directory

joaquin
A: 

Have a look at pyinstaller. It should find (and correspondingly ship) these dependencies for you.

ChristopheD