Skip to content
Newer
Older
100644 49 lines (42 sloc) 1.79 KB
0b059aa sqlalchemy: Merged revisions 3832 to 3917 from trunk.
Robin Munn authored Oct 24, 2006
1 from distutils.core import setup
2 from distutils.command.install import INSTALL_SCHEMES
3 import os
fe361e6 Merged revisions 4186 to 4454 from trunk.
Robin Munn authored Jan 31, 2007
4 import sys
775f433 @adrianholovaty Moved django.bin.setup to root level and converted it to use setuptoo…
adrianholovaty authored Jul 15, 2005
5
0b059aa sqlalchemy: Merged revisions 3832 to 3917 from trunk.
Robin Munn authored Oct 24, 2006
6 # Tell distutils to put the data_files in platform-specific installation
7 # locations. See here for an explanation:
8 # http://groups.google.com/group/comp.lang.python/browse_thread/thread/35ec7b2fed36eaec/2105ee4d9e8042cb
9 for scheme in INSTALL_SCHEMES.values():
10 scheme['data'] = scheme['purelib']
11
12 # Compile the list of packages available, because distutils doesn't have
13 # an easy way to do this.
14 packages, data_files = [], []
122426e sqlalchemy: Merged revisions 4054 to 4185 from trunk.
Robin Munn authored Dec 8, 2006
15 root_dir = os.path.dirname(__file__)
16 len_root_dir = len(root_dir)
17 django_dir = os.path.join(root_dir, 'django')
18
19 for dirpath, dirnames, filenames in os.walk(django_dir):
0b059aa sqlalchemy: Merged revisions 3832 to 3917 from trunk.
Robin Munn authored Oct 24, 2006
20 # Ignore dirnames that start with '.'
21 for i, dirname in enumerate(dirnames):
22 if dirname.startswith('.'): del dirnames[i]
23 if '__init__.py' in filenames:
122426e sqlalchemy: Merged revisions 4054 to 4185 from trunk.
Robin Munn authored Dec 8, 2006
24 package = dirpath[len_root_dir:].lstrip('/').replace('/', '.')
25 packages.append(package)
0b059aa sqlalchemy: Merged revisions 3832 to 3917 from trunk.
Robin Munn authored Oct 24, 2006
26 else:
fe361e6 Merged revisions 4186 to 4454 from trunk.
Robin Munn authored Jan 31, 2007
27 data_files.append([dirpath, [os.path.join(dirpath, f) for f in filenames]])
28
29 # Small hack for working with bdist_wininst.
30 # See http://mail.python.org/pipermail/distutils-sig/2004-August/004134.html
31 if sys.argv[1] == 'bdist_wininst':
32 for file_info in data_files:
33 file_info[0] = '/PURELIB/%s' % file_info[0]
34
35 # Dynamically calculate the version based on django.VERSION.
36 version = "%d.%d-%s" % (__import__('django').VERSION)
775f433 @adrianholovaty Moved django.bin.setup to root level and converted it to use setuptoo…
adrianholovaty authored Jul 15, 2005
37
38 setup(
b2424a3 @adrianholovaty Updated setup.py to include locales and *.TXT in package_data. Change…
adrianholovaty authored Nov 16, 2005
39 name = "Django",
fe361e6 Merged revisions 4186 to 4454 from trunk.
Robin Munn authored Jan 31, 2007
40 version = version,
775f433 @adrianholovaty Moved django.bin.setup to root level and converted it to use setuptoo…
adrianholovaty authored Jul 15, 2005
41 url = 'http://www.djangoproject.com/',
41c99f3 @adrianholovaty Changed setup.py author and added django-admin to distutils 'scripts'
adrianholovaty authored Jul 15, 2005
42 author = 'Lawrence Journal-World',
775f433 @adrianholovaty Moved django.bin.setup to root level and converted it to use setuptoo…
adrianholovaty authored Jul 15, 2005
43 author_email = 'holovaty@gmail.com',
44 description = 'A high-level Python Web framework that encourages rapid development and clean, pragmatic design.',
0b059aa sqlalchemy: Merged revisions 3832 to 3917 from trunk.
Robin Munn authored Oct 24, 2006
45 packages = packages,
46 data_files = data_files,
41c99f3 @adrianholovaty Changed setup.py author and added django-admin to distutils 'scripts'
adrianholovaty authored Jul 15, 2005
47 scripts = ['django/bin/django-admin.py'],
775f433 @adrianholovaty Moved django.bin.setup to root level and converted it to use setuptoo…
adrianholovaty authored Jul 15, 2005
48 )
Something went wrong with that request. Please try again.