##// END OF EJS Templates
hghave: document format for version feature checks as <name><vers>, no dots...
Kyle Lippincott -
r43383:37af4803 default
parent child Browse files
Show More
@@ -60,7 +60,11 b' def check(name, desc):'
60 def checkvers(name, desc, vers):
60 def checkvers(name, desc, vers):
61 """Registers a check function for each of a series of versions.
61 """Registers a check function for each of a series of versions.
62
62
63 vers can be a list or an iterator"""
63 vers can be a list or an iterator.
64
65 Produces a series of feature checks that have the form <name><vers> without
66 any punctuation (even if there's punctuation in 'vers'; i.e. this produces
67 'py38', not 'py3.8' or 'py-38')."""
64
68
65 def decorator(func):
69 def decorator(func):
66 def funcv(v):
70 def funcv(v):
@@ -757,6 +761,8 b' def has_demandimport():'
757 return (not has_chg()) and os.environ.get('HGDEMANDIMPORT') != 'disable'
761 return (not has_chg()) and os.environ.get('HGDEMANDIMPORT') != 'disable'
758
762
759
763
764 # Add "py27", "py35", ... as possible feature checks. Note that there's no
765 # punctuation here.
760 @checkvers("py", "Python >= %s", (2.7, 3.5, 3.6, 3.7, 3.8, 3.9))
766 @checkvers("py", "Python >= %s", (2.7, 3.5, 3.6, 3.7, 3.8, 3.9))
761 def has_python_range(v):
767 def has_python_range(v):
762 major, minor = v.split('.')[0:2]
768 major, minor = v.split('.')[0:2]
General Comments 0
You need to be logged in to leave comments. Login now