From e4bebad387fad5f2dfdefe6b3280f3f748b8b4d1 Mon Sep 17 00:00:00 2001 From: Rin Arakaki Date: Tue, 15 Oct 2024 13:15:47 +0900 Subject: [PATCH 1/8] Create pyproject.toml --- pyproject.toml | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..af138816a --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,43 @@ +[build-system] +requires = ["setuptools", "setuptools-scm"] +build-backend = "setuptools.build_meta" + +[project] +name = "google-auth" +version = "2.35.0" +authors = [{ name = "Google Cloud Platform", email = "googleapis-packages@google.com" }] +license = { text = "Apache 2.0" } +requires-python = ">=3.7" +description = "Google Authentication Library" +readme = "README.rst" +classifiers = [ + "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", + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: Apache Software License", + "Operating System :: POSIX", + "Operating System :: Microsoft :: Windows", + "Operating System :: MacOS :: MacOS X", + "Operating System :: OS Independent", + "Topic :: Internet :: WWW/HTTP", +] +dependencies = [ + "cachetools>=2.0.0,<6.0", + "pyasn1-modules>=0.2.1", + # rsa==4.5 is the last version to support 2.7 + # https://github.com/sybrenstuvel/python-rsa/issues/152#issuecomment-643470233 + "rsa>=3.1.4,<5", +] + +[project.optional-dependencies] +aiohttp = ["aiohttp >= 3.6.2, < 4.0.0.dev0", "requests >= 2.20.0, < 3.0.0.dev0"] +pyopenssl = ["pyopenssl>=20.0.0", "cryptography>=38.0.3"] +requests = ["requests >= 2.20.0, < 3.0.0.dev0"] +reauth = ["pyu2f>=0.1.5"] +enterprise_cert = ["cryptography", "pyopenssl"] From e2a61220277c8fc7dc6b23e00a833a97ed054127 Mon Sep 17 00:00:00 2001 From: Rin Arakaki Date: Tue, 15 Oct 2024 13:16:30 +0900 Subject: [PATCH 2/8] Update setup.py --- setup.py | 52 ---------------------------------------------------- 1 file changed, 52 deletions(-) diff --git a/setup.py b/setup.py index 4e4c0d47b..6e5d2e811 100644 --- a/setup.py +++ b/setup.py @@ -12,71 +12,19 @@ # See the License for the specific language governing permissions and # limitations under the License. -import io import os from setuptools import find_namespace_packages from setuptools import setup -DEPENDENCIES = ( - "cachetools>=2.0.0,<6.0", - "pyasn1-modules>=0.2.1", - # rsa==4.5 is the last version to support 2.7 - # https://github.com/sybrenstuvel/python-rsa/issues/152#issuecomment-643470233 - "rsa>=3.1.4,<5", -) - -extras = { - "aiohttp": ["aiohttp >= 3.6.2, < 4.0.0.dev0", "requests >= 2.20.0, < 3.0.0.dev0"], - "pyopenssl": ["pyopenssl>=20.0.0", "cryptography>=38.0.3"], - "requests": "requests >= 2.20.0, < 3.0.0.dev0", - "reauth": "pyu2f>=0.1.5", - "enterprise_cert": ["cryptography", "pyopenssl"], -} - -with io.open("README.rst", "r") as fh: - long_description = fh.read() - package_root = os.path.abspath(os.path.dirname(__file__)) -version = {} -with open(os.path.join(package_root, "google/auth/version.py")) as fp: - exec(fp.read(), version) -version = version["__version__"] - setup( - name="google-auth", - version=version, - author="Google Cloud Platform", - author_email="googleapis-packages@google.com", - description="Google Authentication Library", - long_description=long_description, url="https://github.com/googleapis/google-auth-library-python", packages=find_namespace_packages( exclude=("tests*", "system_tests*", "docs*", "samples*") ), package_data={"google.auth": ["py.typed"], "google.oauth2": ["py.typed"]}, - install_requires=DEPENDENCIES, - extras_require=extras, - python_requires=">=3.7", - license="Apache 2.0", keywords="google auth oauth client", - classifiers=[ - "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", - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "License :: OSI Approved :: Apache Software License", - "Operating System :: POSIX", - "Operating System :: Microsoft :: Windows", - "Operating System :: MacOS :: MacOS X", - "Operating System :: OS Independent", - "Topic :: Internet :: WWW/HTTP", - ], ) From 8dcddde332e8ed797d7774358562c77920ec1ae1 Mon Sep 17 00:00:00 2001 From: rinarakaki Date: Tue, 15 Oct 2024 04:24:53 +0000 Subject: [PATCH 3/8] move keywords --- pyproject.toml | 5 ++++- setup.py | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index af138816a..4b6fa5481 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,11 +5,14 @@ build-backend = "setuptools.build_meta" [project] name = "google-auth" version = "2.35.0" -authors = [{ name = "Google Cloud Platform", email = "googleapis-packages@google.com" }] +authors = [ + { name = "Google Cloud Platform", email = "googleapis-packages@google.com" }, +] license = { text = "Apache 2.0" } requires-python = ">=3.7" description = "Google Authentication Library" readme = "README.rst" +keywords = ["google auth oauth client"] classifiers = [ "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.7", diff --git a/setup.py b/setup.py index 6e5d2e811..f475e10a9 100644 --- a/setup.py +++ b/setup.py @@ -26,5 +26,4 @@ exclude=("tests*", "system_tests*", "docs*", "samples*") ), package_data={"google.auth": ["py.typed"], "google.oauth2": ["py.typed"]}, - keywords="google auth oauth client", ) From fc0e94632b06fea719efb904d2919735c0b1d6db Mon Sep 17 00:00:00 2001 From: rinarakaki Date: Tue, 15 Oct 2024 04:35:24 +0000 Subject: [PATCH 4/8] dynamic version --- pyproject.toml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 4b6fa5481..d24a45f8b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,9 @@ [build-system] -requires = ["setuptools", "setuptools-scm"] +requires = ["setuptools"] build-backend = "setuptools.build_meta" [project] name = "google-auth" -version = "2.35.0" authors = [ { name = "Google Cloud Platform", email = "googleapis-packages@google.com" }, ] @@ -37,6 +36,7 @@ dependencies = [ # https://github.com/sybrenstuvel/python-rsa/issues/152#issuecomment-643470233 "rsa>=3.1.4,<5", ] +dynamic = ["version"] [project.optional-dependencies] aiohttp = ["aiohttp >= 3.6.2, < 4.0.0.dev0", "requests >= 2.20.0, < 3.0.0.dev0"] @@ -44,3 +44,6 @@ pyopenssl = ["pyopenssl>=20.0.0", "cryptography>=38.0.3"] requests = ["requests >= 2.20.0, < 3.0.0.dev0"] reauth = ["pyu2f>=0.1.5"] enterprise_cert = ["cryptography", "pyopenssl"] + +[tool.setuptools.dynamic] +version = { attr = "google.auth.version.__version__" } From ca48c3c38eff96eafbd2b16b64bedf677f0512a6 Mon Sep 17 00:00:00 2001 From: rinarakaki Date: Tue, 15 Oct 2024 07:43:49 +0000 Subject: [PATCH 5/8] move url --- pyproject.toml | 4 ++++ setup.py | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d24a45f8b..1864a2221 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,6 +38,10 @@ dependencies = [ ] dynamic = ["version"] +[project.urls] +Documentation = "https://googleapis.dev/python/google-auth/latest/" +Repository = "https://github.com/googleapis/google-auth-library-python" + [project.optional-dependencies] aiohttp = ["aiohttp >= 3.6.2, < 4.0.0.dev0", "requests >= 2.20.0, < 3.0.0.dev0"] pyopenssl = ["pyopenssl>=20.0.0", "cryptography>=38.0.3"] diff --git a/setup.py b/setup.py index f475e10a9..b195db501 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,6 @@ package_root = os.path.abspath(os.path.dirname(__file__)) setup( - url="https://github.com/googleapis/google-auth-library-python", packages=find_namespace_packages( exclude=("tests*", "system_tests*", "docs*", "samples*") ), From b3f85e6d2fbfc95a2835c5dc96dc5d0b3518209f Mon Sep 17 00:00:00 2001 From: rinarakaki Date: Tue, 15 Oct 2024 08:10:53 +0000 Subject: [PATCH 6/8] move packages --- pyproject.toml | 3 +++ setup.py | 8 -------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 1864a2221..16faad9e5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,3 +51,6 @@ enterprise_cert = ["cryptography", "pyopenssl"] [tool.setuptools.dynamic] version = { attr = "google.auth.version.__version__" } + +[tool.setuptools.packages.find] +exclude = ["tests*", "system_tests*", "docs*", "samples*"] diff --git a/setup.py b/setup.py index b195db501..65052e5e3 100644 --- a/setup.py +++ b/setup.py @@ -12,17 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -import os - -from setuptools import find_namespace_packages from setuptools import setup -package_root = os.path.abspath(os.path.dirname(__file__)) - setup( - packages=find_namespace_packages( - exclude=("tests*", "system_tests*", "docs*", "samples*") - ), package_data={"google.auth": ["py.typed"], "google.oauth2": ["py.typed"]}, ) From 361b452a845520a7d4a87f4b438377cf2c1cc0da Mon Sep 17 00:00:00 2001 From: rinarakaki Date: Tue, 15 Oct 2024 09:40:03 +0000 Subject: [PATCH 7/8] move package-data --- pyproject.toml | 4 ++++ setup.py | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 16faad9e5..17293cefc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,3 +54,7 @@ version = { attr = "google.auth.version.__version__" } [tool.setuptools.packages.find] exclude = ["tests*", "system_tests*", "docs*", "samples*"] + +[tool.setuptools.package-data] +"google.auth" = ["py.typed"] +"google.oauth2" = ["py.typed"] diff --git a/setup.py b/setup.py index 65052e5e3..9aff5e2e0 100644 --- a/setup.py +++ b/setup.py @@ -15,6 +15,4 @@ from setuptools import setup -setup( - package_data={"google.auth": ["py.typed"], "google.oauth2": ["py.typed"]}, -) +setup() From 93143c9cb1632f98d43fb60dc6b7cf8945713b2d Mon Sep 17 00:00:00 2001 From: rinarakaki Date: Sun, 20 Oct 2024 04:40:47 +0000 Subject: [PATCH 8/8] Add copyright notice --- pyproject.toml | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 17293cefc..adacb803c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,17 @@ +# 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"] build-backend = "setuptools.build_meta" @@ -30,11 +44,11 @@ classifiers = [ "Topic :: Internet :: WWW/HTTP", ] dependencies = [ - "cachetools>=2.0.0,<6.0", - "pyasn1-modules>=0.2.1", - # rsa==4.5 is the last version to support 2.7 + "cachetools >= 2.0.0, < 6.0", + "pyasn1-modules >= 0.2.1", + # rsa == 4.5 is the last version to support 2.7 # https://github.com/sybrenstuvel/python-rsa/issues/152#issuecomment-643470233 - "rsa>=3.1.4,<5", + "rsa >= 3.1.4, < 5", ] dynamic = ["version"] @@ -44,9 +58,9 @@ Repository = "https://github.com/googleapis/google-auth-library-python" [project.optional-dependencies] aiohttp = ["aiohttp >= 3.6.2, < 4.0.0.dev0", "requests >= 2.20.0, < 3.0.0.dev0"] -pyopenssl = ["pyopenssl>=20.0.0", "cryptography>=38.0.3"] +pyopenssl = ["pyopenssl >= 20.0.0", "cryptography >= 38.0.3"] requests = ["requests >= 2.20.0, < 3.0.0.dev0"] -reauth = ["pyu2f>=0.1.5"] +reauth = ["pyu2f >= 0.1.5"] enterprise_cert = ["cryptography", "pyopenssl"] [tool.setuptools.dynamic]