##// END OF EJS Templates
test-check-py3-compat: don't run py3 part if not build against python3...
Yuya Nishihara -
r39439:ecbab8be default
parent child Browse files
Show More
@@ -633,16 +633,6 b' def has_py3k():'
633 def has_python3exe():
633 def has_python3exe():
634 return matchoutput('python3 -V', br'^Python 3.(5|6|7|8|9)')
634 return matchoutput('python3 -V', br'^Python 3.(5|6|7|8|9)')
635
635
636 @check("py3pygments", "Pygments available on Python 3.x")
637 def has_py3pygments():
638 if has_py3k():
639 return has_pygments()
640 elif has_python3exe():
641 # just check exit status (ignoring output)
642 py3 = os.environ['PYTHON3']
643 return matchoutput('%s -c "import pygments"' % py3, br'')
644 return False
645
646 @check("pure", "running with pure Python code")
636 @check("pure", "running with pure Python code")
647 def has_pure():
637 def has_pure():
648 return any([
638 return any([
@@ -24,13 +24,13 b''
24 setup.py not using absolute_import
24 setup.py not using absolute_import
25 #endif
25 #endif
26
26
27 #if py3exe
27 #if py3k
28 $ testrepohg files 'set:(**.py) - grep(pygments)' \
28 $ testrepohg files 'set:(**.py) - grep(pygments)' \
29 > -X hgdemandimport/demandimportpy2.py \
29 > -X hgdemandimport/demandimportpy2.py \
30 > -X hgext/fsmonitor/pywatchman \
30 > -X hgext/fsmonitor/pywatchman \
31 > -X mercurial/cffi \
31 > -X mercurial/cffi \
32 > -X mercurial/thirdparty \
32 > -X mercurial/thirdparty \
33 > | sed 's|\\|/|g' | xargs python3 contrib/check-py3-compat.py \
33 > | sed 's|\\|/|g' | xargs $PYTHON contrib/check-py3-compat.py \
34 > | sed 's/[0-9][0-9]*)$/*)/'
34 > | sed 's/[0-9][0-9]*)$/*)/'
35 hgext/convert/transport.py: error importing: <*Error> No module named 'svn.client' (error at transport.py:*) (glob) (?)
35 hgext/convert/transport.py: error importing: <*Error> No module named 'svn.client' (error at transport.py:*) (glob) (?)
36 hgext/infinitepush/sqlindexapi.py: error importing: <*Error> No module named 'mysql' (error at sqlindexapi.py:*) (glob) (?)
36 hgext/infinitepush/sqlindexapi.py: error importing: <*Error> No module named 'mysql' (error at sqlindexapi.py:*) (glob) (?)
@@ -40,8 +40,8 b''
40
40
41 #endif
41 #endif
42
42
43 #if py3exe py3pygments
43 #if py3k pygments
44 $ testrepohg files 'set:(**.py) and grep(pygments)' | sed 's|\\|/|g' \
44 $ testrepohg files 'set:(**.py) and grep(pygments)' | sed 's|\\|/|g' \
45 > | xargs python3 contrib/check-py3-compat.py \
45 > | xargs $PYTHON contrib/check-py3-compat.py \
46 > | sed 's/[0-9][0-9]*)$/*)/'
46 > | sed 's/[0-9][0-9]*)$/*)/'
47 #endif
47 #endif
General Comments 0
You need to be logged in to leave comments. Login now