Ex 46 - cannot get setup.py to work

Here is my setup.py:

try:
    from setuptools import setup
except ImportError:
    from distutils.core import setup

config = {
    'description': 'This is Dumb Project.',
    'author': 'James C. Maxwell',
    'url': 'http://www.github.com',
    'download_url': 'http://www.github.com',
    'author_email': 'freespaceimpedance@gmail.com',
    'version': '0.1',
    'install_requires': ['nose'],
    'packages': ['dumb'],
    'scripts': ['frobnicate'],
    'name': 'DumbProject'
}

setup(**config)

All the required things are in the right places, for instance, there is a module (dumb.py) in an appropriately-named folder (/DumbProject/dumb) as well as a script in /DumbProject/bin (frobnicate.py).

Yet, if I run “python setup.py install” it does not complete successfully. Here’s what the session looks like:

PS C:\Users\WinTenProBox\Google Drive\Python\test_directory\projects\DumbProject> python setup.py install                     running install
running bdist_egg
running egg_info
writing requirements to DumbProject.egg-info\requires.txt
writing DumbProject.egg-info\PKG-INFO
writing top-level names to DumbProject.egg-info\top_level.txt
writing dependency_links to DumbProject.egg-info\dependency_links.txt
reading manifest file 'DumbProject.egg-info\SOURCES.txt'
writing manifest file 'DumbProject.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
installing scripts to build\bdist.win-amd64\egg\EGG-INFO\scripts
running install_scripts
running build_scripts
error: file 'C:\Users\WinTenProBox\Google Drive\Python\test_directory\projects\DumbProject\bin\frobnicate' does not exist

I tried explicitly adding ./bin to the system path within the setup script. Same result. Why does Python refuse to see frobnicate.py and complain that it “does not exist” when it definitely does?

Triple check that

bin\frobnicate

Is actually in the bin directory. And I mean exactly that. If you named it bin/frobnicate.py then that’s not going to work.

A free service run by Zed A. Shaw for learncodethehardway.org.