From patchwork Wed Jul 26 20:41:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D185: setup: fix mistake that prevented Python 3 from being excluded From: phabricator X-Patchwork-Id: 22558 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Wed, 26 Jul 2017 20:41:41 +0000 This revision was automatically updated to reflect the committed changes. Closed by commit rHGee11d18fcd3c: setup: fix mistake that prevented Python 3 from being excluded (authored by durin42). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D185?vs=413&id=416 REVISION DETAIL https://phab.mercurial-scm.org/D185 AFFECTED FILES setup.py CHANGE DETAILS To: durin42, martinvonz, #hg-reviewers Cc: mercurial-devel diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -4,8 +4,10 @@ # 'python setup.py install', or # 'python setup.py --help' for more options +import os + supportedpy = '~= 2.7' -if 'HGALLOWPYTHON3': +if os.environ.get('HGALLOWPYTHON3', ''): # Mercurial will never work on Python 3 before 3.5 due to a lack # of % formatting on bytestrings, and can't work on 3.6.0 or 3.6.1 # due to a bug in % formatting in bytestrings. @@ -101,7 +103,7 @@ ispypy = "PyPy" in sys.version import ctypes -import os, stat, subprocess, time +import stat, subprocess, time import re import shutil import tempfile