[Distutils] console_script does not install scripts in some packages?

Václav Šmilauer eu at doxos.eu
Thu Nov 15 13:12:36 CET 2012

Hi everybody,

I posted this question at 
without getting response, so I turn to the ML.

I am using setuptools 0.6c11 under Windows (64bit, mingw64).

I have a trouble with setup.py - I use 
entry_points={'console_scripts':['woo = wooMain.main']}, which works 
fine under Linux, but creates no scripts at all under Windows (64bit, 
using mingw64). Curiously, some other packages, which also use 
console_scripts (ipython, for instance), do get their .exe's created 
just fine.

The relevant part of setup.py is below.  I attach "setup.py install" 
log, in case it is informative. Curiously, it says "writing entry points 
to core/main\woo.egg-info\entry_points.txt", but this file does not even 
get installed with the egg.

Coud you suggest a way to debug that (such as running setup.py more 
verbose)? Or suggest a package with very simple setup.py which also uses 
console_scripts and actually works --

Cheers, Vaclav

> from setuptools import setup
> wooModules=['woo.'+basename(py)[:-3] for py in glob('py/*.py') if 
> basename(py)!='__init__.py']
> execFlavor=''
> setup(name='woo',
>     version=version,
> package_dir={'woo':'py','':'core/main','woo.qt':'gui/qt4','woo.pre':'pkg/pre','woo.gts':'py/3rd-party/pygts-0.3.1'},
>     packages=(
>         ['woo','woo._monkey','woo.tests','woo.pre']
>         +(['woo.qt'] if 'qt4' in features else [])
>         +(['woo.gts'] if 'gts' in features else [])
>     ),
>     py_modules=wooModules+['wooOptions','wooMain'],
>     ext_modules=[
>         Extension('woo.'+cxxInternalModule,
>             sources=cxxSrcs,
>             include_dirs=cppDirs,
>             define_macros=cppDef,
>             extra_compile_args=cxxFlags,
>             libraries=cxxLibs,
>             library_dirs=libDirs,
>             extra_link_args=linkFlags,
>         ),
>     ],
>     # ignored under windows? 
> http://stackoverflow.com/questions/13271085/console-scripts-entry-point-ignored
>     entry_points={
>         'console_scripts':[
>             'woo%s = wooMain:main'%execFlavor,
>             'woo%s-batch = wooMain:batch'%execFlavor,
>         ],
>     },
>     zip_safe=False,
> )

-------------- next part --------------
A non-text attachment was scrubbed...
Name: setup.py.log
Type: text/x-log
Size: 9157 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20121115/9c85ac0b/attachment.bin>

More information about the Distutils-SIG mailing list