diff options
author | Robin Munn <robin.munn@gmail.com> | 2006-12-08 15:10:09 +0000 |
---|---|---|
committer | Robin Munn <robin.munn@gmail.com> | 2006-12-08 15:10:09 +0000 |
commit | 122426e7453ed638a0c5be7e8b925adcddea3889 (patch) | |
tree | a095a661aca53e0ceee021d93a2a503783b71c14 /setup.py | |
parent | dadfca08c0db567ce33284aaa8eb388cf667a836 (diff) | |
download | django-122426e7453ed638a0c5be7e8b925adcddea3889.tar.gz |
sqlalchemy: Merged revisions 4054 to 4185 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/sqlalchemy@4186 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -11,13 +11,17 @@ for scheme in INSTALL_SCHEMES.values(): # Compile the list of packages available, because distutils doesn't have # an easy way to do this. packages, data_files = [], [] -root_dir = os.path.join(os.path.dirname(__file__), 'django') -for dirpath, dirnames, filenames in os.walk(root_dir): +root_dir = os.path.dirname(__file__) +len_root_dir = len(root_dir) +django_dir = os.path.join(root_dir, 'django') + +for dirpath, dirnames, filenames in os.walk(django_dir): # Ignore dirnames that start with '.' for i, dirname in enumerate(dirnames): if dirname.startswith('.'): del dirnames[i] if '__init__.py' in filenames: - packages.append(dirpath.replace('/', '.')) + package = dirpath[len_root_dir:].lstrip('/').replace('/', '.') + packages.append(package) else: data_files.append((dirpath, [os.path.join(dirpath, f) for f in filenames])) |