644 @check("demandimport", "demandimport enabled") |
644 @check("demandimport", "demandimport enabled") |
645 def has_demandimport(): |
645 def has_demandimport(): |
646 # chg disables demandimport intentionally for performance wins. |
646 # chg disables demandimport intentionally for performance wins. |
647 return ((not has_chg()) and os.environ.get('HGDEMANDIMPORT') != 'disable') |
647 return ((not has_chg()) and os.environ.get('HGDEMANDIMPORT') != 'disable') |
648 |
648 |
|
649 @checkvers("py", "Python >= %s", (2.7, 3.5, 3.6, 3.7, 3.8, 3.9)) |
|
650 def has_python_range(v): |
|
651 major, minor = v.split('.')[0:2] |
|
652 py_major, py_minor = sys.version_info.major, sys.version_info.minor |
|
653 |
|
654 return (py_major, py_minor) >= (int(major), int(minor)) |
|
655 |
649 @check("py3", "running with Python 3.x") |
656 @check("py3", "running with Python 3.x") |
650 def has_py3(): |
657 def has_py3(): |
651 return 3 == sys.version_info[0] |
658 return 3 == sys.version_info[0] |
652 |
659 |
653 @check("py3exe", "a Python 3.x interpreter is available") |
660 @check("py3exe", "a Python 3.x interpreter is available") |