File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change
1
+ import sys
1
2
import versioneer
3
+
2
4
try :
3
5
from setuptools import setup
4
6
except ImportError :
5
7
from distutils .core import setup
6
8
9
+ # Only install pytest and runner when test command is run
10
+ # This makes work easier for offline installs or low bandwidth machines
11
+ needs_pytest = {'pytest' , 'test' , 'ptr' }.intersection (sys .argv )
12
+ pytest_runner = ['pytest-runner' ] if needs_pytest else []
13
+
7
14
setup (
8
15
name = 'tableauserverclient' ,
9
16
version = versioneer .get_version (),
16
23
license = 'MIT' ,
17
24
description = 'A Python module for working with the Tableau Server REST API.' ,
18
25
test_suite = 'test' ,
19
- setup_requires = [
20
- 'pytest-runner'
21
- ],
26
+ setup_requires = pytest_runner ,
22
27
install_requires = [
23
28
'requests>=2.11,<3.0'
24
29
],
You can’t perform that action at this time.
0 commit comments