forked from tableau/server-client-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
50 lines (45 loc) · 1.59 KB
/
setup.py
File metadata and controls
50 lines (45 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import sys
import versioneer
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from os import path
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, "README.md"), encoding="utf-8") as f:
long_description = f.read()
# 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 []
test_requirements = ["black", "mock", "pytest", "requests-mock>=1.0,<2.0", "mypy>=0.920"]
setup(
name="tableauserverclient",
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
author="Tableau",
author_email="github@tableau.com",
url="https://github.com/tableau/server-client-python",
package_data={"tableauserverclient": ["py.typed"]},
packages=[
"tableauserverclient",
"tableauserverclient.helpers",
"tableauserverclient.models",
"tableauserverclient.server",
"tableauserverclient.server.endpoint",
],
license="MIT",
description="A Python module for working with the Tableau Server REST API.",
long_description=long_description,
long_description_content_type="text/markdown",
test_suite="test",
setup_requires=pytest_runner,
install_requires=[
"defusedxml>=0.7.1",
"requests>=2.20,<3.0",
],
python_requires=">3.7.0",
tests_require=test_requirements,
extras_require={"test": test_requirements},
zip_safe=False,
)