Skip to content

Commit

Permalink
[fix] improve setup.py and coala
Browse files Browse the repository at this point in the history
  • Loading branch information
mosquito committed Jan 28, 2017
1 parent 413aa16 commit e9e39b5
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 12 deletions.
4 changes: 4 additions & 0 deletions .coafile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[Default]
bears = PEP8Bear, PyUnusedCodeBear, FilenameBear, InvalidLinkBear
files = aio_pika/**/*.py
max_line_length = 120
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ env:
- TOXENV=py34
- TOXENV=py35
install:
- pip install tox coveralls
- virtualenv -p python3 /tmp/env
- /tmp/env/bin/pip install tox coveralls
script:
- tox
- /tmp/env/bin/tox
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
all: test

test:
find . -name "*.pyc" -type f -delete
tox
15 changes: 15 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
if sys.version_info < (3, 5):
requires.append('asyncio')

if sys.version_info < (3, 4):
raise RuntimeError("aio-pika doesn't support Python version prior 3.4")


setup(
name='aio-pika',
Expand Down Expand Up @@ -40,4 +43,16 @@
),
packages=find_packages(exclude=['tests']),
install_requires=requires,
extras_require={
'develop': [
'asynctest',
'coverage!=4.3',
'coveralls',
'pytest',
'pytest-asyncio',
'pytest-cov',
'timeout-decorator',
'tox>=2.4',
],
},
)
27 changes: 17 additions & 10 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
[tox]
envlist = py3{4,5}
envlist = py3{4,5},qa


[testenv]
setenv =
AMQP_URL={env:AMQP_URL:amqp://guest:[email protected]/}

passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH COVERALLS_REPO_TOKEN

deps=
timeout-decorator
coveralls
asynctest
pytest
pytest-cov
pytest-asyncio
extras =
develop

commands=
find . -name "*.pyc" -type f -delete
py.test --cov aio_pika --cov-report=term-missing tests
py.test --cov aio_pika --cov-report=term-missing tests
coveralls


[testenv:qa]
basepython = python3.5

skip_install = True

deps =
coala-bears>=0.9

commands =
coala --non-interactive

0 comments on commit e9e39b5

Please sign in to comment.