8000 Make it so the test-runner is only downloaded when running tests by t8y8 · Pull Request #485 · tableau/server-client-python · GitHub
[go: up one dir, main page]

Skip to content

Make it so the test-runner is only downloaded when running tests #485

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 9, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
8000
Diff view
11 changes: 8 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
import sys
import versioneer

try:
from setuptools import setup
except ImportError:
from distutils.core import setup

# Only install pytest and runner when test command is run
# This makes work easier for offline installs or low bandwidth machines
needs_pytest = {'pytest', 'test', 'ptr'}.intersection(sys.argv)
pytest_runner = ['pytest-runner'] if needs_pytest else []

setup(
name='tableauserverclient',
version=versioneer.get_version(),
Expand All @@ -16,9 +23,7 @@
license='MIT',
description='A Python module for working with the Tableau Server REST API.',
test_suite='test',
setup_requires=[
'pytest-runner'
],
setup_requires=pytest_runner,
install_requires=[
'requests>=2.11,<3.0'
],
Expand Down
0