Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 136 lines (119 sloc) 5.321 kb
1d424817 » adrianholovaty
2006-10-16 Changed setup.py to use standard distutils instead of setuptools. Thi…
1 from distutils.core import setup
f2847454 » jacobian
2008-07-21 Fixed #7414: fixed setup.py on OSX 10.5. Thanks, ajs.
2 from distutils.command.install_data import install_data
1d424817 » adrianholovaty
2006-10-16 Changed setup.py to use standard distutils instead of setuptools. Thi…
3 from distutils.command.install import INSTALL_SCHEMES
6ed7d407 » carljm
2012-05-21 Fixed #18115 - added warning about overlaid install.
4 from distutils.sysconfig import get_python_lib
1d424817 » adrianholovaty
2006-10-16 Changed setup.py to use standard distutils instead of setuptools. Thi…
5 import os
911f0cdf » adrianholovaty
2006-12-30 Fixed #3203 -- Fixed setup.py bdist_wininst. Thanks for the patch, ym…
6 import sys
775f4339 » adrianholovaty
2005-07-15 Moved django.bin.setup to root level and converted it to use setuptoo…
7
6ed7d407 » carljm
2012-05-21 Fixed #18115 - added warning about overlaid install.
8 # Warn if we are installing over top of an existing installation. This can
9 # cause issues where files that were deleted from a more recent Django are
10 # still present in site-packages. See #18115.
11 overlay_warning = False
12 if "install" in sys.argv:
13 # We have to try also with an explicit prefix of /usr/local in order to
14 # catch Debian's custom user site-packages directory.
15 for lib_path in get_python_lib(), get_python_lib(prefix="/usr/local"):
16 existing_path = os.path.abspath(os.path.join(lib_path, "django"))
17 if os.path.exists(existing_path):
18 # We note the need for the warning here, but present it after the
19 # command is run, so it's more likely to be seen.
20 overlay_warning = True
21 break
22
f2847454 » jacobian
2008-07-21 Fixed #7414: fixed setup.py on OSX 10.5. Thanks, ajs.
23 class osx_install_data(install_data):
46c7941d » adrianholovaty
2008-07-22 Fixed badly worded comment in setup.py osx_install_data(). It's bette…
24 # On MacOS, the platform-specific lib dir is /System/Library/Framework/Python/.../
25 # which is wrong. Python 2.5 supplied with MacOS 10.5 has an Apple-specific fix
26 # for this in distutils.command.install_data#306. It fixes install_lib but not
f2847454 » jacobian
2008-07-21 Fixed #7414: fixed setup.py on OSX 10.5. Thanks, ajs.
27 # install_data, which is why we roll our own install_data class.
28
46c7941d » adrianholovaty
2008-07-22 Fixed badly worded comment in setup.py osx_install_data(). It's bette…
29 def finalize_options(self):
30 # By the time finalize_options is called, install.install_lib is set to the
31 # fixed directory, so we set the installdir to install_lib. The
f2847454 » jacobian
2008-07-21 Fixed #7414: fixed setup.py on OSX 10.5. Thanks, ajs.
32 # install_data class uses ('install_data', 'install_dir') instead.
33 self.set_undefined_options('install', ('install_lib', 'install_dir'))
34 install_data.finalize_options(self)
35
f4600355 » aaugustin
2012-01-07 Fixed #17491 -- Honored the version number format expected by distuti…
36 if sys.platform == "darwin":
37 cmdclasses = {'install_data': osx_install_data}
38 else:
39 cmdclasses = {'install_data': install_data}
f2847454 » jacobian
2008-07-21 Fixed #7414: fixed setup.py on OSX 10.5. Thanks, ajs.
40
b9d077c1 » malcolmt
2007-04-03 Fixed #3338, #3536, #3796 -- Fixed a bunch of setup and build problem…
41 def fullsplit(path, result=None):
42 """
43 Split a pathname into components (the opposite of os.path.join) in a
44 platform-neutral way.
45 """
46 if result is None:
47 result = []
48 head, tail = os.path.split(path)
49 if head == '':
50 return [tail] + result
51 if head == path:
52 return result
53 return fullsplit(head, [tail] + result)
54
6b48b885 » aaugustin
2012-03-05 Fixed #17832 -- Missing negation in a comment. Thanks mk for the report.
55 # Tell distutils not to put the data_files in platform-specific installation
1d424817 » adrianholovaty
2006-10-16 Changed setup.py to use standard distutils instead of setuptools. Thi…
56 # locations. See here for an explanation:
57 # http://groups.google.com/group/comp.lang.python/browse_thread/thread/35ec7b2fed36eaec/2105ee4d9e8042cb
58 for scheme in INSTALL_SCHEMES.values():
59 scheme['data'] = scheme['purelib']
60
61 # Compile the list of packages available, because distutils doesn't have
62 # an easy way to do this.
63 packages, data_files = [], []
a08ed9d1 » adrianholovaty
2006-11-27 Fixed #2989 -- easy_install now works with Django's setup.py. Thanks …
64 root_dir = os.path.dirname(__file__)
dd2afd71 » malcolmt
2008-02-21 Changed setup.py to work no matter where it is called from. We were p…
65 if root_dir != '':
66 os.chdir(root_dir)
67 django_dir = 'django'
a08ed9d1 » adrianholovaty
2006-11-27 Fixed #2989 -- easy_install now works with Django's setup.py. Thanks …
68
69 for dirpath, dirnames, filenames in os.walk(django_dir):
2100da9d » ramiro
2012-10-06 Ensure we ignore __pycache__ PEP 3174 dirs in a few more places.
70 # Ignore PEP 3147 cache dirs and those whose names start with '.'
1d424817 » adrianholovaty
2006-10-16 Changed setup.py to use standard distutils instead of setuptools. Thi…
71 for i, dirname in enumerate(dirnames):
2100da9d » ramiro
2012-10-06 Ensure we ignore __pycache__ PEP 3174 dirs in a few more places.
72 if dirname.startswith('.') or dirname == '__pycache__':
73 del dirnames[i]
1d424817 » adrianholovaty
2006-10-16 Changed setup.py to use standard distutils instead of setuptools. Thi…
74 if '__init__.py' in filenames:
dd2afd71 » malcolmt
2008-02-21 Changed setup.py to work no matter where it is called from. We were p…
75 packages.append('.'.join(fullsplit(dirpath)))
b9d077c1 » malcolmt
2007-04-03 Fixed #3338, #3536, #3796 -- Fixed a bunch of setup and build problem…
76 elif filenames:
911f0cdf » adrianholovaty
2006-12-30 Fixed #3203 -- Fixed setup.py bdist_wininst. Thanks for the patch, ym…
77 data_files.append([dirpath, [os.path.join(dirpath, f) for f in filenames]])
78
e73bf2bd » malcolmt
2008-08-12 Fixed #3203 (again!) -- Install data files in the right place on MS W…
79 # Small hack for working with bdist_wininst.
80 # See http://mail.python.org/pipermail/distutils-sig/2004-August/004134.html
81 if len(sys.argv) > 1 and sys.argv[1] == 'bdist_wininst':
82 for file_info in data_files:
83 file_info[0] = '\\PURELIB\\%s' % file_info[0]
84
49f6d06c » adrianholovaty
2006-12-13 Fixed #3117 -- Changed setup.py to get version from django.VERSION dy…
85 # Dynamically calculate the version based on django.VERSION.
40f0ecc5 » aaugustin
2012-01-08 Implemented PEP386-compatible version numbers. Thanks Jannis for the …
86 version = __import__('django').get_version()
49f6d06c » adrianholovaty
2006-12-13 Fixed #3117 -- Changed setup.py to get version from django.VERSION dy…
87
775f4339 » adrianholovaty
2005-07-15 Moved django.bin.setup to root level and converted it to use setuptoo…
88 setup(
b2424a39 » adrianholovaty
2005-11-16 Updated setup.py to include locales and *.TXT in package_data. Change…
89 name = "Django",
f4600355 » aaugustin
2012-01-07 Fixed #17491 -- Honored the version number format expected by distuti…
90 version = version,
775f4339 » adrianholovaty
2005-07-15 Moved django.bin.setup to root level and converted it to use setuptoo…
91 url = 'http://www.djangoproject.com/',
04df7022 » jacobian
2008-06-17 Updated LICENSE. Announcement forthcomming...
92 author = 'Django Software Foundation',
93 author_email = 'foundation@djangoproject.com',
775f4339 » adrianholovaty
2005-07-15 Moved django.bin.setup to root level and converted it to use setuptoo…
94 description = 'A high-level Python Web framework that encourages rapid development and clean, pragmatic design.',
2591fb8d » ubernostrum
2012-03-23 Bump trunk to 1.4.
95 download_url = 'https://www.djangoproject.com/m/releases/1.4/Django-1.4.tar.gz',
1d424817 » adrianholovaty
2006-10-16 Changed setup.py to use standard distutils instead of setuptools. Thi…
96 packages = packages,
f2847454 » jacobian
2008-07-21 Fixed #7414: fixed setup.py on OSX 10.5. Thanks, ajs.
97 cmdclass = cmdclasses,
1d424817 » adrianholovaty
2006-10-16 Changed setup.py to use standard distutils instead of setuptools. Thi…
98 data_files = data_files,
41c99f35 » adrianholovaty
2005-07-15 Changed setup.py author and added django-admin to distutils 'scripts'
99 scripts = ['django/bin/django-admin.py'],
3d5a8f75 » adrianholovaty
2011-03-28 Changed setup.py classifiers to use a better indentation style
100 classifiers = [
2591fb8d » ubernostrum
2012-03-23 Bump trunk to 1.4.
101 'Development Status :: 5 - Production/Stable',
3d5a8f75 » adrianholovaty
2011-03-28 Changed setup.py classifiers to use a better indentation style
102 'Environment :: Web Environment',
103 'Framework :: Django',
104 'Intended Audience :: Developers',
105 'License :: OSI Approved :: BSD License',
106 'Operating System :: OS Independent',
107 'Programming Language :: Python',
108 'Programming Language :: Python :: 2.6',
109 'Programming Language :: Python :: 2.7',
110 'Topic :: Internet :: WWW/HTTP',
111 'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
112 'Topic :: Internet :: WWW/HTTP :: WSGI',
113 'Topic :: Software Development :: Libraries :: Application Frameworks',
114 'Topic :: Software Development :: Libraries :: Python Modules',
115 ],
775f4339 » adrianholovaty
2005-07-15 Moved django.bin.setup to root level and converted it to use setuptoo…
116 )
6ed7d407 » carljm
2012-05-21 Fixed #18115 - added warning about overlaid install.
117
118 if overlay_warning:
119 sys.stderr.write("""
120
121 ========
122 WARNING!
123 ========
124
125 You have just installed Django over top of an existing
126 installation, without removing it first. Because of this,
127 your install may now include extraneous files from a
128 previous version that have since been removed from
129 Django. This is known to cause a variety of problems. You
130 should manually remove the
131
132 %(existing_path)s
133
134 directory and re-install Django.
135
136 """ % { "existing_path": existing_path })
Something went wrong with that request. Please try again.