Using setuptools version 26.1.1 via anaconda. I'm unable to execute any of my command line scripts I'm including with my package.
Here is what my setup.py looks like:
from setuptools import setup
config = {
'description': 'Tools to extract information from web links',
'author': 'Tailwind',
'author_email': 'grantdelozier@gmail.com',
'version': '0.1',
'install_requires': ['nose'],
'packages': ['ContentAnalysis'],
'package_data': {
'ContentAnalysis': ['data/*/*/*.txt']
},
'scripts': ['bin/content_analysis'],
'name':'ContentAnalysis',
'include_package_data':True
}
setup(**config)
After running python setup.py install
, my script is placed in /opt/anaconda2/bin but the content is replaced with:
#!/opt/anaconda2/bin/python
# EASY-INSTALL-SCRIPT: 'ContentAnalysis==0.1','content_analysis'
__requires__ = 'ContentAnalysis==0.1'
__import__('pkg_resources').run_script('ContentAnalysis==0.1', 'content_analysis')
which fails with the following error:
grant@DevBox2:/opt/content-analysis$ content_analysis -l 'http://101beauty.org/how-to-use-baking-soda-to-reduce-dark-circles-and-bags-under-the-eyes/'
Traceback (most recent call last):
File "/opt/anaconda2/bin/content_analysis", line 4, in <module>
__import__('pkg_resources').run_script('ContentAnalysis==0.1', 'content_analysis')
File "/opt/anaconda2/lib/python2.7/site-packages/setuptools-26.1.1-py2.7.egg/pkg_resources/__init__.py", line 744, in run_script
File "/opt/anaconda2/lib/python2.7/site-packages/setuptools-26.1.1-py2.7.egg/pkg_resources/__init__.py", line 1491, in run_script
pkg_resources.ResolutionError: No script named 'content_analysis'