<html><head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
</head><body bgcolor="#FFFFFF" text="#000000">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 style="border: 0px none;"
cite="mid:4EE75D04.5060905@gmail.com" type="cite">
<div style="margin:30px 25px 10px 25px;" class="__pbConvHr"><div
style="display:table;width:100%;border-top:1px solid
#EDEEF0;padding-top:5px">         <div
style="display:table-cell;vertical-align:middle;padding-right:6px;"><img
photoaddress="andrea.crotti.0@gmail.com" photoname="Andrea Crotti"
src="cid:part1.04060505.09080506@rzn.co.il"
name="compose-unknown-contact.jpg" width="25px" height="25px"></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;width:100%">
        <a moz-do-not-send="true" href="mailto:andrea.crotti.0@gmail.com"
style="color:#737F92
!important;padding-right:6px;font-weight:bold;text-decoration:none
!important;">Andrea Crotti</a></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;">
<font color="#9FA2A5"><span style="padding-left:6px">December 13, 2011
4:11 PM</span></font></div></div></div>
<div style="color:#888888;margin-left:24px;margin-right:24px;"
__pbrmquotes="true" class="__pbConvBody">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<br>
I thought so, but I was surprised to see the shebang line in the
script file, so I supposed that it was actually working.<br>
So if I just make sure that every py file is associated with that
particular version of python everything should work,<br>
right?<br>
<div>_______________________________________________<br>Distutils-SIG
maillist - <a class="moz-txt-link-abbreviated" href="mailto:Distutils-SIG@python.org">Distutils-SIG@python.org</a><br><a class="moz-txt-link-freetext" href="http://mail.python.org/mailman/listinfo/distutils-sig">http://mail.python.org/mailman/listinfo/distutils-sig</a><br></div></div>
<div style="margin:30px 25px 10px 25px;" class="__pbConvHr"><div
style="display:table;width:100%;border-top:1px solid
#EDEEF0;padding-top:5px">         <div
style="display:table-cell;vertical-align:middle;padding-right:6px;"><img
photoaddress="fuzzyman@gmail.com" photoname="Michael Foord"
src="cid:part2.07010804.03070906@rzn.co.il" name="postbox-contact.jpg"
width="25px" height="25px"></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;width:100%">
        <a moz-do-not-send="true" href="mailto:fuzzyman@gmail.com"
style="color:#737F92
!important;padding-right:6px;font-weight:bold;text-decoration:none
!important;">Michael Foord</a></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;">
<font color="#9FA2A5"><span style="padding-left:6px">December 13, 2011
3:08 PM</span></font></div></div></div>
<div style="color:#888888;margin-left:24px;margin-right:24px;"
__pbrmquotes="true" class="__pbConvBody"><br><br><div
class="gmail_quote">On 13 December 2011 11:40, Andrea Crotti <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:andrea.crotti.0@gmail.com">andrea.crotti.0@gmail.com</a>></span>
wrote:<br><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc
solid;padding-left:1ex" class="gmail_quote">
I have a script installed with "python setup.py develop" on windows 7 in<br>
the directory c:\python25\scripts.<br>
<br>
The script looks like:<br>
<br>
#!c:\python25\python.exe<br>
# EASY-INSTALL-DEV-SCRIPT: 'psi.devsonly==0.1','dev_main.py'<br>
__requires__ = 'psi.devsonly==0.1'<br>
from pkg_resources import require; require('psi.devsonly==0.1')<br>
del require<br>
__file__ = 'h:\\long\\path\\bin\\dev_main.py'<br>
execfile(__file__)<br>
<br>
c:\python25\script is actually in the $PATH, but if I try to launch<br>
that command it doesn't work because it tries with c:\Python27.<br>
<br>
long\path\git_projs\Psi>dev_main.py -h<br>
dev_main.py -h<br>
Traceback (most recent call last):<br>
File "C:\python25\scripts\dev_main.py", line 4, in <module><br>
from pkg_resources import require; require('psi.devsonly==0.1')<br>
File "C:\Python27\lib\site-packages\setuptools-0.6c11-py2.7.egg\pkg_resources.py",
line 2603, in <module><br>
File "C:\Python27\lib\site-packages\setuptools-0.6c11-py2.7.egg\pkg_resources.py",
line 666, in require<br>
File "C:\Python27\lib\site-packages\setuptools-0.6c11-py2.7.egg\pkg_resources.py",
line 565, in resolve<br>
pkg_resources.DistributionNotFound: psi.devsonly==0.1<br>
<br>
<br>
This makes me thing that<br>
- the shebang is absolutely ignored<br></blockquote><div><br></div><div><br></div><div>Yes,
Windows ignores shebang lines, they're a UNIX convention. Windows uses
file associations to decide what program to launch scripts with.</div>
<div><br></div><div>The Windows Python installer associates .py files
with python.exe - so the most recent version of Python you installed
will have the file association.</div><div><br></div><div>For scripts on
Windows I *thought* setuptools created .exe wrappers to get round this
problem. It may not do this when you use "setup.py develop" though.</div>
<div><br></div><div>All the best,</div><div> </div><div><br></div><div>Michael
Foord</div><div><br></div><blockquote style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex" class="gmail_quote">
- some other weird bug<br>
<br>
Is there a way to solve this thing?<br>
_______________________________________________<br>
Distutils-SIG maillist - <a moz-do-not-send="true" target="_blank"
href="mailto:Distutils-SIG@python.org">Distutils-SIG@python.org</a><br>
<a moz-do-not-send="true" target="_blank"
href="http://mail.python.org/mailman/listinfo/distutils-sig">http://mail.python.org/mailman/listinfo/distutils-sig</a><br></blockquote></div><br><br
clear="all"><div><br></div>-- <br><pre cols="72"><a moz-do-not-send="true" target="_blank" href="http://www.voidspace.org.uk/">http://www.voidspace.org.uk/</a>
May you do good and not evil
May you find forgiveness for yourself and forgive others
May you share freely, never taking more than you give.
-- the sqlite blessing <a moz-do-not-send="true" target="_blank" href="http://www.sqlite.org/different.html">http://www.sqlite.org/different.html</a></pre>
<br>
<pre wrap="">_______________________________________________
Distutils-SIG maillist - <a class="moz-txt-link-abbreviated" href="mailto:Distutils-SIG@python.org">Distutils-SIG@python.org</a>
<a class="moz-txt-link-freetext" href="http://mail.python.org/mailman/listinfo/distutils-sig">http://mail.python.org/mailman/listinfo/distutils-sig</a>
</pre></div>
<div style="margin:30px 25px 10px 25px;" class="__pbConvHr"><div
style="display:table;width:100%;border-top:1px solid
#EDEEF0;padding-top:5px">         <div
style="display:table-cell;vertical-align:middle;padding-right:6px;"><img
photoaddress="andrea.crotti.0@gmail.com" photoname="Andrea Crotti"
src="cid:part1.04060505.09080506@rzn.co.il"
name="compose-unknown-contact.jpg" width="25px" height="25px"></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;width:100%">
        <a moz-do-not-send="true" href="mailto:andrea.crotti.0@gmail.com"
style="color:#737F92
!important;padding-right:6px;font-weight:bold;text-decoration:none
!important;">Andrea Crotti</a></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;">
<font color="#9FA2A5"><span style="padding-left:6px">December 13, 2011
1:40 PM</span></font></div></div></div>
<div style="color:#888888;margin-left:24px;margin-right:24px;"
__pbrmquotes="true" class="__pbConvBody">I have a script installed with
"python setup.py develop" on windows 7 in
<br>the directory c:\python25\scripts.
<br>
<br>The script looks like:
<br>
<br>#!c:\python25\python.exe
<br># EASY-INSTALL-DEV-SCRIPT: 'psi.devsonly==0.1','dev_main.py'
<br>__requires__ = 'psi.devsonly==0.1'
<br>from pkg_resources import require; require('psi.devsonly==0.1')
<br>del require
<br>__file__ = 'h:\\long\\path\\bin\\dev_main.py'
<br>execfile(__file__)
<br>
<br>c:\python25\script is actually in the $PATH, but if I try to launch
<br>that command it doesn't work because it tries with c:\Python27.
<br>
<br>long\path\git_projs\Psi>dev_main.py -h
<br>dev_main.py -h
<br>Traceback (most recent call last):
<br> File "C:\python25\scripts\dev_main.py", line 4, in <module>
<br> from pkg_resources import require; require('psi.devsonly==0.1')
<br> File
"C:\Python27\lib\site-packages\setuptools-0.6c11-py2.7.egg\pkg_resources.py",
line 2603, in <module>
<br> File
"C:\Python27\lib\site-packages\setuptools-0.6c11-py2.7.egg\pkg_resources.py",
line 666, in require
<br> File
"C:\Python27\lib\site-packages\setuptools-0.6c11-py2.7.egg\pkg_resources.py",
line 565, in resolve
<br>pkg_resources.DistributionNotFound: psi.devsonly==0.1
<br>
<br>
<br>This makes me thing that
<br>- the shebang is absolutely ignored
<br>- some other weird bug
<br>
<br>Is there a way to solve this thing?
<br>_______________________________________________
<br>Distutils-SIG maillist - <a class="moz-txt-link-abbreviated" href="mailto:Distutils-SIG@python.org">Distutils-SIG@python.org</a>
<br><a class="moz-txt-link-freetext" href="http://mail.python.org/mailman/listinfo/distutils-sig">http://mail.python.org/mailman/listinfo/distutils-sig</a>
<br></div>
</blockquote>
</body></html>