Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Adrian Holovaty adrianholovaty authored

Showing 1 changed file with 7 additions and 3 deletions. Show diff stats Hide diff stats

  1. +7 3 setup.py
10 setup.py
@@ -11,13 +11,17 @@
11 11 # Compile the list of packages available, because distutils doesn't have
12 12 # an easy way to do this.
13 13 packages, data_files = [], []
14   -root_dir = os.path.join(os.path.dirname(__file__), 'django')
15   -for dirpath, dirnames, filenames in os.walk(root_dir):
  14 +root_dir = os.path.dirname(__file__)
  15 +len_root_dir = len(root_dir)
  16 +django_dir = os.path.join(root_dir, 'django')
  17 +
  18 +for dirpath, dirnames, filenames in os.walk(django_dir):
16 19 # Ignore dirnames that start with '.'
17 20 for i, dirname in enumerate(dirnames):
18 21 if dirname.startswith('.'): del dirnames[i]
19 22 if '__init__.py' in filenames:
20   - packages.append(dirpath.replace('/', '.'))
  23 + package = dirpath[len_root_dir:].lstrip('/').replace('/', '.')
  24 + packages.append(package)
21 25 else:
22 26 data_files.append((dirpath, [os.path.join(dirpath, f) for f in filenames]))
23 27

0 comments on commit a08ed9d

Please sign in to comment.
Something went wrong with that request. Please try again.