Ticket #2989: setup.py.diff
File setup.py.diff, 921 bytes (added by , 18 years ago) |
---|
-
setup.py
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 package_dir = os.path.dirname(__file__) 14 15 root_dir = os.path.join(os.path.dirname(__file__), 'django') 15 16 for dirpath, dirnames, filenames in os.walk(root_dir): 16 17 # Ignore dirnames that start with '.' 17 18 for i, dirname in enumerate(dirnames): 18 19 if dirname.startswith('.'): del dirnames[i] 19 20 if '__init__.py' in filenames: 20 packages.append(dirpath.replace('/', '.')) 21 package_path = dirpath[len(package_dir):].strip('/') 22 packages.append(package_path.replace('/', '.')) 21 23 else: 22 24 data_files.append((dirpath, [os.path.join(dirpath, f) for f in filenames]))