Skip to content

Commit c453b4d

Browse files
committed
update yaml to patch setup.py file
1 parent ed54800 commit c453b4d

2 files changed

Lines changed: 39 additions & 32 deletions

File tree

.librarian/generator-input/client-post-processing/datastore-integration.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,15 @@ replacements:
2727
"datastore_v1/**",
2828
"multiprocessing.rst",
2929
"_build",
30+
count: 1
31+
- paths: [
32+
"packages/google-cloud-datastore/setup.py"
33+
]
34+
before: |
35+
"google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0",
36+
\ "grpcio >= 1.33.2, < 2.0.0",
37+
after: |
38+
"google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0",
39+
"google-cloud-core >= 1.4.0, <3.0.0",
40+
"grpcio >= 1.38.0, < 2.0.0",
3041
count: 1
Lines changed: 28 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Copyright 2018 Google LLC
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2025 Google LLC
23
#
34
# Licensed under the Apache License, Version 2.0 (the "License");
45
# you may not use this file except in compliance with the License.
@@ -11,57 +12,53 @@
1112
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1213
# See the License for the specific language governing permissions and
1314
# limitations under the License.
14-
15-
# DO NOT EDIT THIS FILE OUTSIDE OF `.librarian/generator-input`
16-
# The source of truth for this file is `.librarian/generator-input`
17-
18-
15+
#
1916
import io
2017
import os
18+
import re
2119

22-
import setuptools
20+
import setuptools # type: ignore
2321

24-
# Package metadata.
22+
package_root = os.path.abspath(os.path.dirname(__file__))
2523

2624
name = "google-cloud-datastore"
25+
26+
2727
description = "Google Cloud Datastore API client library"
2828

29-
# Should be one of:
30-
# 'Development Status :: 3 - Alpha'
31-
# 'Development Status :: 4 - Beta'
32-
# 'Development Status :: 5 - Production/Stable'
33-
release_status = "Development Status :: 5 - Production/Stable"
29+
version = None
30+
31+
with open(os.path.join(package_root, "google/cloud/datastore/gapic_version.py")) as fp:
32+
version_candidates = re.findall(r"(?<=\")\d+.\d+.\d+(?=\")", fp.read())
33+
assert len(version_candidates) == 1
34+
version = version_candidates[0]
35+
36+
if version[0] == "0":
37+
release_status = "Development Status :: 4 - Beta"
38+
else:
39+
release_status = "Development Status :: 5 - Production/Stable"
40+
3441
dependencies = [
35-
"google-api-core[grpc] >= 1.34.0, <3.0.0,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,!=2.10.*",
42+
"google-api-core[grpc] >= 1.34.1, <3.0.0,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,!=2.10.*",
3643
# Exclude incompatible versions of `google-auth`
3744
# See https://github.com/googleapis/google-cloud-python/issues/12364
3845
"google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0",
3946
"google-cloud-core >= 1.4.0, <3.0.0",
40-
"proto-plus >= 1.22.0, <2.0.0",
41-
"proto-plus >= 1.22.2, <2.0.0; python_version>='3.11'",
42-
"proto-plus >= 1.25.0, <2.0.0; python_version>='3.13'",
43-
"protobuf>=3.20.2,<7.0.0,!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5",
4447
"grpcio >= 1.38.0, < 2.0.0",
4548
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
49+
"proto-plus >= 1.22.3, <2.0.0",
50+
"proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'",
51+
"protobuf>=3.20.2,<7.0.0,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5",
4652
]
47-
extras = {"libcst": "libcst >= 0.2.5"}
48-
49-
50-
# Setup boilerplate below this line.
53+
extras = {}
54+
url = "https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-datastore"
5155

5256
package_root = os.path.abspath(os.path.dirname(__file__))
5357

54-
version = {}
55-
with open(os.path.join(package_root, "google/cloud/datastore/gapic_version.py")) as fp:
56-
exec(fp.read(), version)
57-
version = version["__version__"]
58-
5958
readme_filename = os.path.join(package_root, "README.rst")
6059
with io.open(readme_filename, encoding="utf-8") as readme_file:
6160
readme = readme_file.read()
6261

63-
# Only include packages under the 'google' namespace. Do not include tests,
64-
# benchmarks, etc.
6562
packages = [
6663
package
6764
for package in setuptools.find_namespace_packages()
@@ -76,7 +73,7 @@
7673
author="Google LLC",
7774
author_email="googleapis-packages@google.com",
7875
license="Apache 2.0",
79-
url="https://github.com/googleapis/google-cloud-python/tree/main/packages/python-datastore",
76+
url=url,
8077
classifiers=[
8178
release_status,
8279
"Intended Audience :: Developers",
@@ -93,13 +90,12 @@
9390
"Programming Language :: Python :: 3.14",
9491
"Operating System :: OS Independent",
9592
"Topic :: Internet",
96-
"Topic :: Software Development :: Libraries :: Python Modules",
9793
],
9894
platforms="Posix; MacOS X; Windows",
9995
packages=packages,
96+
python_requires=">=3.7",
10097
install_requires=dependencies,
10198
extras_require=extras,
102-
python_requires=">=3.7",
10399
include_package_data=True,
104100
zip_safe=False,
105101
)

0 commit comments

Comments
 (0)