summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorJoseph Kocherhans <joseph@jkocherhans.com>2008-03-13 06:14:26 +0000
committerJoseph Kocherhans <joseph@jkocherhans.com>2008-03-13 06:14:26 +0000
commitbfc5660c472ac2e52cc4fdec78315c87b01357de (patch)
tree887c25472201f310cc5b95cb236cf5492af9bf57 /setup.py
parent304642769c5e0e704d0204bc241574c8c491cdf5 (diff)
newforms-admin: Merged from trunk up to [7232]
git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@7233 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/setup.py b/setup.py
index 61e0fd55e9..3cbfc55460 100644
--- a/setup.py
+++ b/setup.py
@@ -27,19 +27,16 @@ for scheme in INSTALL_SCHEMES.values():
# an easy way to do this.
packages, data_files = [], []
root_dir = os.path.dirname(__file__)
-django_dir = os.path.join(root_dir, 'django')
-pieces = fullsplit(root_dir)
-if pieces[-1] == '':
- len_root_dir = len(pieces) - 1
-else:
- len_root_dir = len(pieces)
+if root_dir != '':
+ os.chdir(root_dir)
+django_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('.'.join(fullsplit(dirpath)[len_root_dir:]))
+ packages.append('.'.join(fullsplit(dirpath)))
elif filenames:
data_files.append([dirpath, [os.path.join(dirpath, f) for f in filenames]])