setuptools was added as an install and runtime dependency in 0.11 on Windows by PR #536, but when someone has time this dependency should be removed, and plain distutils installation should be fixed, including '.bat' files, etc.
See #351 and #369 for more information.
Going through your setup.py for some inspiration I bumped into a mention of this issue.
If you look at how Continuum Anaconda handles Python scripts (.bat files as you mention in Anaconda/Scripts), this suggests a fix for this problem.
Something along these lines does it for me:
bat = ['@echo off\n',
'"python.exe" "%PYFILE%" %*\n']
windows_scripts = 
windows_bat_files = 
for script in scripts:
with open(script+'.bat', "w") as f:
for string in bat:
for script, script_w in zip(scripts, windows_scripts):
if os_name == 'windows':
scripts = windows_prepare(scripts)
Plus some cleanup of the -script.py and .bat files this created.
Thanks, there's hope for dropping the setuptools entry points, yet! Is python.exe right? shouldn't it be sys.executable, since PATH is not trustworty?
Good call and you're most likely correct. In Anaconda/Scripts you'll find that they call the nearest python.exe in a parent directory. This might be safest to do?
that ought to be the right thing to do for an installed script, certainly.
Fixed by #6899