jenkins-bot has submitted this change and it was merged.
Change subject: Bug 58053 - Use PY3 environment variable for setup.py ......................................................................
Bug 58053 - Use PY3 environment variable for setup.py
Change-Id: Ib2336d6b769b808890d70f63f91b868c59b29802 --- M setup.py 1 file changed, 2 insertions(+), 2 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/setup.py b/setup.py index 1b21060..855c91b 100644 --- a/setup.py +++ b/setup.py @@ -11,6 +11,7 @@ #
import sys +import os
from ez_setup import use_setuptools use_setuptools() @@ -29,11 +30,10 @@ testcollector = "tests.utils.collector"
if sys.version_info[0] == 3: - if "--python3ok" not in sys.argv: + if not os.environ.get('PY3', False): # use setup.py test --python3ok to run tests print("ERROR: Pywikipediabot only runs under Python 2") sys.exit(1) - sys.argv.remove('--python3ok') if sys.version_info[1] < 3: print("ERROR: Python 3.3 or higher is required!") sys.exit(1)