From 95777fe58e2c61640e377f447594b9c4f4f91542 Mon Sep 17 00:00:00 2001 From: codl Date: Tue, 28 Nov 2017 06:03:13 +0100 Subject: [PATCH] add [test] extra so test deps can be installed before running tests --- .travis.yml | 2 +- setup.py | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index e88fe2c..b21a4b3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ python: - "2.7" install: - - pip install . + - pip install .[test] - pip install codecov script: python setup.py pytest after_script: codecov diff --git a/setup.py b/setup.py index d2ab253..5a9d8cc 100644 --- a/setup.py +++ b/setup.py @@ -1,12 +1,18 @@ from setuptools import setup +test_deps = ['pytest', 'pytest-cov', 'vcrpy', 'pytest-vcr', 'pytest-mock'] +extras = { + "test": test_deps +} + setup(name='Mastodon.py', version='1.1.2', description='Python wrapper for the Mastodon API', packages=['mastodon'], setup_requires=['pytest-runner'], - tests_require=['pytest', 'pytest-cov', 'vcrpy', 'pytest-vcr', 'pytest-mock'], install_requires=['requests', 'python-dateutil', 'six', 'pytz'], + tests_require=test_deps, + extras_require=extras, url='https://github.com/halcy/Mastodon.py', author='Lorenz Diener', author_email='lorenzd+mastodonpypypi@gmail.com',