setup.py
branchstable
changeset 33587 e0bbe32d8b55
parent 33119 176030f695ca
child 33588 025017423e53
equal deleted inserted replaced
33586:b7304e1cc914 33587:e0bbe32d8b55
     1 #
     1 #
     2 # This is the mercurial setup script.
     2 # This is the mercurial setup script.
     3 #
     3 #
     4 # 'python setup.py install', or
     4 # 'python setup.py install', or
     5 # 'python setup.py --help' for more options
     5 # 'python setup.py --help' for more options
       
     6 
       
     7 supportedpy = '~= 2.7'
       
     8 if 'HGALLOWPYTHON3':
       
     9     # Mercurial will never work on Python 3 before 3.5 due to a lack
       
    10     # of % formatting on bytestrings, and can't work on 3.6.0 or 3.6.1
       
    11     # due to a bug in % formatting in bytestrings.
       
    12     #
       
    13     # TODO: when we actually work on Python 3, use this string as the
       
    14     # actual supportedpy string.
       
    15     supportedpy = ','.join([
       
    16         '>=2.7',
       
    17         '!=3.0.*',
       
    18         '!=3.1.*',
       
    19         '!=3.2.*',
       
    20         '!=3.3.*',
       
    21         '!=3.4.*',
       
    22         '!=3.6.0',
       
    23         '!=3.6.1',
       
    24     ])
     6 
    25 
     7 import sys, platform
    26 import sys, platform
     8 if sys.version_info < (2, 7, 0, 'final'):
    27 if sys.version_info < (2, 7, 0, 'final'):
     9     raise SystemExit('Mercurial requires Python 2.7 or later.')
    28     raise SystemExit('Mercurial requires Python 2.7 or later.')
    10 
    29 
   890                               'license': 'COPYING',
   909                               'license': 'COPYING',
   891                               'readme': 'contrib/macosx/Readme.html',
   910                               'readme': 'contrib/macosx/Readme.html',
   892                               'welcome': 'contrib/macosx/Welcome.html',
   911                               'welcome': 'contrib/macosx/Welcome.html',
   893                               },
   912                               },
   894                },
   913                },
       
   914       python_requires=supportedpy,
   895       **extra)
   915       **extra)