diff --git a/.ci/check_setuptools.py b/.ci/check_setuptools.py old mode 100644 new mode 100755 index f6857db1fe..e8f4e5d6dd --- a/.ci/check_setuptools.py +++ b/.ci/check_setuptools.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python from __future__ import print_function import subprocess @@ -31,7 +32,7 @@ def check_setuptools_version(version): file=sys.stderr) return 3 -if __name__ == '__main__': +def main(): version = None try: version = get_setuptools_version() @@ -44,5 +45,12 @@ def check_setuptools_version(version): if not version: print('Unable to find setuptools in requirements.txt', file=sys.stderr) - sys.exit(1) + if len(sys.argv) > 1: + version = sys.argv[1] + print('Using {}'.format(version)) + else: + sys.exit(1) sys.exit(check_setuptools_version(version)) + +if __name__ == '__main__': + main() diff --git a/.travis.yml b/.travis.yml index 2bc2fb3188..710b5f9b47 100644 --- a/.travis.yml +++ b/.travis.yml @@ -185,7 +185,7 @@ before_script: - .ci/deps.coala-bears.sh script: - - .ci/check_setuptools.py + - .ci/check_setuptools.py 21 - python setup.py bdist_wheel - pip install $(ls ./dist/*.whl)"[alldeps]" # Ensure bear requirements are in sync with the bear PipRequirement