[Distutils] [buildout] bug related to package name capitalisation

Chris Withers chris at simplistix.co.uk
Thu Aug 12 17:01:48 CEST 2010


Hi All,

The following buildout.cfg demonstrates something that feels buggy to me:

[buildout]
parts = sqlalchemy migrate
versions = versions

[versions]
SQLAlchemy = 0.6.0
sqlalchemy = 0.6.2

[sqlalchemy]
recipe = zc.recipe.egg
eggs = SQLAlchemy
entry-points = foo=bar:baz

[migrate]
recipe = zc.recipe.egg
eggs = sqlalchemy-migrate

When run, you'll get two scripts:

bin/migrate:
...
sys.path[0:0] = [
   '/opt/buildout-eggs/sqlalchemy_migrate-0.6-py2.6.egg',
   '/opt/buildout-eggs/Tempita-0.4-py2.6.egg',
   '/opt/buildout-eggs/decorator-3.2.0-py2.6.egg',
   '/opt/buildout-eggs/SQLAlchemy-0.6.2-py2.6.egg',
...

bin/foo:
...
sys.path[0:0] = [
   '/opt/buildout-eggs/SQLAlchemy-0.6.0-py2.6.egg',
   ]
...

The problem is that sqlalchemy-migrate declares an install_requires 
dependency on "sqlalchemy", which the package is actually called SQLAlchemy.

It could be argued that sqlalchemy-migrate is "wrong" but it remains 
that all python's packaging tools appear case insensitive to package names.

As such, I'd expect buildout's version pinning to be case agnostic as 
well. What do other people feel about this?

Chris



More information about the Distutils-SIG mailing list