mirror of https://github.com/django/django.git
Fixed #3203 -- Fixed setup.py bdist_wininst. Thanks for the patch, ymasuda
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4264 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
5a01f848ca
commit
911f0cdf18
9
setup.py
9
setup.py
|
@ -1,6 +1,7 @@
|
||||||
from distutils.core import setup
|
from distutils.core import setup
|
||||||
from distutils.command.install import INSTALL_SCHEMES
|
from distutils.command.install import INSTALL_SCHEMES
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
# Tell distutils to put the data_files in platform-specific installation
|
# Tell distutils to put the data_files in platform-specific installation
|
||||||
# locations. See here for an explanation:
|
# locations. See here for an explanation:
|
||||||
|
@ -23,7 +24,13 @@ for dirpath, dirnames, filenames in os.walk(django_dir):
|
||||||
package = dirpath[len_root_dir:].lstrip('/').replace('/', '.')
|
package = dirpath[len_root_dir:].lstrip('/').replace('/', '.')
|
||||||
packages.append(package)
|
packages.append(package)
|
||||||
else:
|
else:
|
||||||
data_files.append((dirpath, [os.path.join(dirpath, f) for f in filenames]))
|
data_files.append([dirpath, [os.path.join(dirpath, f) for f in filenames]])
|
||||||
|
|
||||||
|
# Small hack for working with bdist_wininst.
|
||||||
|
# See http://mail.python.org/pipermail/distutils-sig/2004-August/004134.html
|
||||||
|
if sys.argv[1] == 'bdist_wininst':
|
||||||
|
for file_info in data_files:
|
||||||
|
file_info[0] = '/PURELIB/%s' % file_info[0]
|
||||||
|
|
||||||
# Dynamically calculate the version based on django.VERSION.
|
# Dynamically calculate the version based on django.VERSION.
|
||||||
version = "%d.%d-%s" % (__import__('django').VERSION)
|
version = "%d.%d-%s" % (__import__('django').VERSION)
|
||||||
|
|
Loading…
Reference in New Issue