Ticket #3203: bdist_wininst_fix.diff
File bdist_wininst_fix.diff, 1.1 KB (added by , 18 years ago) |
---|
-
setup.py
1 1 from distutils.core import setup 2 2 from distutils.command.install import INSTALL_SCHEMES 3 import os 3 import os, sys 4 4 5 5 # Tell distutils to put the data_files in platform-specific installation 6 6 # locations. See here for an explanation: … … 23 23 package = dirpath[len_root_dir:].lstrip('/').replace('/', '.') 24 24 packages.append(package) 25 25 else: 26 data_files.append( (dirpath, [os.path.join(dirpath, f) for f in filenames]))26 data_files.append([dirpath, [os.path.join(dirpath, f) for f in filenames]]) 27 27 28 # Small hack for working with bdist_wininst. Borrowed from: 29 # http://mail.python.org/pipermail/distutils-sig/2004-August/004134.html 30 if sys.argv[1] == 'bdist_wininst': 31 for fileInfo in data_files: 32 fileInfo[0] = '/PURELIB/%s' % fileInfo[0] 33 28 34 # Dynamically calculate the version based on django.VERSION. 29 35 version = "%d.%d-%s" % (__import__('django').VERSION) 30 36