[Distutils] setuptools and packages with dots

Benji York benji at zope.com
Thu Apr 12 20:34:37 CEST 2007


While working on a package I decided to do some old-school revision 
control and make a copy of the directory.  I recursively copied the 
package to PACKAGENAME.bak1.  I then ran setup.py develop (indirectly 
though zc.buildout) and received an intriguing error message.  Here are 
reproduction steps that don't use buildout.

% mkdir foo
% cd foo
% mkdir bad.dir
% touch bad.dir/__init__.py

create setup.py as such:

from setuptools import setup, find_packages
setup(
     name = 'test',
     packages = find_packages('.'),
     install_requires = ['setuptools']
     )

% python setup.py develop
running develop
running egg_info
writing requirements to test.egg-info/requires.txt
writing test.egg-info/PKG-INFO
writing top-level names to test.egg-info/top_level.txt
writing dependency_links to test.egg-info/dependency_links.txt
error: package directory 'bad/dir' does not exist

It looks like somewhere in setuptools paths are being normalized to 
package names and back.  The dot doesn't survive the round trip.
-- 
Benji York
Senior Software Engineer
Zope Corporation


More information about the Distutils-SIG mailing list