|
1 | | -# Copyright 2018 Google LLC |
| 1 | +# -*- coding: utf-8 -*- |
| 2 | +# Copyright 2025 Google LLC |
2 | 3 | # |
3 | 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
4 | 5 | # you may not use this file except in compliance with the License. |
|
11 | 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 | 13 | # See the License for the specific language governing permissions and |
13 | 14 | # 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 | +# |
19 | 16 | import io |
20 | 17 | import os |
| 18 | +import re |
21 | 19 |
|
22 | | -import setuptools |
| 20 | +import setuptools # type: ignore |
23 | 21 |
|
24 | | -# Package metadata. |
| 22 | +package_root = os.path.abspath(os.path.dirname(__file__)) |
25 | 23 |
|
26 | 24 | name = "google-cloud-datastore" |
| 25 | + |
| 26 | + |
27 | 27 | description = "Google Cloud Datastore API client library" |
28 | 28 |
|
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 | + |
34 | 41 | 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.*", |
36 | 43 | # Exclude incompatible versions of `google-auth` |
37 | 44 | # See https://github.com/googleapis/google-cloud-python/issues/12364 |
38 | 45 | "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", |
39 | 46 | "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", |
44 | 47 | "grpcio >= 1.38.0, < 2.0.0", |
45 | 48 | "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", |
46 | 52 | ] |
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" |
51 | 55 |
|
52 | 56 | package_root = os.path.abspath(os.path.dirname(__file__)) |
53 | 57 |
|
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 | | - |
59 | 58 | readme_filename = os.path.join(package_root, "README.rst") |
60 | 59 | with io.open(readme_filename, encoding="utf-8") as readme_file: |
61 | 60 | readme = readme_file.read() |
62 | 61 |
|
63 | | -# Only include packages under the 'google' namespace. Do not include tests, |
64 | | -# benchmarks, etc. |
65 | 62 | packages = [ |
66 | 63 | package |
67 | 64 | for package in setuptools.find_namespace_packages() |
|
76 | 73 | author="Google LLC", |
77 | 74 | author_email="googleapis-packages@google.com", |
78 | 75 | license="Apache 2.0", |
79 | | - url="https://github.com/googleapis/google-cloud-python/tree/main/packages/python-datastore", |
| 76 | + url=url, |
80 | 77 | classifiers=[ |
81 | 78 | release_status, |
82 | 79 | "Intended Audience :: Developers", |
|
93 | 90 | "Programming Language :: Python :: 3.14", |
94 | 91 | "Operating System :: OS Independent", |
95 | 92 | "Topic :: Internet", |
96 | | - "Topic :: Software Development :: Libraries :: Python Modules", |
97 | 93 | ], |
98 | 94 | platforms="Posix; MacOS X; Windows", |
99 | 95 | packages=packages, |
| 96 | + python_requires=">=3.7", |
100 | 97 | install_requires=dependencies, |
101 | 98 | extras_require=extras, |
102 | | - python_requires=">=3.7", |
103 | 99 | include_package_data=True, |
104 | 100 | zip_safe=False, |
105 | 101 | ) |
0 commit comments