setup.py
changeset 2036 2d9e7b936ee1
parent 2020 143c8e4dc22d
child 2049 b81d3775006b
equal deleted inserted replaced
2035:94fe2cc9cd41 2036:2d9e7b936ee1
     7     for line in open(join(dirname(__file__), relpath), 'rb'):
     7     for line in open(join(dirname(__file__), relpath), 'rb'):
     8         # Decode to a fail-safe string for PY3
     8         # Decode to a fail-safe string for PY3
     9         # (gives unicode object in PY2)
     9         # (gives unicode object in PY2)
    10         line = line.decode('utf8')
    10         line = line.decode('utf8')
    11         if '__version__' in line:
    11         if '__version__' in line:
    12           if "'" in line:
    12             if "'" in line:
    13             return line.split("'")[1]
    13                 return line.split("'")[1]
    14 
    14 
    15 def min_hg_version(relpath):
    15 def min_hg_version(relpath):
    16     '''Read version info from a file without importing it'''
    16     '''Read version info from a file without importing it'''
    17     for line in open(join(dirname(__file__), relpath), 'rb'):
    17     for line in open(join(dirname(__file__), relpath), 'rb'):
    18         # Decode to a fail-safe string for PY3
    18         # Decode to a fail-safe string for PY3
    19         # (gives unicode object in PY2)
    19         # (gives unicode object in PY2)
    20         line = line.decode('utf8')
    20         line = line.decode('utf8')
    21         if 'testedwith' in line:
    21         if 'testedwith' in line:
    22           if "'" in line:
    22             if "'" in line:
    23             return min(line.split("'")[1].split())
    23                 return min(line.split("'")[1].split())
    24 
    24 
    25 py_modules = [
    25 py_modules = [
    26     'hgext3rd.evolve.serveronly',
    26     'hgext3rd.evolve.serveronly',
    27 ]
    27 ]
    28 py_packages = [
    28 py_packages = [