-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
Copy pathsetup.py
138 lines (132 loc) · 5.08 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# Copyright 2021 The Kubeflow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Setup script."""
import glob
import importlib
import os
import types
import setuptools
relative_directory = os.path.relpath(os.path.dirname(os.path.abspath(__file__)))
GCPC_DIR_NAME = "google_cloud_pipeline_components"
relative_data_path = os.path.join(relative_directory, GCPC_DIR_NAME)
loader = importlib.machinery.SourceFileLoader(
fullname="version",
path=os.path.join(relative_directory, GCPC_DIR_NAME, "version.py"),
)
version = types.ModuleType(loader.name)
loader.exec_module(version)
# Get the long descriptions including link to RELEASE notes from README files.
with open("README.md") as fp:
_GCPC_LONG_DESCRIPTION = fp.read()
yaml_data = glob.glob(relative_data_path + "/**/*.yaml", recursive=True)
json_data = glob.glob(
relative_data_path + "/**/automl/**/*.json", recursive=True
)
setuptools.setup(
name="google-cloud-pipeline-components",
version=version.__version__,
description=(
"This SDK enables a set of First Party (Google owned) pipeline"
" components that allow users to take their experience from Vertex AI"
" SDK and other Google Cloud services and create a corresponding"
" pipeline using KFP or Managed Pipelines."
),
long_description=_GCPC_LONG_DESCRIPTION,
long_description_content_type="text/markdown",
url="https://github.com/kubeflow/pipelines/tree/master/components/google-cloud",
author="The Google Cloud Pipeline Components authors",
author_email="[email protected]",
license="Apache License 2.0",
extras_require={
"tests": [
"mock>=4.0.0",
"flake8>=3.0.0",
"pytest>=6.0.0",
],
# first list of deps solves a readthedocs dependency resolution error
# related to protobuf
# second list of deps are true dependencies for building the site
"docs": (
[
"protobuf>=4.21.1,<5",
"grpcio-status<=1.47.0",
]
+ [
"commonmark==0.9.1",
"autodocsumm==0.2.9",
"sphinx>=5.0.2,<6.0.0",
"sphinx-immaterial==0.9.0",
"sphinx-rtd-theme==2.0.0",
"m2r2==0.3.3.post2",
"sphinx-notfound-page==0.8.3",
]
),
},
include_package_data=True,
python_requires=">=3.8.0",
install_requires=[
# Pin google-api-core version for the bug fixing in 1.31.5
# https://github.com/googleapis/python-api-core/releases/tag/v1.31.5
"google-api-core>=1.31.5,<3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0",
"kfp>=2.6.0,<3.0.0",
"google-cloud-aiplatform>=1.14.0,<2",
"Jinja2>=3.1.2,<4",
],
project_urls={
"User Documentation": (
"https://cloud.google.com/vertex-ai/docs/pipelines/components-introduction"
),
"Reference Documentation": (
"https://google-cloud-pipeline-components.readthedocs.io/"
),
"Source": (
"https://github.com/kubeflow/pipelines/tree/master/components/google-cloud"
),
"Release Notes": (
"https://github.com/kubeflow/pipelines/tree/master/components/google-cloud/RELEASE.md"
),
},
dependency_links=[],
classifiers=[
"Development Status :: 4 - Beta",
"Operating System :: Unix",
"Operating System :: MacOS",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
],
package_dir={
GCPC_DIR_NAME: os.path.join(relative_directory, GCPC_DIR_NAME)
},
packages=setuptools.find_packages(where=relative_directory, include="*"),
package_data={
GCPC_DIR_NAME: [
x.replace(relative_data_path + "/", "")
for x in yaml_data + json_data
]
},
)