I have a python script (2.7) with some "interesting" imports at the top. I initially wanted to use py2exe to compile this into an exe that I can more easily distribute (py2exe doesn't find all dependencies).

I have given up and am trying to use cx-freeze instead. But, I am having problem there as well. The problems seem to be libraries I have added to Python (jinja2 and restkit). I see them in my python directory ./Lib/site-packages/Jinja2-2.6-py2.7.egg/jinja2 and here ./Lib/site-packages/restkit-4.2.1-py2.7.egg/restkit.

Here are the imports in my script:

import datetime
from jinja2 import Environment, PackageLoader
from optparse import OptionParser
from datetime import date, timedelta
from restkit import Resource, BasicAuth, request

I am using a setup.py with cx-freeze. Here is the setup.py:

from cx_Freeze import setup, Executable


packages  = ["restkit", "jinja2" , "restkit.client" ]
includes = []
includefiles = []
eggsacutibull = Executable(
    script = "myScript.py",
    initScript = None,
    targetName = "myScript.exe",
    compress = True,
    copyDependentFiles = True,
    appendScriptToExe = False,
    appendScriptToLibrary = False,
    icon = None
    )

setup(
        name = "myScript",
        version = "0.1",
        author = 'vickery',
        description = "MyScript description",
        options = {"build_exe": {"includes":includes, "include_files": includefiles, "packages": packages}},
        executables = [eggsacutibull]
        )

I run cxfreeze like this:

cxfreeze myScript.py --target-dir exe

I get this in my build:

Missing modules:
? __pypy__ imported from jinja2.debug
? http_parser.http imported from restkit.client
? jinja2._debugsupport imported from jinja2.debug
? jinja2._markupsafe._speedups imported from 
Edit
Report