views:

29

answers:

1

Hello, all. I have a large, crossplatform, python-dependent project, which is built by CMake. In linux, python is either preinstalled or easily retrived by shell script. But on windows build, i have to install python manually from .msi before running CMake. Is there any good workaround using cmake scripts?

PS All other external dependencies are downloaded from dedicated FTP server.

+1  A: 

Python doesn't really have to be installed to function properly. For my own CMake based projects on Windows, I just use a .zip file containing the entire python tree. All you need to do is extract it to a temporary directory, add it to your path, and set your PYTHONHOME/PYTHONPATH environment variables. Once that's done, you have a fully operational Python interpreter at your disposal. About the only 'gotcha' on Windows is to make sure you remember to copy the Python DLL out of C:\Windows\system32 into the top-level Python directory prior to creating the .zip.

Rakis
TY, i got it. When i took "python.dll" - all went fine. Thx.
ALOR