Django

Code

Ticket #3203: setup.diff

File setup.diff, 0.7 kB (added by kmtracey, 5 months ago)

Don't try to read args that might not be there

  • setup.py

    old new  
    5959    elif filenames: 
    6060        data_files.append([dirpath, [os.path.join(dirpath, f) for f in filenames]]) 
    6161 
     62# Small hack for working with bdist_wininst. 
     63# See http://mail.python.org/pipermail/distutils-sig/2004-August/004134.html 
     64if 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 
    6268# Dynamically calculate the version based on django.VERSION. 
    6369version_tuple = __import__('django').VERSION 
    6470if version_tuple[2] is not None: