Ticket #18055: version-check.diff

File version-check.diff, 1.2 KB (added by Preston Holmes, 13 years ago)
  • django/__init__.py

    diff --git a/django/__init__.py b/django/__init__.py
    index 20ca234..f0bb00e 100644
    a b  
     1import sys
     2
    13VERSION = (1, 5, 0, 'alpha', 0)
    24
     5# Don't forget to also update setup.py when this changes!
     6if sys.version[0:3] < '2.6':
     7    raise ImportError('Python Version 2.6 or above is required for Django.')
     8
    39def get_version(version=None):
    410    """Derives a PEP386-compliant version number from VERSION."""
    511    if version is None:
  • setup.py

    diff --git a/setup.py b/setup.py
    index a19f660..8c99d7a 100644
    a b from distutils.command.install import INSTALL_SCHEMES  
    44import os
    55import sys
    66
     7# This check is also made in Django/__init__, don't forget to update both when
     8# changing Python version requirements.
     9if sys.version[0:3] < '2.6':
     10    error = """\
     11ERROR: 'Django requires Python Version 2.6 or above.'
     12Exiting."""
     13    print >> sys.stderr, error
     14    sys.exit(1)
     15
    716class osx_install_data(install_data):
    817    # On MacOS, the platform-specific lib dir is /System/Library/Framework/Python/.../
    918    # which is wrong. Python 2.5 supplied with MacOS 10.5 has an Apple-specific fix
Back to Top