Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 103 lines (92 sloc) 4.328 kb
1d42481 @adrianholovaty Changed setup.py to use standard distutils instead of setuptools. This m...
adrianholovaty authored
1 from distutils.core import setup
f284745 @jacobian Fixed #7414: fixed setup.py on OSX 10.5. Thanks, ajs.
jacobian authored
2 from distutils.command.install_data import install_data
1d42481 @adrianholovaty Changed setup.py to use standard distutils instead of setuptools. This m...
adrianholovaty authored
3 from distutils.command.install import INSTALL_SCHEMES
4 import os
911f0cd @adrianholovaty Fixed #3203 -- Fixed setup.py bdist_wininst. Thanks for the patch, ymasu...
adrianholovaty authored
5 import sys
775f433 @adrianholovaty Moved django.bin.setup to root level and converted it to use setuptools....
adrianholovaty authored
6
f284745 @jacobian Fixed #7414: fixed setup.py on OSX 10.5. Thanks, ajs.
jacobian authored
7 class osx_install_data(install_data):
46c7941 @adrianholovaty Fixed badly worded comment in setup.py osx_install_data(). It's better b...
adrianholovaty authored
8 # On MacOS, the platform-specific lib dir is /System/Library/Framework/Python/.../
9 # which is wrong. Python 2.5 supplied with MacOS 10.5 has an Apple-specific fix
10 # for this in distutils.command.install_data#306. It fixes install_lib but not
f284745 @jacobian Fixed #7414: fixed setup.py on OSX 10.5. Thanks, ajs.
jacobian authored
11 # install_data, which is why we roll our own install_data class.
12
46c7941 @adrianholovaty Fixed badly worded comment in setup.py osx_install_data(). It's better b...
adrianholovaty authored
13 def finalize_options(self):
14 # By the time finalize_options is called, install.install_lib is set to the
15 # fixed directory, so we set the installdir to install_lib. The
f284745 @jacobian Fixed #7414: fixed setup.py on OSX 10.5. Thanks, ajs.
jacobian authored
16 # install_data class uses ('install_data', 'install_dir') instead.
17 self.set_undefined_options('install', ('install_lib', 'install_dir'))
18 install_data.finalize_options(self)
19
20 if sys.platform == "darwin":
46c7941 @adrianholovaty Fixed badly worded comment in setup.py osx_install_data(). It's better b...
adrianholovaty authored
21 cmdclasses = {'install_data': osx_install_data}
f284745 @jacobian Fixed #7414: fixed setup.py on OSX 10.5. Thanks, ajs.
jacobian authored
22 else:
46c7941 @adrianholovaty Fixed badly worded comment in setup.py osx_install_data(). It's better b...
adrianholovaty authored
23 cmdclasses = {'install_data': install_data}
f284745 @jacobian Fixed #7414: fixed setup.py on OSX 10.5. Thanks, ajs.
jacobian authored
24
b9d077c @malcolmt Fixed #3338, #3536, #3796 -- Fixed a bunch of setup and build problems i...
malcolmt authored
25 def fullsplit(path, result=None):
26 """
27 Split a pathname into components (the opposite of os.path.join) in a
28 platform-neutral way.
29 """
30 if result is None:
31 result = []
32 head, tail = os.path.split(path)
33 if head == '':
34 return [tail] + result
35 if head == path:
36 return result
37 return fullsplit(head, [tail] + result)
38
1d42481 @adrianholovaty Changed setup.py to use standard distutils instead of setuptools. This m...
adrianholovaty authored
39 # Tell distutils to put the data_files in platform-specific installation
40 # locations. See here for an explanation:
41 # http://groups.google.com/group/comp.lang.python/browse_thread/thread/35ec7b2fed36eaec/2105ee4d9e8042cb
42 for scheme in INSTALL_SCHEMES.values():
43 scheme['data'] = scheme['purelib']
44
45 # Compile the list of packages available, because distutils doesn't have
46 # an easy way to do this.
47 packages, data_files = [], []
a08ed9d @adrianholovaty Fixed #2989 -- easy_install now works with Django's setup.py. Thanks for...
adrianholovaty authored
48 root_dir = os.path.dirname(__file__)
dd2afd7 @malcolmt Changed setup.py to work no matter where it is called from. We were prev...
malcolmt authored
49 if root_dir != '':
50 os.chdir(root_dir)
51 django_dir = 'django'
a08ed9d @adrianholovaty Fixed #2989 -- easy_install now works with Django's setup.py. Thanks for...
adrianholovaty authored
52
53 for dirpath, dirnames, filenames in os.walk(django_dir):
1d42481 @adrianholovaty Changed setup.py to use standard distutils instead of setuptools. This m...
adrianholovaty authored
54 # Ignore dirnames that start with '.'
55 for i, dirname in enumerate(dirnames):
56 if dirname.startswith('.'): del dirnames[i]
57 if '__init__.py' in filenames:
dd2afd7 @malcolmt Changed setup.py to work no matter where it is called from. We were prev...
malcolmt authored
58 packages.append('.'.join(fullsplit(dirpath)))
b9d077c @malcolmt Fixed #3338, #3536, #3796 -- Fixed a bunch of setup and build problems i...
malcolmt authored
59 elif filenames:
911f0cd @adrianholovaty Fixed #3203 -- Fixed setup.py bdist_wininst. Thanks for the patch, ymasu...
adrianholovaty authored
60 data_files.append([dirpath, [os.path.join(dirpath, f) for f in filenames]])
61
e73bf2b @malcolmt Fixed #3203 (again!) -- Install data files in the right place on MS Wind...
malcolmt authored
62 # Small hack for working with bdist_wininst.
63 # See http://mail.python.org/pipermail/distutils-sig/2004-August/004134.html
64 if len(sys.argv) > 1 and sys.argv[1] == 'bdist_wininst':
65 for file_info in data_files:
66 file_info[0] = '\\PURELIB\\%s' % file_info[0]
67
49f6d06 @adrianholovaty Fixed #3117 -- Changed setup.py to get version from django.VERSION dynam...
adrianholovaty authored
68 # Dynamically calculate the version based on django.VERSION.
2d3712f @ubernostrum Change version calculation in setup.py to go with the new VERSION tuple
ubernostrum authored
69 version = __import__('django').get_version()
70 if u'SVN' in version:
71 version = ' '.join(version.split(' ')[:-1])
49f6d06 @adrianholovaty Fixed #3117 -- Changed setup.py to get version from django.VERSION dynam...
adrianholovaty authored
72
775f433 @adrianholovaty Moved django.bin.setup to root level and converted it to use setuptools....
adrianholovaty authored
73 setup(
b2424a3 @adrianholovaty Updated setup.py to include locales and *.TXT in package_data. Changed v...
adrianholovaty authored
74 name = "Django",
06f8932 @ubernostrum Ensure generated package name does not contain spaces; this will make Dj...
ubernostrum authored
75 version = version.replace(' ', '-'),
775f433 @adrianholovaty Moved django.bin.setup to root level and converted it to use setuptools....
adrianholovaty authored
76 url = 'http://www.djangoproject.com/',
04df702 @jacobian Updated LICENSE. Announcement forthcomming...
jacobian authored
77 author = 'Django Software Foundation',
78 author_email = 'foundation@djangoproject.com',
775f433 @adrianholovaty Moved django.bin.setup to root level and converted it to use setuptools....
adrianholovaty authored
79 description = 'A high-level Python Web framework that encourages rapid development and clean, pragmatic design.',
304a5e0 @ubernostrum [1.3.x] Bump version numbers to roll a clean package.
ubernostrum authored
80 download_url = 'https://www.djangoproject.com/m/releases/1.3/Django-1.3.7.tar.gz',
1d42481 @adrianholovaty Changed setup.py to use standard distutils instead of setuptools. This m...
adrianholovaty authored
81 packages = packages,
f284745 @jacobian Fixed #7414: fixed setup.py on OSX 10.5. Thanks, ajs.
jacobian authored
82 cmdclass = cmdclasses,
1d42481 @adrianholovaty Changed setup.py to use standard distutils instead of setuptools. This m...
adrianholovaty authored
83 data_files = data_files,
41c99f3 @adrianholovaty Changed setup.py author and added django-admin to distutils 'scripts'
adrianholovaty authored
84 scripts = ['django/bin/django-admin.py'],
7c08f4c @ubernostrum Bump everything for 1.3.
ubernostrum authored
85 classifiers = ['Development Status :: 5 - Production/Stable',
1b9bbb5 @ubernostrum Add trove classifiers to setup.py
ubernostrum authored
86 'Environment :: Web Environment',
87 'Framework :: Django',
88 'Intended Audience :: Developers',
89 'License :: OSI Approved :: BSD License',
90 'Operating System :: OS Independent',
91 'Programming Language :: Python',
4772adf @freakboy3742 Added trove classifiers for specific python versions. Thanks to Brett Ca...
freakboy3742 authored
92 'Programming Language :: Python :: 2.4',
93 'Programming Language :: Python :: 2.5',
94 'Programming Language :: Python :: 2.6',
95 'Programming Language :: Python :: 2.7',
1b9bbb5 @ubernostrum Add trove classifiers to setup.py
ubernostrum authored
96 'Topic :: Internet :: WWW/HTTP',
97 'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
98 'Topic :: Internet :: WWW/HTTP :: WSGI',
cb5e5dc @ubernostrum Add a trove classifier that I missed when I originally set these up.
ubernostrum authored
99 'Topic :: Software Development :: Libraries :: Application Frameworks',
1b9bbb5 @ubernostrum Add trove classifiers to setup.py
ubernostrum authored
100 'Topic :: Software Development :: Libraries :: Python Modules',
101 ],
775f433 @adrianholovaty Moved django.bin.setup to root level and converted it to use setuptools....
adrianholovaty authored
102 )
Something went wrong with that request. Please try again.