forked from snowflakedb/snowpark-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
105 lines (100 loc) · 3.77 KB
/
setup.py
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#!/usr/bin/env python3
#
# Copyright (c) 2012-2022 Snowflake Computing Inc. All rights reserved.
#
import os
from codecs import open
from setuptools import setup
THIS_DIR = os.path.dirname(os.path.realpath(__file__))
SRC_DIR = os.path.join(THIS_DIR, "src")
SNOWPARK_SRC_DIR = os.path.join(SRC_DIR, "snowflake", "snowpark")
CONNECTOR_DEPENDENCY_VERSION = ">=2.7.12, <4.0.0"
REQUIRED_PYTHON_VERSION = "==3.8.*"
if os.getenv("SNOWFLAKE_IS_PYTHON_RUNTIME_TEST", False):
REQUIRED_PYTHON_VERSION = ">=3.8"
# read the version
VERSION = ()
with open(os.path.join(SNOWPARK_SRC_DIR, "version.py"), encoding="utf-8") as f:
exec(f.read())
if not VERSION:
raise ValueError("version can't be read")
version = ".".join([str(v) for v in VERSION if v is not None])
with open(os.path.join(THIS_DIR, "README.md"), encoding="utf-8") as f:
readme = f.read()
with open(os.path.join(THIS_DIR, "CHANGELOG.md"), encoding="utf-8") as f:
changelog = f.read()
setup(
name="snowflake-snowpark-python",
version=version,
description="Snowflake Snowpark for Python",
long_description=readme + "\n\n" + changelog,
long_description_content_type="text/markdown",
author="Snowflake, Inc",
author_email="[email protected]",
license="Apache License, Version 2.0",
keywords="Snowflake db database cloud analytics warehouse",
url="https://www.snowflake.com/",
project_urls={
"Documentation": "https://docs.snowflake.com/en/developer-guide/snowpark/python/index.html",
"Source": "https://github.com/snowflakedb/snowpark-python",
"Issues": "https://github.com/snowflakedb/snowpark-python/issues",
"Changelog": "https://github.com/snowflakedb/snowpark-python/blob/main/CHANGELOG.md",
},
python_requires=REQUIRED_PYTHON_VERSION,
install_requires=[
"setuptools>=40.6.0",
"wheel",
"cloudpickle>=1.6.0,<=2.0.0",
f"snowflake-connector-python{CONNECTOR_DEPENDENCY_VERSION}",
"typing-extensions>=4.1.0, <5.0.0",
],
namespace_packages=["snowflake"],
# When a new package (directory) is added, we should also add it here
packages=[
"snowflake.snowpark",
"snowflake.snowpark._internal",
"snowflake.snowpark._internal.analyzer",
],
package_dir={
"": "src",
},
package_data={
"snowflake.snowpark": ["LICENSE.txt", "py.typed"],
},
extras_require={
"pandas": [
f"snowflake-connector-python[pandas]{CONNECTOR_DEPENDENCY_VERSION}",
],
"secure-local-storage": [
f"snowflake-connector-python[secure-local-storage]{CONNECTOR_DEPENDENCY_VERSION}",
],
"development": [
"pytest",
"pytest-cov",
"coverage",
"sphinx==5.0.2",
"cachetools", # used in UDF doctest
],
},
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Environment :: Other Environment",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Information Technology",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: SQL",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Topic :: Database",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Scientific/Engineering :: Information Analysis",
],
zip_safe=False,
)