<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 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>
# any package containing this file should be included<br>
'': ['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>
# entry points should also be an external file<br>
config = {<br>
'name': modname('.'),<br>
'version': '0.1',<br>
# 'version': get_svn_revision_cmd(),<br>
'author': "Airbus",<br>
'test_suite': 'nose.collector',<br>
'packages': find_packages(),<br>
'install_requires': requires,<br>
'zip_safe': False,<br>
'entry_points': entry_points,<br>
'setup_requires': ['psi.devsonly'], # this is somehow late
because every<br>
'namespace_packages': list(modname_generator(modname('.'))),<br>
'tests_require': test_requires +
filename_to_list(TESTS_REQUIRE_FILE)<br>
}<br>
<br>
<br>
Any hint is welcome<br>
</body>
</html>