From 2f755f29c5d9eea904128e79cbf5e1a38fe02bb2 Mon Sep 17 00:00:00 2001 From: rinarakaki Date: Wed, 16 Oct 2024 14:43:38 +0000 Subject: [PATCH 1/2] migrate to pyproject.toml --- pyproject.toml | 43 +++++++++++++++++++++++++++++++++++ setup.py | 61 ++------------------------------------------------ 2 files changed, 45 insertions(+), 59 deletions(-) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..701501d --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,43 @@ + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[project] +name = "grpc-google-iam-v1" +version = "0.13.1" +authors = [{ name = "Google LLC", email = "googleapis-packages@google.com" }] +license = { text = "Apache 2.0" } +requires-python = ">=3.7" +description = "IAM API client library" +readme = "README.rst" +classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "License :: OSI Approved :: Apache Software License", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Operating System :: OS Independent", + "Topic :: Internet", +] +dependencies = [ + "grpcio>=1.44.0, <2.0.0dev", + "googleapis-common-protos[grpc]>=1.56.0, <2.0.0dev", + "protobuf>=3.20.2,<6.0.0dev,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5", +] + +[project.urls] +Repository = "https://github.com/googleapis/python-grpc-google-iam-v1" + +[project.optional-dependencies] + +[tool.setuptools] + +[tool.setuptools.packages.find] +include = ["google*"] diff --git a/setup.py b/setup.py index c252537..87ab9d3 100644 --- a/setup.py +++ b/setup.py @@ -14,63 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -import io -import os +import setuptools # type: ignore -import setuptools - - -name = "grpc-google-iam-v1" -description = "IAM API client library" -version = "0.13.1" -url = "https://github.com/googleapis/python-grpc-google-iam-v1" -release_status = "Development Status :: 4 - Beta" -dependencies = [ - "grpcio>=1.44.0, <2.0.0dev", - "googleapis-common-protos[grpc]>=1.56.0, <2.0.0dev", - "protobuf>=3.20.2,<6.0.0dev,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5", -] - -package_root = os.path.abspath(os.path.dirname(__file__)) - -readme_filename = os.path.join(package_root, "README.rst") -with io.open(readme_filename, encoding="utf-8") as readme_file: - readme = readme_file.read() - -packages = [ - package - for package in setuptools.find_namespace_packages() - if package.startswith("google") -] - -setuptools.setup( - name=name, - version=version, - description=description, - long_description=readme, - author="Google LLC", - author_email="googleapis-packages@google.com", - license="Apache 2.0", - url=url, - classifiers=[ - release_status, - "Intended Audience :: Developers", - "License :: OSI Approved :: Apache Software License", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Operating System :: OS Independent", - "Topic :: Internet", - ], - platforms="Posix; MacOS X; Windows", - packages=packages, - python_requires=">=3.7", - install_requires=dependencies, - include_package_data=True, - zip_safe=False, -) +setuptools.setup() From a88704a51520ad0a0eb451dea05c532638dc634e Mon Sep 17 00:00:00 2001 From: rinarakaki Date: Sun, 20 Oct 2024 04:46:01 +0000 Subject: [PATCH 2/2] Add copyright notice --- pyproject.toml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 701501d..991fbff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,16 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. [build-system] requires = ["setuptools"] @@ -27,9 +40,9 @@ classifiers = [ "Topic :: Internet", ] dependencies = [ - "grpcio>=1.44.0, <2.0.0dev", - "googleapis-common-protos[grpc]>=1.56.0, <2.0.0dev", - "protobuf>=3.20.2,<6.0.0dev,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5", + "grpcio >= 1.44.0, < 2.0.0dev", + "googleapis-common-protos[grpc] >= 1.56.0, < 2.0.0dev", + "protobuf >= 3.20.2, < 6.0.0dev, != 4.21.1, != 4.21.2, != 4.21.3, != 4.21.4, != 4.21.5", ] [project.urls]