Skip to content

Commit 76ce434

Browse files
authored
Merge pull request #2557 from yliaog/setup
added setup-release.py for releasing for package containing both sync…
2 parents 8ed5d93 + 22a8453 commit 76ce434

3 files changed

Lines changed: 103 additions & 4 deletions

File tree

setup-asyncio.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,11 @@
4343
url="https://github.com/kubernetes-client/kubernetes_asyncio",
4444
keywords=["Swagger", "OpenAPI", "Kubernetes"],
4545
install_requires=REQUIRES,
46-
python_requires=">=3.8",
46+
python_requires=">=3.10",
4747
tests_require=TESTS_REQUIRES,
4848
packages=[
4949
'kubernetes_asyncio',
50+
'kubernetes_asyncio.config',
5051
'kubernetes_asyncio.client',
5152
'kubernetes_asyncio.client.api',
5253
'kubernetes_asyncio.client.models'],
@@ -65,5 +66,6 @@
6566
"Programming Language :: Python :: 3.11",
6667
"Programming Language :: Python :: 3.12",
6768
"Programming Language :: Python :: 3.13",
69+
"Programming Language :: Python :: 3.14",
6870
],
6971
)

setup-release.py

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# Copyright 2016 The Kubernetes 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+
from setuptools import setup
16+
17+
# Do not edit these constants. They will be updated automatically
18+
# by scripts/update-client.sh.
19+
CLIENT_VERSION = "36.0.0+snapshot"
20+
PACKAGE_NAME = "kubernetes"
21+
DEVELOPMENT_STATUS = "3 - Alpha"
22+
23+
# To install the library, run the following
24+
#
25+
# python setup.py install
26+
#
27+
# prerequisite: setuptools
28+
# http://pypi.python.org/pypi/setuptools
29+
30+
EXTRAS = {
31+
'google-auth': ['google-auth>=1.0.1']
32+
}
33+
REQUIRES = []
34+
with open('requirements.txt') as f:
35+
for line in f:
36+
line, _, _ = line.partition('#')
37+
line = line.strip()
38+
if not line or line.startswith('setuptools'):
39+
continue
40+
elif ';' in line:
41+
requirement, _, specifier = line.partition(';')
42+
for_specifier = EXTRAS.setdefault(':{}'.format(specifier), [])
43+
for_specifier.append(requirement)
44+
else:
45+
REQUIRES.append(line)
46+
47+
with open('test-requirements.txt') as f:
48+
TESTS_REQUIRES = f.readlines()
49+
50+
with open('requirements-asyncio.txt') as f:
51+
REQUIRES_ASYNCIO = f.readlines()
52+
53+
with open('test-requirements-asyncio.txt') as f:
54+
TESTS_REQUIRES_ASYNCIO = f.readlines()
55+
56+
57+
setup(
58+
name=PACKAGE_NAME,
59+
version=CLIENT_VERSION,
60+
description="Kubernetes python client",
61+
author_email="",
62+
author="Kubernetes",
63+
license="Apache License Version 2.0",
64+
url="https://github.com/kubernetes-client/python",
65+
keywords=["Swagger", "OpenAPI", "Kubernetes"],
66+
install_requires=REQUIRES+REQUIRES_ASYNCIO,
67+
tests_require=TESTS_REQUIRES+TESTS_REQUIRES_ASYNCIO,
68+
extras_require=EXTRAS,
69+
packages=['kubernetes', 'kubernetes.client', 'kubernetes.config',
70+
'kubernetes.watch', 'kubernetes.client.api',
71+
'kubernetes.stream', 'kubernetes.client.models',
72+
'kubernetes.utils', 'kubernetes.client.apis',
73+
'kubernetes.dynamic', 'kubernetes.leaderelection',
74+
'kubernetes.leaderelection.resourcelock',
75+
'kubernetes_asyncio',
76+
'kubernetes_asyncio.config',
77+
'kubernetes_asyncio.client',
78+
'kubernetes_asyncio.client.api',
79+
'kubernetes_asyncio.client.models'
80+
],
81+
include_package_data=True,
82+
long_description="Python client for kubernetes http://kubernetes.io/",
83+
python_requires='>=3.10',
84+
classifiers=[
85+
"Development Status :: %s" % DEVELOPMENT_STATUS,
86+
"Topic :: Utilities",
87+
"Intended Audience :: Developers",
88+
"Intended Audience :: Information Technology",
89+
"License :: OSI Approved :: Apache Software License",
90+
"Operating System :: OS Independent",
91+
"Programming Language :: Python",
92+
"Programming Language :: Python :: 3",
93+
"Programming Language :: Python :: 3.10",
94+
"Programming Language :: Python :: 3.11",
95+
"Programming Language :: Python :: 3.12",
96+
"Programming Language :: Python :: 3.13",
97+
"Programming Language :: Python :: 3.14",
98+
],
99+
)

setup.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
'kubernetes.leaderelection.resourcelock'],
6868
include_package_data=True,
6969
long_description="Python client for kubernetes http://kubernetes.io/",
70-
python_requires='>=3.6',
70+
python_requires='>=3.10',
7171
classifiers=[
7272
"Development Status :: %s" % DEVELOPMENT_STATUS,
7373
"Topic :: Utilities",
@@ -77,8 +77,6 @@
7777
"Operating System :: OS Independent",
7878
"Programming Language :: Python",
7979
"Programming Language :: Python :: 3",
80-
"Programming Language :: Python :: 3.8",
81-
"Programming Language :: Python :: 3.9",
8280
"Programming Language :: Python :: 3.10",
8381
"Programming Language :: Python :: 3.11",
8482
"Programming Language :: Python :: 3.12",

0 commit comments

Comments
 (0)