Ticket #6562: 6562.diff
File 6562.diff, 967 bytes (added by , 17 years ago) |
---|
-
setup.py
27 27 # an easy way to do this. 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): 38 35 # Ignore dirnames that start with '.' 39 36 for i, dirname in enumerate(dirnames): 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]]) 45 42