Changeset 7152 for django/branches/queryset-refactor/setup.py
- Timestamp:
- 02/23/08 03:26:11 (10 months ago)
- Files:
-
- django/branches/queryset-refactor/setup.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/queryset-refactor/setup.py
r5876 r7152 28 28 packages, data_files = [], [] 29 29 root_dir = os.path.dirname(__file__) 30 django_dir = os.path.join(root_dir, 'django') 31 pieces = fullsplit(root_dir) 32 if pieces[-1] == '': 33 len_root_dir = len(pieces) - 1 34 else: 35 len_root_dir = len(pieces) 30 if root_dir != '': 31 os.chdir(root_dir) 32 django_dir = 'django' 36 33 37 34 for dirpath, dirnames, filenames in os.walk(django_dir): … … 40 37 if dirname.startswith('.'): del dirnames[i] 41 38 if '__init__.py' in filenames: 42 packages.append('.'.join(fullsplit(dirpath) [len_root_dir:]))39 packages.append('.'.join(fullsplit(dirpath))) 43 40 elif filenames: 44 41 data_files.append([dirpath, [os.path.join(dirpath, f) for f in filenames]])
