<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 12/13/2011 02:25 PM, Guy Rozendorn wrote:
    <blockquote cite="mid:4EE7606F.3080209@rzn.co.il" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      If your console_scripts section in setup.py point to a correct
      entry point, then distribute should've created a dev_main.exe
      executable wrapper, and a dev_main-script.py under
      C:\Python25\Scripts.<br>
      The executable wrapper reads the generated python file and
      extracts the pyhton executable path from the shebang file, and
      calls CreateProcess with that python executable.<br>
      <br>
      If you don't have these two files, then, I can guess that either:<br>
      * You're using an old version of distribute<br>
      * Your setup.py is incorrect.<br>
      <br>
      - Guy<br>
      <br>
    </blockquote>
    <br>
    The version of setuptools is&nbsp; rather old right.<br>
    Anyway this is the setup.py:<br>
    <br>
    from setuptools import setup<br>
    from psi.devsonly.api import build_config<br>
    <br>
    #TODO: what if this module is having some nasty side effects??<br>
    import os<br>
    from os.path import join<br>
    config = build_config()<br>
    config['setup_requires'] = []<br>
    config['package_data'] = {<br>
    &nbsp;&nbsp;&nbsp; # any package containing this file should be included<br>
    &nbsp;&nbsp;&nbsp; '': ['windows_easy_install.pth']<br>
    }<br>
    <br>
    bindir = join('psi', 'devsonly', 'bin')<br>
    scripts = [join(bindir, x) for x in os.listdir(bindir) if
    x.endswith('.py')]<br>
    <br>
    # networkx in particular is very hard to build<br>
    extra_requires = ('rope', 'pygraphviz', 'networkx')<br>
    <br>
    # we might need to be able to find out the version number at setup
    time<br>
    # so the egg telling this should have to be there in setup_requires<br>
    config['scripts'] = scripts<br>
    <br>
    setup(**config)<br>
    <br>
    <br>
    Where build_config is something done somewhere else constructing a
    similar dictionary:<br>
    &nbsp;&nbsp;&nbsp; # entry points should also be an external file<br>
    &nbsp;&nbsp;&nbsp; config = {<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'name': modname('.'),<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'version': '0.1',<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # 'version': get_svn_revision_cmd(),<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'author': "Airbus",<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'test_suite': 'nose.collector',<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'packages': find_packages(),<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'install_requires': requires,<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'zip_safe': False,<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'entry_points': entry_points,<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'setup_requires': ['psi.devsonly'],&nbsp; # this is somehow late
    because every<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'namespace_packages': list(modname_generator(modname('.'))),<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'tests_require': test_requires +
    filename_to_list(TESTS_REQUIRE_FILE)<br>
    &nbsp;&nbsp;&nbsp; }<br>
    <br>
    <br>
    Any hint is welcome<br>
  </body>
</html>