diff options
| author | Jason Pellerin <jpellerin@gmail.com> | 2006-12-04 21:12:29 +0000 |
|---|---|---|
| committer | Jason Pellerin <jpellerin@gmail.com> | 2006-12-04 21:12:29 +0000 |
| commit | 55d7f6519c8d13a685cff3f9873b5784fc511a87 (patch) | |
| tree | 60fb20e60dbf1f2505cce84f6807f6cdde40e261 /setup.py | |
| parent | 0162eac9e2cd317476dd4086c36caf138c96f6bc (diff) | |
[multi-db] Merged trunk to [4158]. Some tests still failing.
git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@4159 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])) |
