Skip to content

Commit 7dda4d0

Browse files
rinarakakiparthea
andauthored
feat: migrate to pyproject.toml (#13551)
Tracking issue #13171 Previous PR: googleapis/python-api-common-protos#255 Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/google-cloud-python/issues) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes #<issue_number_goes_here> 🦕 --------- Co-authored-by: Anthonios Partheniou <[email protected]>
1 parent 04fca56 commit 7dda4d0

File tree

2 files changed

+55
-59
lines changed

2 files changed

+55
-59
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Copyright 2024 Google LLC
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"]
17+
build-backend = "setuptools.build_meta"
18+
19+
[project]
20+
name = "googleapis-common-protos"
21+
version = "1.68.0"
22+
authors = [{ name = "Google LLC", email = "[email protected]" }]
23+
license = { text = "Apache 2.0" }
24+
requires-python = ">= 3.7"
25+
readme = "README.rst"
26+
description = "Common protobufs used in Google APIs"
27+
classifiers = [
28+
"Development Status :: 5 - Production/Stable",
29+
"Intended Audience :: Developers",
30+
"License :: OSI Approved :: Apache Software License",
31+
"Programming Language :: Python",
32+
"Programming Language :: Python :: 3",
33+
"Programming Language :: Python :: 3.7",
34+
"Programming Language :: Python :: 3.8",
35+
"Programming Language :: Python :: 3.9",
36+
"Programming Language :: Python :: 3.10",
37+
"Programming Language :: Python :: 3.11",
38+
"Programming Language :: Python :: 3.12",
39+
"Programming Language :: Python :: 3.13",
40+
"Operating System :: OS Independent",
41+
"Topic :: Internet",
42+
]
43+
dependencies = [
44+
"protobuf >= 3.20.2, < 6.0.0.dev0, != 4.21.1, != 4.21.2, != 4.21.3, != 4.21.4, != 4.21.5",
45+
]
46+
47+
[project.urls]
48+
Repository = "https://github.com/googleapis/google-cloud-python/tree/main/packages/googleapis-common-protos"
49+
50+
[project.optional-dependencies]
51+
grpc = ["grpcio >= 1.44.0, < 2.0.0.dev0"]
52+
53+
[tool.setuptools.packages.find]
54+
exclude = ["tests*", "testing*"]

packages/googleapis-common-protos/setup.py

Lines changed: 1 addition & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -12,65 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
import io
16-
import os
17-
1815
import setuptools
19-
from setuptools import find_namespace_packages
20-
21-
name = "googleapis-common-protos"
22-
description = "Common protobufs used in Google APIs"
23-
version = "1.68.0"
24-
release_status = "Development Status :: 5 - Production/Stable"
25-
dependencies = [
26-
"protobuf>=3.20.2,<6.0.0.dev0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5",
27-
]
28-
29-
extras = {"grpc": ["grpcio >= 1.44.0, <2.0.0.dev0"]}
30-
url = "https://github.com/googleapis/google-cloud-python/tree/main/packages/googleapis-common-protos"
31-
32-
package_root = os.path.abspath(os.path.dirname(__file__))
33-
34-
readme_filename = os.path.join(package_root, "README.rst")
35-
with io.open(readme_filename, encoding="utf-8") as readme_file:
36-
readme = readme_file.read()
3716

38-
packages = [
39-
package
40-
for package in setuptools.find_namespace_packages(exclude=("tests*", "testing*"))
41-
if package.startswith("google")
42-
]
4317

44-
setuptools.setup(
45-
name=name,
46-
version=version,
47-
description=description,
48-
long_description=readme,
49-
author="Google LLC",
50-
author_email="[email protected]",
51-
license="Apache 2.0",
52-
url=url,
53-
classifiers=[
54-
release_status,
55-
"Intended Audience :: Developers",
56-
"License :: OSI Approved :: Apache Software License",
57-
"Programming Language :: Python",
58-
"Programming Language :: Python :: 3",
59-
"Programming Language :: Python :: 3.7",
60-
"Programming Language :: Python :: 3.8",
61-
"Programming Language :: Python :: 3.9",
62-
"Programming Language :: Python :: 3.10",
63-
"Programming Language :: Python :: 3.11",
64-
"Programming Language :: Python :: 3.12",
65-
"Programming Language :: Python :: 3.13",
66-
"Operating System :: OS Independent",
67-
"Topic :: Internet",
68-
],
69-
platforms="Posix; MacOS X; Windows",
70-
packages=packages,
71-
python_requires=">=3.7",
72-
install_requires=dependencies,
73-
extras_require=extras,
74-
include_package_data=True,
75-
zip_safe=False,
76-
)
18+
setuptools.setup()

0 commit comments

Comments
 (0)