Ticket #9481: 0001-Modify-calculation-of-version-in-setup.py-to-work-wi.patch

File 0001-Modify-calculation-of-version-in-setup.py-to-work-wi.patch, 878 bytes (added by Jason F. McBrayer <jmcbray@…>, 16 years ago)

Patch to generate version strings that bdist_rpm can use.

  • setup.py

    From c38e6df658334037ca5d8c4be2b7c1a053de6df6 Mon Sep 17 00:00:00 2001
    From: Jason McBrayer <jmcbray@carcosa.net>
    Date: Thu, 30 Oct 2008 22:40:59 -0400
    Subject: [PATCH] Modify calculation of version in setup.py to work with bdist_rpm
    
    ---
     setup.py |    4 ++--
     1 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/setup.py b/setup.py
    index 2f65cfa..2bee2ef 100644
    a b if len(sys.argv) > 1 and sys.argv[1] == 'bdist_wininst':  
    6666        file_info[0] = '\\PURELIB\\%s' % file_info[0]
    6767
    6868# Dynamically calculate the version based on django.VERSION.
    69 version = __import__('django').get_version()
     69version = "_".join(__import__('django').get_version().split(' '))
    7070if u'SVN' in version:
    71     version = ' '.join(version.split(' ')[:-1])
     71    version = '_'.join(version.split('_')[:-1])
    7272
    7373setup(
    7474    name = "Django",
Back to Top