| 4 | | from setuptools import setup, find_packages |
|---|
| | 5 | # Tell distutils to put the data_files in platform-specific installation |
|---|
| | 6 | # locations. See here for an explanation: |
|---|
| | 7 | # http://groups.google.com/group/comp.lang.python/browse_thread/thread/35ec7b2fed36eaec/2105ee4d9e8042cb |
|---|
| | 8 | for scheme in INSTALL_SCHEMES.values(): |
|---|
| | 9 | scheme['data'] = scheme['purelib'] |
|---|
| | 10 | |
|---|
| | 11 | # Compile the list of packages available, because distutils doesn't have |
|---|
| | 12 | # an easy way to do this. |
|---|
| | 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): |
|---|
| | 16 | # Ignore dirnames that start with '.' |
|---|
| | 17 | for i, dirname in enumerate(dirnames): |
|---|
| | 18 | if dirname.startswith('.'): del dirnames[i] |
|---|
| | 19 | if '__init__.py' in filenames: |
|---|
| | 20 | packages.append(dirpath.replace('/', '.')) |
|---|
| | 21 | else: |
|---|
| | 22 | data_files.append((dirpath, [os.path.join(dirpath, f) for f in filenames])) |
|---|
| 13 | | license = 'BSD', |
|---|
| 14 | | packages = find_packages(exclude=['examples', 'examples.*']), |
|---|
| 15 | | package_data = { |
|---|
| 16 | | '': ['*.TXT'], |
|---|
| 17 | | 'django.conf': ['locale/*/LC_MESSAGES/*'], |
|---|
| 18 | | 'django.contrib.admin': ['templates/admin/*.html', |
|---|
| 19 | | 'templates/admin/auth/user/*.html', |
|---|
| 20 | | 'templates/admin_doc/*.html', |
|---|
| 21 | | 'templates/registration/*.html', |
|---|
| 22 | | 'templates/widget/*.html', |
|---|
| 23 | | 'media/css/*.css', |
|---|
| 24 | | 'media/img/admin/*.gif', |
|---|
| 25 | | 'media/img/admin/*.png', |
|---|
| 26 | | 'media/js/*.js', |
|---|
| 27 | | 'media/js/admin/*js'], |
|---|
| 28 | | 'django.contrib.comments': ['templates/comments/*.html'], |
|---|
| 29 | | 'django.contrib.sitemaps': ['templates/*.xml'], |
|---|
| 30 | | }, |
|---|
| | 31 | packages = packages, |
|---|
| | 32 | data_files = data_files, |
|---|