##// END OF EJS Templates
hghave: add pyXY features for Python version numbers...
Gregory Szorc -
r41488:1a6a01a2 default
parent child Browse files
Show More
@@ -646,6 +646,13 b' 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]
General Comments 0
You need to be logged in to leave comments. Login now