Skip to content

Commit

Permalink
Simplify Travis setup and requirements (#454)
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-blanchard committed Dec 14, 2018
1 parent fd5b4b6 commit 7e4828f
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 31 deletions.
19 changes: 7 additions & 12 deletions .travis.yml
Expand Up @@ -8,30 +8,25 @@ python:
- "3.4"
- "3.5"
- "3.6"
- "3.6-dev"
- "3.7"
- "3.7-dev"
- "pypy2.7-5.10.0"
- "pypy3.5-5.10.1"
- "pypy2.7-6.0"
- "pypy3.5-6.0"

matrix:
fast_finish: true
allow_failures:
- python: '3.7-dev'

dist:
- xenial

install:
- travis_retry pip install --upgrade pip setuptools
- travis_retry pip install -r requirements.txt
- travis_retry pip install -r test-requirements.txt
- travis_retry pip install coveralls coverage nose-cov
- echo TRAVIS_PYTHON_VERSION=${TRAVIS_PYTHON_VERSION}
- if [ ${TRAVIS_PYTHON_VERSION:0:1} != "3" ]; then travis_retry pip install contextlib2; fi
- python setup.py --version

# Run test
script:
- if [ $TRAVIS_PYTHON_VERSION == "3.4" ]; then nosetests -v --with-cov --cov streamparse --cov-config .coveragerc --logging-level=DEBUG; fi
- if [ $TRAVIS_PYTHON_VERSION != "3.4" ]; then nosetests -v --logging-level=DEBUG; fi

# Calculate coverage on success
after_success:
- if [ $TRAVIS_PYTHON_VERSION == "3.4" ]; then coveralls; fi
- pytest -vv
4 changes: 0 additions & 4 deletions dev-requirements.txt
@@ -1,5 +1 @@
pyflakes
pep8
nose
sphinx_rtd_theme
mock
4 changes: 3 additions & 1 deletion requirements.txt
@@ -1,5 +1,6 @@
fabric3
cython
jinja2
fabric3
pystorm>=3.1.1
requests
ruamel.yaml
Expand All @@ -8,3 +9,4 @@ simplejson
six>=1.5
texttable
thriftpy>=0.3.2
contextlib2; python_version < '3'
15 changes: 4 additions & 11 deletions setup.py
Expand Up @@ -34,7 +34,7 @@ def readme():


install_requires = [
"fabric3",
"cython",
"jinja2",
"requests",
"texttable",
Expand All @@ -43,6 +43,7 @@ def readme():
"pystorm>=3.1.1",
"thriftpy>=0.3.2",
"ruamel.yaml",
"fabric3",
]

if sys.version_info.major < 3:
Expand All @@ -51,14 +52,9 @@ def readme():
lint_requires = ["pep8", "pyflakes"]

if sys.version_info.major < 3:
tests_require = ["graphviz", "mock", "nose", "unittest2"]
tests_require = ["graphviz", "mock", "pytest", "unittest2"]
else:
tests_require = ["graphviz", "mock", "nose"]

dependency_links = []
setup_requires = []
if "nosetests" in sys.argv[1:]:
setup_requires.append("nose")
tests_require = ["graphviz", "pytest"]

setup(
name="streamparse",
Expand All @@ -82,15 +78,12 @@ def readme():
},
install_requires=install_requires,
tests_require=tests_require,
setup_requires=setup_requires,
extras_require={
"test": tests_require,
"all": install_requires + tests_require,
"docs": ["sphinx"] + tests_require,
"lint": lint_requires,
},
dependency_links=dependency_links,
zip_safe=False,
test_suite="nose.collector",
include_package_data=True,
)
6 changes: 3 additions & 3 deletions test-requirements.txt
@@ -1,4 +1,4 @@
graphviz
mock
nose
unittest2
mock; python_version < '3'
unittest2; python_version < '3'
pytest

0 comments on commit 7e4828f

Please sign in to comment.