[Distutils] [issue155] 0.7 breaks existing packages with hyphens in 'name'

Naftuli Tzvi Kay setuptools at bugs.python.org
Mon Jul 15 21:16:37 CEST 2013

New submission from Naftuli Tzvi Kay:

Please see this on StackOverflow for a full explanation: http://stackoverflow.com/questions/17659561/hyphens-in-project-names-in-setuptools-0-7

I have a nice little script library called [buildout-starter](https://github.com/rfkrocktk/buildout-starter) which makes creating Buildout projects really easy. 

Then, the latest Buildout declared a dependency on `setuptools>=0.7`, so I had to upgrade my `setuptools` here to be compliant.

After the upgrade, `setuptools` now fails along with my Buildout. Whereas the following would work before 0.7, it now fails:

    from setuptools import setup, find_packages

        name = "tornado-chat-example",
        version = "0.0.1-SNAPSHOT",
        packages = find_packages('src'),
        package_dir = { '': 'src'},
        install_requires = [ 'setuptools', ],

My `src` directory looks like this:

    ├── tornadochatexample
    └── tornado_chat_example.egg-info

Here's the error I get:

    Develop: '/home/naftuli/tornado-chat-example/.'
    Installing python_section.
    Couldn't find index page for 'tornadochatexample' (maybe misspelled?)
    Getting distribution for 'tornadochatexample'.
    Couldn't find index page for 'tornadochatexample' (maybe misspelled?)
      Installing python_section.
      Getting distribution for 'tornadochatexample'.
    Error: Couldn't find a distribution for 'tornadochatexample'.

Like I mentioned before, this example would seemingly run on `setuptools` 0.6, but now fails in the latest `setuptools` 0.7. How can I get this to work? I'd like my project to be named `tornado-chat-example` but have a package of `tornadochatexample`. Is this a bug, as it used to work before?

messages: 739
nosy: rfkrocktk
priority: bug
status: unread
title: 0.7 breaks existing packages with hyphens in 'name'

Setuptools tracker <setuptools at bugs.python.org>

More information about the Distutils-SIG mailing list