Skip to content

Commit 4f08815

Browse files
committed
MNT: use uniform Python 3 check in setup.py
1 parent 11d0860 commit 4f08815

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
# Update when tagging a new release.
1515
FALLBACK_VERSION = '3.0a2.post0'
1616

17+
# determine if we run with Python 3.
18+
PY3 = (sys.version_info[0] == 3)
19+
1720
# versioncfgfile holds version data for git commit hash and date.
1821
# It must reside in the same directory as version.py.
1922
MYDIR = os.path.dirname(os.path.abspath(__file__))
@@ -35,7 +38,7 @@ def gitinfo():
3538

3639

3740
def getversioncfg():
38-
if sys.version_info[0] >= 3:
41+
if PY3:
3942
from configparser import RawConfigParser
4043
else:
4144
from ConfigParser import RawConfigParser

0 commit comments

Comments
 (0)