Skip to content

Commit

Permalink
.ci/check_setuptools.py: Make executable
Browse files Browse the repository at this point in the history
Also allow setting desired version from the CLI.
  • Loading branch information
jayvdb committed Feb 5, 2019
1 parent abdb23a commit d977291
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions .ci/check_setuptools.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env python
from __future__ import print_function

import subprocess
Expand Down Expand Up @@ -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()
Expand All @@ -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()
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d977291

Please sign in to comment.