setup.py doesn't create an executable script on windows
lpinner opened this issue · 1 comments
lpinner commented
Have you considered replacing scripts=['bin/landsat']
with entry_points={'console_scripts':['landsat=landsat.landsat:__main__']}
?
This would allow cross platform generation of executable scripts. The current use of the distutils scripts
argument just copies bin/landsat to (Python dir)\Scripts on Windows. It would make packaging your project a little easier as well.
I realise entry_points
is a setuptools specific argument, but you could do something like:
try:
from setuptools import setup
setup_kwargs = {'entry_points': {'console_scripts':['landsat=landsat.landsat:__main__']}}
except ImportError:
from distutils.core import setup
setup_kwargs = {'scripts': ['bin/landsat']}
etc...
setup(
name='landsat-util',
etc...
**setup_kwargs
)