Skip to content

Commit 7c6c7c9

Browse files
committed
fix(pyproject): adding pyproject back in for v2beta1 api. Also updating license to be SPDX format in all pyprojects.
Signed-off-by: CollinHowland <[email protected]>
1 parent 53e700c commit 7c6c7c9

File tree

7 files changed

+65
-122
lines changed

7 files changed

+65
-122
lines changed

api/v2alpha1/python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ authors = [
2525
]
2626
readme = '../../README.md'
2727
requires-python = '>=3.9.0'
28-
license = 'Apache 2.0'
28+
license = 'Apache-2.0'
2929
dependencies = [
3030
# Typically we can't support multiple major versions of protobuf
3131
# The runtime protobuf package MUST be aligned with the protobuf

backend/api/v1beta1/python_http_client/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ classifiers = [
2828
'Topic :: Software Development :: Libraries',
2929
'Topic :: Software Development :: Libraries :: Python Modules',
3030
]
31-
license = 'Apache 2.0'
31+
license = 'Apache-2.0'
3232
license-files = {globs = ['LICENSE']}
3333
keywords = [
3434
'OpenAPI',
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Copyright 2023 The Kubeflow Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
[build-system]
16+
requires = ['setuptools>=61.0', 'wheel']
17+
build-backend = 'setuptools.build_meta'
18+
19+
[project]
20+
name = 'kfp-server-api'
21+
version = '2.14.6'
22+
description = 'Kubeflow Pipelines API'
23+
authors = [
24+
{name = 'google', email = '[email protected]'}
25+
]
26+
keywords = [
27+
'OpenAPI',
28+
'OpenAPI-Generator',
29+
'Kubeflow Pipelines API',
30+
]
31+
readme = 'README.md'
32+
requires-python = '>=3.9.0'
33+
license = 'Apache-2.0'
34+
dependencies = [
35+
'urllib3 >= 1.15',
36+
'six >= 1.10',
37+
'certifi',
38+
'python-dateutil',
39+
]
40+
41+
[dependency-groups]
42+
dev = [
43+
'pytest~=4.6.7', # needed for python 2.7+3.4
44+
'pytest-cov>=2.8.1',
45+
'pytest-randomly==1.2.3', # needed for python 2.7+3.4
46+
]
47+
48+
[project.urls]
49+
Github = 'https://github.com/kubeflow/pipelines'
50+
Documentation = 'https://kfp-kubernetes.readthedocs.io/'
51+
'Bug Tracker'= 'https://github.com/kubeflow/pipelines/issues'
52+
Source = 'https://github.com/kubeflow/pipelines/tree/master/kubernetes_platform/python'
53+
54+
[tool.setuptools]
55+
include-package-data = true
56+
57+
[tool.setuptools.packages.find]
58+
exclude = ['test.*', 'tests.*']
Lines changed: 2 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,5 @@
11
# coding: utf-8
22

3-
"""
4-
Kubeflow Pipelines API
3+
from setuptools import setup
54

6-
This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition.
7-
8-
9-
Generated by: https://openapi-generator.tech
10-
"""
11-
12-
13-
from setuptools import setup, find_packages # noqa: H301
14-
15-
NAME = "kfp-server-api"
16-
VERSION = "2.14.6"
17-
# To install the library, run the following
18-
#
19-
# python setup.py install
20-
#
21-
# prerequisite: setuptools
22-
# http://pypi.python.org/pypi/setuptools
23-
24-
REQUIRES = ["urllib3 >= 1.15", "six >= 1.10", "certifi", "python-dateutil"]
25-
26-
setup(
27-
name=NAME,
28-
version=VERSION,
29-
description="Kubeflow Pipelines API",
30-
author="google",
31-
author_email="[email protected]",
32-
url="https://github.com/kubeflow/pipelines",
33-
keywords=["OpenAPI", "OpenAPI-Generator", "Kubeflow Pipelines API"],
34-
install_requires=REQUIRES,
35-
packages=find_packages(exclude=["test", "tests"]),
36-
include_package_data=True,
37-
license="Apache 2.0",
38-
long_description="""\
39-
This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501
40-
"""
41-
)
5+
setup()

kubernetes_platform/python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ authors = [
2525
]
2626
readme = 'README.md'
2727
requires-python = '>=3.9.0'
28-
license = 'Apache 2.0'
28+
license = 'Apache-2.0'
2929
dependencies = [
3030
# protobuf version should be identical to the one in kfp-pipeline-spec
3131
# api/v2alpha1/python/pyroject.toml
Lines changed: 1 addition & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,3 @@
1-
# Copyright 2023 The Kubeflow Authors
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
14-
15-
import os
16-
import re
17-
from typing import List
18-
191
import setuptools
202

21-
NAME = 'kfp-kubernetes'
22-
23-
def get_requirements(requirements_file: str) -> List[str]:
24-
"""Read requirements from requirements.in."""
25-
26-
file_path = os.path.join(os.path.dirname(__file__), requirements_file)
27-
with open(file_path, 'r') as f:
28-
lines = f.readlines()
29-
lines = [line.strip() for line in lines]
30-
lines = [line for line in lines if not line.startswith('#') and line]
31-
return lines
32-
33-
def find_version(*file_path_parts: str) -> str:
34-
"""Get version from kfp.__init__.__version__."""
35-
36-
file_path = os.path.join(os.path.dirname(__file__), *file_path_parts)
37-
with open(file_path, 'r') as f:
38-
version_file_text = f.read()
39-
40-
version_match = re.search(
41-
r"^__version__ = ['\"]([^'\"]*)['\"]",
42-
version_file_text,
43-
re.M,
44-
)
45-
if version_match:
46-
return version_match[1]
47-
else:
48-
raise ValueError('Could not find version.')
49-
50-
51-
def read_readme() -> str:
52-
readme_path = os.path.join(os.path.dirname(__file__), 'README.md')
53-
with open(readme_path) as f:
54-
return f.read()
55-
56-
57-
setuptools.setup(
58-
name=NAME,
59-
version=find_version('kfp', 'kubernetes', '__init__.py'),
60-
description='Kubernetes platform configuration library and generated protos.',
61-
long_description=read_readme(),
62-
long_description_content_type='text/markdown',
63-
author='google',
64-
author_email='[email protected]',
65-
url='https://github.com/kubeflow/pipelines',
66-
project_urls={
67-
'Documentation':
68-
'https://kfp-kubernetes.readthedocs.io/',
69-
'Bug Tracker':
70-
'https://github.com/kubeflow/pipelines/issues',
71-
'Source':
72-
'https://github.com/kubeflow/pipelines/tree/master/kubernetes_platform/python',
73-
},
74-
packages=setuptools.find_namespace_packages(include=['kfp.*']),
75-
python_requires='>=3.9.0',
76-
install_requires=get_requirements('requirements.in'),
77-
include_package_data=True,
78-
extras_require={
79-
'dev': get_requirements('requirements-dev.txt'),
80-
},
81-
license='Apache 2.0',
82-
)
3+
setuptools.setup()

sdk/python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ authors = [
2525
]
2626
readme = 'README.md'
2727
requires-python = '>=3.9.0'
28-
license = 'Apache 2.0'
28+
license = 'Apache-2.0'
2929
classifiers = [
3030
'Intended Audience :: Developers',
3131
'Intended Audience :: Education',

0 commit comments

Comments
 (0)