Unpinning to see how upgrading to latest works

This commit is contained in:
Mike Terzo
2016-12-23 04:24:50 -05:00
parent 36c913588a
commit 76c18d80d6
2 changed files with 36 additions and 1 deletions

View File

@@ -5,9 +5,25 @@ python:
- "2.7"
- "3.5"
- "3.6"
env:
- PINNED=TRUE
- PINNED=FALSE
matrix:
allow_failures:
- python: 2.6
env: PINNED=FALSE
- python: 2.7
env: PINNED=FALSE
- python: 3.5
env: PINNED=FALSE
- python: 3.6
env: PINNED=FALSE
install:
- if [ "${PINNED}" == "FALSE" ]; then python scripts/unpin.py; fi
- pip install -r requirements.txt
- pip install -r requirements-test.txt
- pip install -U -r requirements-test.txt
- pip install -q coverage coveralls --use-wheel
script:
- py.test --cov=puppetboard --pep8 -v

19
scripts/unpin.py Normal file
View File

@@ -0,0 +1,19 @@
#!/usr/bin/env python
import glob
import re
try:
import future.utils
except:
pass
for req_file in glob.glob('requirements*.txt'):
new_data = []
with open(req_file, 'r') as fp:
data = fp.readlines()
for line in data:
new_data.append(re.sub(r'==\d+(\.\d+){0,3}\s+$', '\n', line))
with open(req_file, 'w') as fp:
fp.writelines(new_data)