Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #2989 -- easy_install now works with Django's setup.py. Thanks …

…for reporting, __doc__

git-svn-id: http://code.djangoproject.com/svn/django/trunk@4114 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit a08ed9d165e04a43650740701b1c3737134d7271 1 parent 56ad38a
@adrianholovaty adrianholovaty authored
Showing with 7 additions and 3 deletions.
  1. +7 −3 setup.py
View
10 setup.py
@@ -11,13 +11,17 @@
# 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]))
Please sign in to comment.
Something went wrong with that request. Please try again.