diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index bebd2c03233a..ba71d9fada42 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -100,12 +100,12 @@ jobs: PY_VERSION: "unused" run: | ci/run_conditional_tests.sh - - name: Run lint_setup_py + - name: Run twine check env: BUILD_TYPE: presubmit TARGET_BRANCH: ${{ github.base_ref || github.event.merge_group.base_ref }} TEST_ALL_PACKAGES: ${{ steps.check-label.outputs.is_full_run }} - TEST_TYPE: lint_setup_py + TEST_TYPE: lint_twine_check # TODO(https://github.com/googleapis/google-cloud-python/issues/13775): Specify `PY_VERSION` rather than relying on the default python version of the nox session. PY_VERSION: "unused" run: | diff --git a/.librarian/generator-input/client-post-processing/bigtable-integration.yaml b/.librarian/generator-input/client-post-processing/bigtable-integration.yaml index 16fdf18b574f..c9168681fada 100644 --- a/.librarian/generator-input/client-post-processing/bigtable-integration.yaml +++ b/.librarian/generator-input/client-post-processing/bigtable-integration.yaml @@ -451,7 +451,7 @@ replacements: "mypy", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", "format", @@ -567,10 +567,11 @@ replacements: @nox.session(python=DEFAULT_PYTHON_VERSION) - def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") + def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/.librarian/generator-input/client-post-processing/pubsub-integration.yaml b/.librarian/generator-input/client-post-processing/pubsub-integration.yaml index 238f99e447df..438b49ef1e64 100644 --- a/.librarian/generator-input/client-post-processing/pubsub-integration.yaml +++ b/.librarian/generator-input/client-post-processing/pubsub-integration.yaml @@ -401,7 +401,7 @@ replacements: count: 1 - paths: - "packages/google-cloud-pubsub/noxfile.py" - before: 'nox\.options\.sessions = \[\n(?:[ \t]+)"unit",\n(?:[ \t]+)"system",\n(?:[ \t]+)"cover",\n(?:[ \t]+)"lint",\n(?:[ \t]+)"lint_setup_py",\n(?:[ \t]+)"blacken",\n(?:[ \t]+)"docs",\n\]' + before: 'nox\.options\.sessions = \[\n(?:[ \t]+)"unit",\n(?:[ \t]+)"system",\n(?:[ \t]+)"cover",\n(?:[ \t]+)"lint",\n(?:[ \t]+)"lint_twine_check",\n(?:[ \t]+)"blacken",\n(?:[ \t]+)"docs",\n\]' after: |- CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() # Path to the centralized mypy configuration file at the repository root. @@ -420,7 +420,7 @@ replacements: "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "mypy", # https://github.com/googleapis/python-pubsub/pull/552#issuecomment-1016256936 diff --git a/.librarian/generator-input/client-post-processing/spanner-integration.yaml b/.librarian/generator-input/client-post-processing/spanner-integration.yaml index 751af40ff368..e53c27787a0f 100644 --- a/.librarian/generator-input/client-post-processing/spanner-integration.yaml +++ b/.librarian/generator-input/client-post-processing/spanner-integration.yaml @@ -721,7 +721,7 @@ replacements: "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", "docfx", @@ -821,10 +821,11 @@ replacements: @nox.session(python=DEFAULT_PYTHON_VERSION) - def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") + def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/ci/run_single_test.sh b/ci/run_single_test.sh index 8f888923e3b2..f8ae57f0fa68 100755 --- a/ci/run_single_test.sh +++ b/ci/run_single_test.sh @@ -15,7 +15,7 @@ # limitations under the License. # This script requires the following environment variables to be set: -# `TEST_TYPE` should be one of ["lint", "lint_setup_py", "docs", "docfx", "prerelease"] +# `TEST_TYPE` should be one of ["lint", "lint_twine_check", "docs", "docfx", "prerelease"] # `PY_VERSION` should be one of ["3.10", "3.11", "3.12", "3.13"] # This script is called by the `ci/run_conditional_tests.sh` script. diff --git a/packages/gapic-generator/gapic/templates/noxfile.py.j2 b/packages/gapic-generator/gapic/templates/noxfile.py.j2 index 0cd2aa9878fb..2328cc772e72 100644 --- a/packages/gapic-generator/gapic/templates/noxfile.py.j2 +++ b/packages/gapic-generator/gapic/templates/noxfile.py.j2 @@ -82,7 +82,7 @@ nox.options.sessions = [ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -228,10 +228,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/gapic-generator/noxfile.py b/packages/gapic-generator/noxfile.py index a9724ae3b450..175b8a325a0c 100644 --- a/packages/gapic-generator/noxfile.py +++ b/packages/gapic-generator/noxfile.py @@ -790,13 +790,11 @@ def lint(session): @nox.session(python=NEWEST_PYTHON) -def lint_setup_py(session): - # TODO(https://github.com/googleapis/google-cloud-python/issues/16186): - # SKIP: This session was not enforced in the standalone (split) repo - # and is disabled here to ensure a "move-only" migration. - session.skip( - "Skipping now to avoid changing code during migration. See Issue #16186" - ) +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") @nox.session(python="3.10") diff --git a/packages/gapic-generator/tests/integration/goldens/asset/noxfile.py b/packages/gapic-generator/tests/integration/goldens/asset/noxfile.py index 34af0d25e9e9..02b03ebe2fac 100755 --- a/packages/gapic-generator/tests/integration/goldens/asset/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/asset/noxfile.py @@ -89,7 +89,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -226,10 +226,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/gapic-generator/tests/integration/goldens/credentials/noxfile.py b/packages/gapic-generator/tests/integration/goldens/credentials/noxfile.py index e114571f4d9e..b2e08fec2d72 100755 --- a/packages/gapic-generator/tests/integration/goldens/credentials/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/credentials/noxfile.py @@ -89,7 +89,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -226,10 +226,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/gapic-generator/tests/integration/goldens/eventarc/noxfile.py b/packages/gapic-generator/tests/integration/goldens/eventarc/noxfile.py index fe6219825d35..891aa23c77e7 100755 --- a/packages/gapic-generator/tests/integration/goldens/eventarc/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/eventarc/noxfile.py @@ -89,7 +89,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -226,10 +226,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/gapic-generator/tests/integration/goldens/logging/noxfile.py b/packages/gapic-generator/tests/integration/goldens/logging/noxfile.py index e15c0cf8129f..7297e309d49a 100755 --- a/packages/gapic-generator/tests/integration/goldens/logging/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/logging/noxfile.py @@ -89,7 +89,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -226,10 +226,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/gapic-generator/tests/integration/goldens/logging_internal/noxfile.py b/packages/gapic-generator/tests/integration/goldens/logging_internal/noxfile.py index e15c0cf8129f..7297e309d49a 100755 --- a/packages/gapic-generator/tests/integration/goldens/logging_internal/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/logging_internal/noxfile.py @@ -89,7 +89,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -226,10 +226,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/gapic-generator/tests/integration/goldens/redis/noxfile.py b/packages/gapic-generator/tests/integration/goldens/redis/noxfile.py index 74fe2c4c00ca..54b9e18c0574 100755 --- a/packages/gapic-generator/tests/integration/goldens/redis/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/redis/noxfile.py @@ -89,7 +89,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -226,10 +226,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/gapic-generator/tests/integration/goldens/redis_selective/noxfile.py b/packages/gapic-generator/tests/integration/goldens/redis_selective/noxfile.py index 74fe2c4c00ca..54b9e18c0574 100755 --- a/packages/gapic-generator/tests/integration/goldens/redis_selective/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/redis_selective/noxfile.py @@ -89,7 +89,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -226,10 +226,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/gapic-generator/tests/integration/goldens/storagebatchoperations/noxfile.py b/packages/gapic-generator/tests/integration/goldens/storagebatchoperations/noxfile.py index 21481d82a4b5..86bdb3ee17e9 100755 --- a/packages/gapic-generator/tests/integration/goldens/storagebatchoperations/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/storagebatchoperations/noxfile.py @@ -89,7 +89,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -226,10 +226,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-ads-admanager/noxfile.py b/packages/google-ads-admanager/noxfile.py index 2c7a657b8cd5..61d014782551 100644 --- a/packages/google-ads-admanager/noxfile.py +++ b/packages/google-ads-admanager/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-ads-datamanager/noxfile.py b/packages/google-ads-datamanager/noxfile.py index d29131921c87..6862c55aab31 100644 --- a/packages/google-ads-datamanager/noxfile.py +++ b/packages/google-ads-datamanager/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-ads-marketingplatform-admin/noxfile.py b/packages/google-ads-marketingplatform-admin/noxfile.py index 4f9d454e5604..fa9bbd3c08b9 100644 --- a/packages/google-ads-marketingplatform-admin/noxfile.py +++ b/packages/google-ads-marketingplatform-admin/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-ai-generativelanguage/noxfile.py b/packages/google-ai-generativelanguage/noxfile.py index cacc75f18917..c45e5abe8582 100644 --- a/packages/google-ai-generativelanguage/noxfile.py +++ b/packages/google-ai-generativelanguage/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-analytics-admin/noxfile.py b/packages/google-analytics-admin/noxfile.py index db6ae4056013..b917b1931d11 100644 --- a/packages/google-analytics-admin/noxfile.py +++ b/packages/google-analytics-admin/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-analytics-data/noxfile.py b/packages/google-analytics-data/noxfile.py index a83266fe5495..0419ce8456fa 100644 --- a/packages/google-analytics-data/noxfile.py +++ b/packages/google-analytics-data/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-apps-card/noxfile.py b/packages/google-apps-card/noxfile.py index 19efb08759ff..7ac29e974cc7 100644 --- a/packages/google-apps-card/noxfile.py +++ b/packages/google-apps-card/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-apps-chat/noxfile.py b/packages/google-apps-chat/noxfile.py index 7717313690f0..2f011b96d439 100644 --- a/packages/google-apps-chat/noxfile.py +++ b/packages/google-apps-chat/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-apps-events-subscriptions/noxfile.py b/packages/google-apps-events-subscriptions/noxfile.py index 58cb70b562c9..ede28ec65b43 100644 --- a/packages/google-apps-events-subscriptions/noxfile.py +++ b/packages/google-apps-events-subscriptions/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-apps-meet/noxfile.py b/packages/google-apps-meet/noxfile.py index abd9cabbc80b..98aba01927c3 100644 --- a/packages/google-apps-meet/noxfile.py +++ b/packages/google-apps-meet/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-apps-script-type/noxfile.py b/packages/google-apps-script-type/noxfile.py index 6e9741108a8f..b01ab6f3efaf 100644 --- a/packages/google-apps-script-type/noxfile.py +++ b/packages/google-apps-script-type/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-area120-tables/noxfile.py b/packages/google-area120-tables/noxfile.py index 54531fbbb5ab..686bf920e935 100644 --- a/packages/google-area120-tables/noxfile.py +++ b/packages/google-area120-tables/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-backstory/noxfile.py b/packages/google-backstory/noxfile.py index 9de52bd629f1..76b415da9f62 100644 --- a/packages/google-backstory/noxfile.py +++ b/packages/google-backstory/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-access-approval/noxfile.py b/packages/google-cloud-access-approval/noxfile.py index e3b5f77dff4a..41a6ea295b71 100644 --- a/packages/google-cloud-access-approval/noxfile.py +++ b/packages/google-cloud-access-approval/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-advisorynotifications/noxfile.py b/packages/google-cloud-advisorynotifications/noxfile.py index 5e60fa9f50fa..23f6a6e95f5e 100644 --- a/packages/google-cloud-advisorynotifications/noxfile.py +++ b/packages/google-cloud-advisorynotifications/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-agentidentity/noxfile.py b/packages/google-cloud-agentidentity/noxfile.py index 7c32a17e200f..be8d6381ef93 100644 --- a/packages/google-cloud-agentidentity/noxfile.py +++ b/packages/google-cloud-agentidentity/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-agentidentitycredentials/noxfile.py b/packages/google-cloud-agentidentitycredentials/noxfile.py index 5b91bb831b56..570d00fcb8bd 100644 --- a/packages/google-cloud-agentidentitycredentials/noxfile.py +++ b/packages/google-cloud-agentidentitycredentials/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-agentregistry/noxfile.py b/packages/google-cloud-agentregistry/noxfile.py index ee464b9dfafd..10d27186e1e2 100644 --- a/packages/google-cloud-agentregistry/noxfile.py +++ b/packages/google-cloud-agentregistry/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-alloydb-connectors/noxfile.py b/packages/google-cloud-alloydb-connectors/noxfile.py index ec3d140c7c9e..7c3770086763 100644 --- a/packages/google-cloud-alloydb-connectors/noxfile.py +++ b/packages/google-cloud-alloydb-connectors/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-alloydb/noxfile.py b/packages/google-cloud-alloydb/noxfile.py index 010d6564669f..cc233da4a76b 100644 --- a/packages/google-cloud-alloydb/noxfile.py +++ b/packages/google-cloud-alloydb/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-api-gateway/noxfile.py b/packages/google-cloud-api-gateway/noxfile.py index febe76e18cb8..86c3209fa21a 100644 --- a/packages/google-cloud-api-gateway/noxfile.py +++ b/packages/google-cloud-api-gateway/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-api-keys/noxfile.py b/packages/google-cloud-api-keys/noxfile.py index ed51fec08d75..87e6ff7ddc78 100644 --- a/packages/google-cloud-api-keys/noxfile.py +++ b/packages/google-cloud-api-keys/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-apigee-connect/noxfile.py b/packages/google-cloud-apigee-connect/noxfile.py index 9239b9113f81..10e8a266ef5a 100644 --- a/packages/google-cloud-apigee-connect/noxfile.py +++ b/packages/google-cloud-apigee-connect/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-apihub/noxfile.py b/packages/google-cloud-apihub/noxfile.py index 06838585086c..6f91795bf191 100644 --- a/packages/google-cloud-apihub/noxfile.py +++ b/packages/google-cloud-apihub/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-apiregistry/noxfile.py b/packages/google-cloud-apiregistry/noxfile.py index 4802e859096b..fd70b8903ca8 100644 --- a/packages/google-cloud-apiregistry/noxfile.py +++ b/packages/google-cloud-apiregistry/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-appengine-admin/noxfile.py b/packages/google-cloud-appengine-admin/noxfile.py index f0fd7b2da12f..22ef38d438ba 100644 --- a/packages/google-cloud-appengine-admin/noxfile.py +++ b/packages/google-cloud-appengine-admin/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-appengine-logging/noxfile.py b/packages/google-cloud-appengine-logging/noxfile.py index 1b525b6140de..e42ef328920c 100644 --- a/packages/google-cloud-appengine-logging/noxfile.py +++ b/packages/google-cloud-appengine-logging/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-apphub/noxfile.py b/packages/google-cloud-apphub/noxfile.py index 79fd3928a1ac..e50d80c58084 100644 --- a/packages/google-cloud-apphub/noxfile.py +++ b/packages/google-cloud-apphub/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-appoptimize/noxfile.py b/packages/google-cloud-appoptimize/noxfile.py index 3dba0ac5b24f..253b6df76cdc 100644 --- a/packages/google-cloud-appoptimize/noxfile.py +++ b/packages/google-cloud-appoptimize/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-apptopology/noxfile.py b/packages/google-cloud-apptopology/noxfile.py index adc6eea33f18..a0a43143a859 100644 --- a/packages/google-cloud-apptopology/noxfile.py +++ b/packages/google-cloud-apptopology/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-artifact-registry/noxfile.py b/packages/google-cloud-artifact-registry/noxfile.py index b89050d5d587..491aaa7b43eb 100644 --- a/packages/google-cloud-artifact-registry/noxfile.py +++ b/packages/google-cloud-artifact-registry/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-asset/noxfile.py b/packages/google-cloud-asset/noxfile.py index 74f7cad90428..18c23ae6c0bc 100644 --- a/packages/google-cloud-asset/noxfile.py +++ b/packages/google-cloud-asset/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-assured-workloads/noxfile.py b/packages/google-cloud-assured-workloads/noxfile.py index db31b1fd288e..2423ef1c2eba 100644 --- a/packages/google-cloud-assured-workloads/noxfile.py +++ b/packages/google-cloud-assured-workloads/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-auditmanager/noxfile.py b/packages/google-cloud-auditmanager/noxfile.py index 23fcadbbd162..c94f0524edaa 100644 --- a/packages/google-cloud-auditmanager/noxfile.py +++ b/packages/google-cloud-auditmanager/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-automl/noxfile.py b/packages/google-cloud-automl/noxfile.py index 4c85c01c6de6..7126dc39c7e8 100644 --- a/packages/google-cloud-automl/noxfile.py +++ b/packages/google-cloud-automl/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -240,10 +240,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-backupdr/noxfile.py b/packages/google-cloud-backupdr/noxfile.py index 539d13a7faf0..67c1a08d03fc 100644 --- a/packages/google-cloud-backupdr/noxfile.py +++ b/packages/google-cloud-backupdr/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-bare-metal-solution/noxfile.py b/packages/google-cloud-bare-metal-solution/noxfile.py index 18484d9388a2..51df9740b8e0 100644 --- a/packages/google-cloud-bare-metal-solution/noxfile.py +++ b/packages/google-cloud-bare-metal-solution/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-batch/noxfile.py b/packages/google-cloud-batch/noxfile.py index d09d94d13d80..d1dfd7e7d78e 100644 --- a/packages/google-cloud-batch/noxfile.py +++ b/packages/google-cloud-batch/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-beyondcorp-appconnections/noxfile.py b/packages/google-cloud-beyondcorp-appconnections/noxfile.py index 6065a00ec5eb..ea822b6f98d5 100644 --- a/packages/google-cloud-beyondcorp-appconnections/noxfile.py +++ b/packages/google-cloud-beyondcorp-appconnections/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-beyondcorp-appconnectors/noxfile.py b/packages/google-cloud-beyondcorp-appconnectors/noxfile.py index 4c955d7cbf4c..7dd6e2b3e05d 100644 --- a/packages/google-cloud-beyondcorp-appconnectors/noxfile.py +++ b/packages/google-cloud-beyondcorp-appconnectors/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-beyondcorp-appgateways/noxfile.py b/packages/google-cloud-beyondcorp-appgateways/noxfile.py index 03ef69f7bc8c..50996aa9ea2e 100644 --- a/packages/google-cloud-beyondcorp-appgateways/noxfile.py +++ b/packages/google-cloud-beyondcorp-appgateways/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/noxfile.py b/packages/google-cloud-beyondcorp-clientconnectorservices/noxfile.py index 0feacba627ac..e4eca0bd1956 100644 --- a/packages/google-cloud-beyondcorp-clientconnectorservices/noxfile.py +++ b/packages/google-cloud-beyondcorp-clientconnectorservices/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-beyondcorp-clientgateways/noxfile.py b/packages/google-cloud-beyondcorp-clientgateways/noxfile.py index 4cde1ae61db4..6cde85d3a622 100644 --- a/packages/google-cloud-beyondcorp-clientgateways/noxfile.py +++ b/packages/google-cloud-beyondcorp-clientgateways/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-biglake-hive/noxfile.py b/packages/google-cloud-biglake-hive/noxfile.py index e2d890cd8d89..b1bce3828d86 100644 --- a/packages/google-cloud-biglake-hive/noxfile.py +++ b/packages/google-cloud-biglake-hive/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-biglake/noxfile.py b/packages/google-cloud-biglake/noxfile.py index 0210e8e53777..52ac0d0741cc 100644 --- a/packages/google-cloud-biglake/noxfile.py +++ b/packages/google-cloud-biglake/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-bigquery-analyticshub/noxfile.py b/packages/google-cloud-bigquery-analyticshub/noxfile.py index 875c68ea5580..3bc04311c8e7 100644 --- a/packages/google-cloud-bigquery-analyticshub/noxfile.py +++ b/packages/google-cloud-bigquery-analyticshub/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-bigquery-biglake/noxfile.py b/packages/google-cloud-bigquery-biglake/noxfile.py index 5a666014c34f..a3753adb3553 100644 --- a/packages/google-cloud-bigquery-biglake/noxfile.py +++ b/packages/google-cloud-bigquery-biglake/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-bigquery-connection/noxfile.py b/packages/google-cloud-bigquery-connection/noxfile.py index ea63d910d334..cf6795c58017 100644 --- a/packages/google-cloud-bigquery-connection/noxfile.py +++ b/packages/google-cloud-bigquery-connection/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-bigquery-data-exchange/noxfile.py b/packages/google-cloud-bigquery-data-exchange/noxfile.py index fd99f5d69c74..d55d827c8f32 100644 --- a/packages/google-cloud-bigquery-data-exchange/noxfile.py +++ b/packages/google-cloud-bigquery-data-exchange/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-bigquery-datapolicies/noxfile.py b/packages/google-cloud-bigquery-datapolicies/noxfile.py index 92942f3e68e1..ed841f9d6ef1 100644 --- a/packages/google-cloud-bigquery-datapolicies/noxfile.py +++ b/packages/google-cloud-bigquery-datapolicies/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-bigquery-datatransfer/noxfile.py b/packages/google-cloud-bigquery-datatransfer/noxfile.py index 43a35d592ca2..38eef610c1b4 100644 --- a/packages/google-cloud-bigquery-datatransfer/noxfile.py +++ b/packages/google-cloud-bigquery-datatransfer/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-bigquery-logging/noxfile.py b/packages/google-cloud-bigquery-logging/noxfile.py index 9915bcb6a8cc..4ebb5fdc62ce 100644 --- a/packages/google-cloud-bigquery-logging/noxfile.py +++ b/packages/google-cloud-bigquery-logging/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-bigquery-migration/noxfile.py b/packages/google-cloud-bigquery-migration/noxfile.py index 19c50bfa97f3..3cb6a041ab2e 100644 --- a/packages/google-cloud-bigquery-migration/noxfile.py +++ b/packages/google-cloud-bigquery-migration/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-bigquery-reservation/noxfile.py b/packages/google-cloud-bigquery-reservation/noxfile.py index b8c35a23d37e..8e5f8934cb98 100644 --- a/packages/google-cloud-bigquery-reservation/noxfile.py +++ b/packages/google-cloud-bigquery-reservation/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-bigquery-storage/noxfile.py b/packages/google-cloud-bigquery-storage/noxfile.py index 25ad17358a5f..b02a9c5cd92e 100644 --- a/packages/google-cloud-bigquery-storage/noxfile.py +++ b/packages/google-cloud-bigquery-storage/noxfile.py @@ -104,7 +104,7 @@ "system-3.13", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -252,10 +252,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-bigtable/noxfile.py b/packages/google-cloud-bigtable/noxfile.py index fb5a3cab9c4b..0e2244885131 100644 --- a/packages/google-cloud-bigtable/noxfile.py +++ b/packages/google-cloud-bigtable/noxfile.py @@ -91,7 +91,7 @@ "mypy", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", "format", @@ -207,10 +207,11 @@ def mypy(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-billing-budgets/noxfile.py b/packages/google-cloud-billing-budgets/noxfile.py index 4c2ba5b998fa..3bb96bb56c1c 100644 --- a/packages/google-cloud-billing-budgets/noxfile.py +++ b/packages/google-cloud-billing-budgets/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-billing/noxfile.py b/packages/google-cloud-billing/noxfile.py index 4cc063d5889b..8c3be4ae683f 100644 --- a/packages/google-cloud-billing/noxfile.py +++ b/packages/google-cloud-billing/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-binary-authorization/noxfile.py b/packages/google-cloud-binary-authorization/noxfile.py index 1be5f0e8dee4..f8981beb955d 100644 --- a/packages/google-cloud-binary-authorization/noxfile.py +++ b/packages/google-cloud-binary-authorization/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-build/noxfile.py b/packages/google-cloud-build/noxfile.py index df166582ae68..5d34cc015827 100644 --- a/packages/google-cloud-build/noxfile.py +++ b/packages/google-cloud-build/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-capacityplanner/noxfile.py b/packages/google-cloud-capacityplanner/noxfile.py index c589e6ecbcb7..953bba0751f4 100644 --- a/packages/google-cloud-capacityplanner/noxfile.py +++ b/packages/google-cloud-capacityplanner/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-certificate-manager/noxfile.py b/packages/google-cloud-certificate-manager/noxfile.py index d7699245358c..62d45b84a288 100644 --- a/packages/google-cloud-certificate-manager/noxfile.py +++ b/packages/google-cloud-certificate-manager/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-ces/noxfile.py b/packages/google-cloud-ces/noxfile.py index fcf6da56bb00..b74075abc334 100644 --- a/packages/google-cloud-ces/noxfile.py +++ b/packages/google-cloud-ces/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-channel/noxfile.py b/packages/google-cloud-channel/noxfile.py index 998a7517623e..f080f580b4e3 100644 --- a/packages/google-cloud-channel/noxfile.py +++ b/packages/google-cloud-channel/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-chronicle/noxfile.py b/packages/google-cloud-chronicle/noxfile.py index 4711f56793d7..90261276165f 100644 --- a/packages/google-cloud-chronicle/noxfile.py +++ b/packages/google-cloud-chronicle/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-cloudcontrolspartner/noxfile.py b/packages/google-cloud-cloudcontrolspartner/noxfile.py index 7486366b3523..5c2a167f56a1 100644 --- a/packages/google-cloud-cloudcontrolspartner/noxfile.py +++ b/packages/google-cloud-cloudcontrolspartner/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-cloudsecuritycompliance/noxfile.py b/packages/google-cloud-cloudsecuritycompliance/noxfile.py index 0d79b5e1fa80..d39482694f6b 100644 --- a/packages/google-cloud-cloudsecuritycompliance/noxfile.py +++ b/packages/google-cloud-cloudsecuritycompliance/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-commerce-consumer-procurement/noxfile.py b/packages/google-cloud-commerce-consumer-procurement/noxfile.py index 63bdc2747d88..985dc14ce65d 100644 --- a/packages/google-cloud-commerce-consumer-procurement/noxfile.py +++ b/packages/google-cloud-commerce-consumer-procurement/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-commerceproducer/noxfile.py b/packages/google-cloud-commerceproducer/noxfile.py index e247d9cb847f..c06a90d71eb1 100644 --- a/packages/google-cloud-commerceproducer/noxfile.py +++ b/packages/google-cloud-commerceproducer/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-common/noxfile.py b/packages/google-cloud-common/noxfile.py index bdf82aa7286c..6d2668b01a5b 100644 --- a/packages/google-cloud-common/noxfile.py +++ b/packages/google-cloud-common/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-compute-v1beta/noxfile.py b/packages/google-cloud-compute-v1beta/noxfile.py index c5e34c8c2a7c..5eee8db792b7 100644 --- a/packages/google-cloud-compute-v1beta/noxfile.py +++ b/packages/google-cloud-compute-v1beta/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-compute/noxfile.py b/packages/google-cloud-compute/noxfile.py index 07995bbd0b40..fcfadb340ba7 100644 --- a/packages/google-cloud-compute/noxfile.py +++ b/packages/google-cloud-compute/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-confidentialcomputing/noxfile.py b/packages/google-cloud-confidentialcomputing/noxfile.py index 0689bef0eea6..b0867c405c58 100644 --- a/packages/google-cloud-confidentialcomputing/noxfile.py +++ b/packages/google-cloud-confidentialcomputing/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-config/noxfile.py b/packages/google-cloud-config/noxfile.py index 822a699e074a..7587fe5db657 100644 --- a/packages/google-cloud-config/noxfile.py +++ b/packages/google-cloud-config/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-configdelivery/noxfile.py b/packages/google-cloud-configdelivery/noxfile.py index 78bbad6e6d85..9aca8ac9703a 100644 --- a/packages/google-cloud-configdelivery/noxfile.py +++ b/packages/google-cloud-configdelivery/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-contact-center-insights/noxfile.py b/packages/google-cloud-contact-center-insights/noxfile.py index b176842473d6..f890031901ae 100644 --- a/packages/google-cloud-contact-center-insights/noxfile.py +++ b/packages/google-cloud-contact-center-insights/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-container/noxfile.py b/packages/google-cloud-container/noxfile.py index 6045a2668f9c..ae59fb2eba42 100644 --- a/packages/google-cloud-container/noxfile.py +++ b/packages/google-cloud-container/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-containeranalysis/noxfile.py b/packages/google-cloud-containeranalysis/noxfile.py index 170a669ac4f7..72c67445354a 100644 --- a/packages/google-cloud-containeranalysis/noxfile.py +++ b/packages/google-cloud-containeranalysis/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-contentwarehouse/noxfile.py b/packages/google-cloud-contentwarehouse/noxfile.py index e51db01d3e77..eea719c2b0f5 100644 --- a/packages/google-cloud-contentwarehouse/noxfile.py +++ b/packages/google-cloud-contentwarehouse/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-data-fusion/noxfile.py b/packages/google-cloud-data-fusion/noxfile.py index 50d5b3d26c82..a7977d6eda08 100644 --- a/packages/google-cloud-data-fusion/noxfile.py +++ b/packages/google-cloud-data-fusion/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-data-qna/noxfile.py b/packages/google-cloud-data-qna/noxfile.py index ca7bab884c28..2c8fe7cd68d7 100644 --- a/packages/google-cloud-data-qna/noxfile.py +++ b/packages/google-cloud-data-qna/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-databasecenter/noxfile.py b/packages/google-cloud-databasecenter/noxfile.py index 15f55104b5f7..9c52809b16c3 100644 --- a/packages/google-cloud-databasecenter/noxfile.py +++ b/packages/google-cloud-databasecenter/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-datacatalog-lineage-configmanagement/noxfile.py b/packages/google-cloud-datacatalog-lineage-configmanagement/noxfile.py index 72fe955b4532..5626fa6adb0a 100644 --- a/packages/google-cloud-datacatalog-lineage-configmanagement/noxfile.py +++ b/packages/google-cloud-datacatalog-lineage-configmanagement/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-datacatalog-lineage/noxfile.py b/packages/google-cloud-datacatalog-lineage/noxfile.py index 609b7fb3d77b..cd57f6464883 100644 --- a/packages/google-cloud-datacatalog-lineage/noxfile.py +++ b/packages/google-cloud-datacatalog-lineage/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-datacatalog/noxfile.py b/packages/google-cloud-datacatalog/noxfile.py index 9638db03c8de..4f6070eca91d 100644 --- a/packages/google-cloud-datacatalog/noxfile.py +++ b/packages/google-cloud-datacatalog/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-dataflow-client/noxfile.py b/packages/google-cloud-dataflow-client/noxfile.py index cbff92e6d02f..b48223e30bb6 100644 --- a/packages/google-cloud-dataflow-client/noxfile.py +++ b/packages/google-cloud-dataflow-client/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-dataform/noxfile.py b/packages/google-cloud-dataform/noxfile.py index 4956d64dd92c..77674d395f53 100644 --- a/packages/google-cloud-dataform/noxfile.py +++ b/packages/google-cloud-dataform/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-datalabeling/noxfile.py b/packages/google-cloud-datalabeling/noxfile.py index e232fe9c4c30..2f29b2d2a9cd 100644 --- a/packages/google-cloud-datalabeling/noxfile.py +++ b/packages/google-cloud-datalabeling/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-dataplex/noxfile.py b/packages/google-cloud-dataplex/noxfile.py index 5ce858ba083d..56479bed2c9d 100644 --- a/packages/google-cloud-dataplex/noxfile.py +++ b/packages/google-cloud-dataplex/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-dataproc-metastore/noxfile.py b/packages/google-cloud-dataproc-metastore/noxfile.py index 4c69ec12556d..4374a4b1d36c 100644 --- a/packages/google-cloud-dataproc-metastore/noxfile.py +++ b/packages/google-cloud-dataproc-metastore/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-dataproc/noxfile.py b/packages/google-cloud-dataproc/noxfile.py index 0154da33ec1f..a141c40ec220 100644 --- a/packages/google-cloud-dataproc/noxfile.py +++ b/packages/google-cloud-dataproc/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-datastore/noxfile.py b/packages/google-cloud-datastore/noxfile.py index 46a112cde5ff..8c8c8cc258ef 100644 --- a/packages/google-cloud-datastore/noxfile.py +++ b/packages/google-cloud-datastore/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -240,10 +240,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-datastream/noxfile.py b/packages/google-cloud-datastream/noxfile.py index 0b4d9670a560..5a0bb58e4286 100644 --- a/packages/google-cloud-datastream/noxfile.py +++ b/packages/google-cloud-datastream/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-deploy/noxfile.py b/packages/google-cloud-deploy/noxfile.py index 29e7e1bee1f5..827111cdbd2b 100644 --- a/packages/google-cloud-deploy/noxfile.py +++ b/packages/google-cloud-deploy/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-developerconnect/noxfile.py b/packages/google-cloud-developerconnect/noxfile.py index 77f268e4c24d..d8d97f80d76a 100644 --- a/packages/google-cloud-developerconnect/noxfile.py +++ b/packages/google-cloud-developerconnect/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-devicestreaming/noxfile.py b/packages/google-cloud-devicestreaming/noxfile.py index e4107f55ef71..a1cfc2e36b0d 100644 --- a/packages/google-cloud-devicestreaming/noxfile.py +++ b/packages/google-cloud-devicestreaming/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-dialogflow-cx/noxfile.py b/packages/google-cloud-dialogflow-cx/noxfile.py index 4f3e0ebbd84f..d0fe9df31235 100644 --- a/packages/google-cloud-dialogflow-cx/noxfile.py +++ b/packages/google-cloud-dialogflow-cx/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-dialogflow/noxfile.py b/packages/google-cloud-dialogflow/noxfile.py index e37a963ebd40..b4c708e7b1af 100644 --- a/packages/google-cloud-dialogflow/noxfile.py +++ b/packages/google-cloud-dialogflow/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-discoveryengine/noxfile.py b/packages/google-cloud-discoveryengine/noxfile.py index 45796a24486f..1be0c50c9506 100644 --- a/packages/google-cloud-discoveryengine/noxfile.py +++ b/packages/google-cloud-discoveryengine/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-dlp/noxfile.py b/packages/google-cloud-dlp/noxfile.py index 76c93201cef6..df162e4f3357 100644 --- a/packages/google-cloud-dlp/noxfile.py +++ b/packages/google-cloud-dlp/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-dms/noxfile.py b/packages/google-cloud-dms/noxfile.py index 67c3d9a9602f..7c8fedec9a7e 100644 --- a/packages/google-cloud-dms/noxfile.py +++ b/packages/google-cloud-dms/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-documentai/noxfile.py b/packages/google-cloud-documentai/noxfile.py index 0297ff823d62..d85ae21360af 100644 --- a/packages/google-cloud-documentai/noxfile.py +++ b/packages/google-cloud-documentai/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-domains/noxfile.py b/packages/google-cloud-domains/noxfile.py index bf0813ec95e7..aac5507614b4 100644 --- a/packages/google-cloud-domains/noxfile.py +++ b/packages/google-cloud-domains/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-edgecontainer/noxfile.py b/packages/google-cloud-edgecontainer/noxfile.py index 7fbb41d600c5..f4fe4b6c38dc 100644 --- a/packages/google-cloud-edgecontainer/noxfile.py +++ b/packages/google-cloud-edgecontainer/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-edgenetwork/noxfile.py b/packages/google-cloud-edgenetwork/noxfile.py index 2818beec95c2..e01af05a0c76 100644 --- a/packages/google-cloud-edgenetwork/noxfile.py +++ b/packages/google-cloud-edgenetwork/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-enterpriseknowledgegraph/noxfile.py b/packages/google-cloud-enterpriseknowledgegraph/noxfile.py index 7d393e099d28..ff91c1917bfa 100644 --- a/packages/google-cloud-enterpriseknowledgegraph/noxfile.py +++ b/packages/google-cloud-enterpriseknowledgegraph/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-error-reporting/noxfile.py b/packages/google-cloud-error-reporting/noxfile.py index 8b5b1434a59d..105315ea43fc 100644 --- a/packages/google-cloud-error-reporting/noxfile.py +++ b/packages/google-cloud-error-reporting/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -240,10 +240,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-essential-contacts/noxfile.py b/packages/google-cloud-essential-contacts/noxfile.py index cd159b06e576..59023a7a13f1 100644 --- a/packages/google-cloud-essential-contacts/noxfile.py +++ b/packages/google-cloud-essential-contacts/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-eventarc-publishing/noxfile.py b/packages/google-cloud-eventarc-publishing/noxfile.py index 44d680d34f94..afe35d2c8c8e 100644 --- a/packages/google-cloud-eventarc-publishing/noxfile.py +++ b/packages/google-cloud-eventarc-publishing/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-eventarc/noxfile.py b/packages/google-cloud-eventarc/noxfile.py index 7397ddfa50e1..1380cc48cdd9 100644 --- a/packages/google-cloud-eventarc/noxfile.py +++ b/packages/google-cloud-eventarc/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-filestore/noxfile.py b/packages/google-cloud-filestore/noxfile.py index 390f9638f593..80eafb1af98a 100644 --- a/packages/google-cloud-filestore/noxfile.py +++ b/packages/google-cloud-filestore/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-financialservices/noxfile.py b/packages/google-cloud-financialservices/noxfile.py index 7bc154b56b2f..3b915ac76e9b 100644 --- a/packages/google-cloud-financialservices/noxfile.py +++ b/packages/google-cloud-financialservices/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-firestore/noxfile.py b/packages/google-cloud-firestore/noxfile.py index bd9a930f7047..5fbf0992f9ba 100644 --- a/packages/google-cloud-firestore/noxfile.py +++ b/packages/google-cloud-firestore/noxfile.py @@ -101,7 +101,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -298,10 +298,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-ftp/noxfile.py b/packages/google-cloud-ftp/noxfile.py index 34419d092ae0..8d0a14087708 100644 --- a/packages/google-cloud-ftp/noxfile.py +++ b/packages/google-cloud-ftp/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-functions/noxfile.py b/packages/google-cloud-functions/noxfile.py index 7b175d1a8326..34e6b676eb26 100644 --- a/packages/google-cloud-functions/noxfile.py +++ b/packages/google-cloud-functions/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-gdchardwaremanagement/noxfile.py b/packages/google-cloud-gdchardwaremanagement/noxfile.py index 9a62d136eea4..e928aa1e86e0 100644 --- a/packages/google-cloud-gdchardwaremanagement/noxfile.py +++ b/packages/google-cloud-gdchardwaremanagement/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-geminidataanalytics/noxfile.py b/packages/google-cloud-geminidataanalytics/noxfile.py index bbc7d7c6691c..8fb0490e3d95 100644 --- a/packages/google-cloud-geminidataanalytics/noxfile.py +++ b/packages/google-cloud-geminidataanalytics/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-gke-backup/noxfile.py b/packages/google-cloud-gke-backup/noxfile.py index c731ce7e2a7c..4e0735536ac4 100644 --- a/packages/google-cloud-gke-backup/noxfile.py +++ b/packages/google-cloud-gke-backup/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-gke-connect-gateway/noxfile.py b/packages/google-cloud-gke-connect-gateway/noxfile.py index 5b0ad686812c..f325542b4308 100644 --- a/packages/google-cloud-gke-connect-gateway/noxfile.py +++ b/packages/google-cloud-gke-connect-gateway/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-gke-hub/noxfile.py b/packages/google-cloud-gke-hub/noxfile.py index 6129a11dbd88..dc3a3ff5cd90 100644 --- a/packages/google-cloud-gke-hub/noxfile.py +++ b/packages/google-cloud-gke-hub/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-gke-multicloud/noxfile.py b/packages/google-cloud-gke-multicloud/noxfile.py index 17289cd7d25d..54c42cb4ff4c 100644 --- a/packages/google-cloud-gke-multicloud/noxfile.py +++ b/packages/google-cloud-gke-multicloud/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-gkerecommender/noxfile.py b/packages/google-cloud-gkerecommender/noxfile.py index 9c45e0c7c0a0..e0ced4196b73 100644 --- a/packages/google-cloud-gkerecommender/noxfile.py +++ b/packages/google-cloud-gkerecommender/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-gsuiteaddons/noxfile.py b/packages/google-cloud-gsuiteaddons/noxfile.py index 5ceba8ecd2c1..ca9d9d466782 100644 --- a/packages/google-cloud-gsuiteaddons/noxfile.py +++ b/packages/google-cloud-gsuiteaddons/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-hypercomputecluster/noxfile.py b/packages/google-cloud-hypercomputecluster/noxfile.py index d87fefc8ef9d..3f85b9666518 100644 --- a/packages/google-cloud-hypercomputecluster/noxfile.py +++ b/packages/google-cloud-hypercomputecluster/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-iam-logging/noxfile.py b/packages/google-cloud-iam-logging/noxfile.py index c88deb45d915..ae5494071d9f 100644 --- a/packages/google-cloud-iam-logging/noxfile.py +++ b/packages/google-cloud-iam-logging/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-iam/noxfile.py b/packages/google-cloud-iam/noxfile.py index 6188bec0a506..c1985fa6f071 100644 --- a/packages/google-cloud-iam/noxfile.py +++ b/packages/google-cloud-iam/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-iamconnectorcredentials/noxfile.py b/packages/google-cloud-iamconnectorcredentials/noxfile.py index e37c417a065c..4515f6fdbb1a 100644 --- a/packages/google-cloud-iamconnectorcredentials/noxfile.py +++ b/packages/google-cloud-iamconnectorcredentials/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-iap/noxfile.py b/packages/google-cloud-iap/noxfile.py index 17e3c6790c96..eb3f3f8e4e2c 100644 --- a/packages/google-cloud-iap/noxfile.py +++ b/packages/google-cloud-iap/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-ids/noxfile.py b/packages/google-cloud-ids/noxfile.py index 641b7cbea4a7..2cb8def1340b 100644 --- a/packages/google-cloud-ids/noxfile.py +++ b/packages/google-cloud-ids/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-kms-inventory/noxfile.py b/packages/google-cloud-kms-inventory/noxfile.py index 3121f4ebad81..68f0ba1f2188 100644 --- a/packages/google-cloud-kms-inventory/noxfile.py +++ b/packages/google-cloud-kms-inventory/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-kms/noxfile.py b/packages/google-cloud-kms/noxfile.py index 3a71542ceb3e..a2d694541f32 100644 --- a/packages/google-cloud-kms/noxfile.py +++ b/packages/google-cloud-kms/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-language/noxfile.py b/packages/google-cloud-language/noxfile.py index 0ad6a5751ba8..253e26ec4b54 100644 --- a/packages/google-cloud-language/noxfile.py +++ b/packages/google-cloud-language/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-licensemanager/noxfile.py b/packages/google-cloud-licensemanager/noxfile.py index 70c22c0c22fa..83c6f2c1a9cd 100644 --- a/packages/google-cloud-licensemanager/noxfile.py +++ b/packages/google-cloud-licensemanager/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-life-sciences/noxfile.py b/packages/google-cloud-life-sciences/noxfile.py index bdf321ed0d16..4c48e3bb86bf 100644 --- a/packages/google-cloud-life-sciences/noxfile.py +++ b/packages/google-cloud-life-sciences/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-locationfinder/noxfile.py b/packages/google-cloud-locationfinder/noxfile.py index 0695c3ed6c4d..3e77591927a8 100644 --- a/packages/google-cloud-locationfinder/noxfile.py +++ b/packages/google-cloud-locationfinder/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-logging/noxfile.py b/packages/google-cloud-logging/noxfile.py index edc97f0cf4f5..c2ba48095c11 100644 --- a/packages/google-cloud-logging/noxfile.py +++ b/packages/google-cloud-logging/noxfile.py @@ -103,7 +103,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -252,10 +252,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-lustre/noxfile.py b/packages/google-cloud-lustre/noxfile.py index 7fbc07499128..f44906c4fe4b 100644 --- a/packages/google-cloud-lustre/noxfile.py +++ b/packages/google-cloud-lustre/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-maintenance-api/noxfile.py b/packages/google-cloud-maintenance-api/noxfile.py index d70266ac034f..589560d8f793 100644 --- a/packages/google-cloud-maintenance-api/noxfile.py +++ b/packages/google-cloud-maintenance-api/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-managed-identities/noxfile.py b/packages/google-cloud-managed-identities/noxfile.py index 8ec9034961ac..42317f809a84 100644 --- a/packages/google-cloud-managed-identities/noxfile.py +++ b/packages/google-cloud-managed-identities/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-managedkafka-schemaregistry/noxfile.py b/packages/google-cloud-managedkafka-schemaregistry/noxfile.py index 77a91d24bd32..4c81e43f7565 100644 --- a/packages/google-cloud-managedkafka-schemaregistry/noxfile.py +++ b/packages/google-cloud-managedkafka-schemaregistry/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-managedkafka/noxfile.py b/packages/google-cloud-managedkafka/noxfile.py index 89a10180aeb0..6c9c8df08990 100644 --- a/packages/google-cloud-managedkafka/noxfile.py +++ b/packages/google-cloud-managedkafka/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-media-translation/noxfile.py b/packages/google-cloud-media-translation/noxfile.py index 8269c727f9ca..69ca4fa12802 100644 --- a/packages/google-cloud-media-translation/noxfile.py +++ b/packages/google-cloud-media-translation/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-memcache/noxfile.py b/packages/google-cloud-memcache/noxfile.py index ab9d2f8aaa5d..747c3e8512e8 100644 --- a/packages/google-cloud-memcache/noxfile.py +++ b/packages/google-cloud-memcache/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-memorystore/noxfile.py b/packages/google-cloud-memorystore/noxfile.py index a05495b9b511..d6048e8d6cc8 100644 --- a/packages/google-cloud-memorystore/noxfile.py +++ b/packages/google-cloud-memorystore/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-migrationcenter/noxfile.py b/packages/google-cloud-migrationcenter/noxfile.py index 897d3d8a8324..37734b2dd1da 100644 --- a/packages/google-cloud-migrationcenter/noxfile.py +++ b/packages/google-cloud-migrationcenter/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-modelarmor/noxfile.py b/packages/google-cloud-modelarmor/noxfile.py index 2d219bc7f05e..8c17d7ea20ed 100644 --- a/packages/google-cloud-modelarmor/noxfile.py +++ b/packages/google-cloud-modelarmor/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-monitoring-dashboards/noxfile.py b/packages/google-cloud-monitoring-dashboards/noxfile.py index 5f19c9a057f6..f6029888040b 100644 --- a/packages/google-cloud-monitoring-dashboards/noxfile.py +++ b/packages/google-cloud-monitoring-dashboards/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -240,10 +240,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-monitoring-metrics-scopes/noxfile.py b/packages/google-cloud-monitoring-metrics-scopes/noxfile.py index c3b66214789e..3a3223e146a7 100644 --- a/packages/google-cloud-monitoring-metrics-scopes/noxfile.py +++ b/packages/google-cloud-monitoring-metrics-scopes/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-monitoring/noxfile.py b/packages/google-cloud-monitoring/noxfile.py index 623a18d06858..cc9431f3d2d0 100644 --- a/packages/google-cloud-monitoring/noxfile.py +++ b/packages/google-cloud-monitoring/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -241,10 +241,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-netapp/noxfile.py b/packages/google-cloud-netapp/noxfile.py index 048576a24605..6ecbad9068e6 100644 --- a/packages/google-cloud-netapp/noxfile.py +++ b/packages/google-cloud-netapp/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-network-connectivity/noxfile.py b/packages/google-cloud-network-connectivity/noxfile.py index f4f5dc72b0e9..ba27df2d6bed 100644 --- a/packages/google-cloud-network-connectivity/noxfile.py +++ b/packages/google-cloud-network-connectivity/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-network-management/noxfile.py b/packages/google-cloud-network-management/noxfile.py index c663416c0903..aea7d134a6f8 100644 --- a/packages/google-cloud-network-management/noxfile.py +++ b/packages/google-cloud-network-management/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-network-security/noxfile.py b/packages/google-cloud-network-security/noxfile.py index 4973417ede27..d87f0d8a1986 100644 --- a/packages/google-cloud-network-security/noxfile.py +++ b/packages/google-cloud-network-security/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-network-services/noxfile.py b/packages/google-cloud-network-services/noxfile.py index 25d04f6028f5..ab84a4876e5d 100644 --- a/packages/google-cloud-network-services/noxfile.py +++ b/packages/google-cloud-network-services/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-notebooks/noxfile.py b/packages/google-cloud-notebooks/noxfile.py index f7dcaad6f584..a4e549c81952 100644 --- a/packages/google-cloud-notebooks/noxfile.py +++ b/packages/google-cloud-notebooks/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-optimization/noxfile.py b/packages/google-cloud-optimization/noxfile.py index b4ced85392a3..412055dc0a8b 100644 --- a/packages/google-cloud-optimization/noxfile.py +++ b/packages/google-cloud-optimization/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-oracledatabase/noxfile.py b/packages/google-cloud-oracledatabase/noxfile.py index 85a03eae75af..bbbc6237f109 100644 --- a/packages/google-cloud-oracledatabase/noxfile.py +++ b/packages/google-cloud-oracledatabase/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-orchestration-airflow/noxfile.py b/packages/google-cloud-orchestration-airflow/noxfile.py index 40e229b972eb..ae8e78cc9bea 100644 --- a/packages/google-cloud-orchestration-airflow/noxfile.py +++ b/packages/google-cloud-orchestration-airflow/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-org-policy/noxfile.py b/packages/google-cloud-org-policy/noxfile.py index 3e06aa1f5354..3c8a967916b3 100644 --- a/packages/google-cloud-org-policy/noxfile.py +++ b/packages/google-cloud-org-policy/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-os-config/noxfile.py b/packages/google-cloud-os-config/noxfile.py index 5c41f4ff5ba0..5740de6dd713 100644 --- a/packages/google-cloud-os-config/noxfile.py +++ b/packages/google-cloud-os-config/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-os-login/noxfile.py b/packages/google-cloud-os-login/noxfile.py index a455bad9ab64..79aa968b6725 100644 --- a/packages/google-cloud-os-login/noxfile.py +++ b/packages/google-cloud-os-login/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-parallelstore/noxfile.py b/packages/google-cloud-parallelstore/noxfile.py index 7d284a2deb2c..fa2062e12a73 100644 --- a/packages/google-cloud-parallelstore/noxfile.py +++ b/packages/google-cloud-parallelstore/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-parametermanager/noxfile.py b/packages/google-cloud-parametermanager/noxfile.py index 9bbf1391a5ec..6823e895f670 100644 --- a/packages/google-cloud-parametermanager/noxfile.py +++ b/packages/google-cloud-parametermanager/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-phishing-protection/noxfile.py b/packages/google-cloud-phishing-protection/noxfile.py index 17d96eec9412..0104d57caeee 100644 --- a/packages/google-cloud-phishing-protection/noxfile.py +++ b/packages/google-cloud-phishing-protection/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-policy-troubleshooter/noxfile.py b/packages/google-cloud-policy-troubleshooter/noxfile.py index ebd0fed03252..2c392db54082 100644 --- a/packages/google-cloud-policy-troubleshooter/noxfile.py +++ b/packages/google-cloud-policy-troubleshooter/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-policysimulator/noxfile.py b/packages/google-cloud-policysimulator/noxfile.py index 12a72752f1bf..f27967b84064 100644 --- a/packages/google-cloud-policysimulator/noxfile.py +++ b/packages/google-cloud-policysimulator/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-policytroubleshooter-iam/noxfile.py b/packages/google-cloud-policytroubleshooter-iam/noxfile.py index 7a4fbc888517..7ee547f1524c 100644 --- a/packages/google-cloud-policytroubleshooter-iam/noxfile.py +++ b/packages/google-cloud-policytroubleshooter-iam/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-private-ca/noxfile.py b/packages/google-cloud-private-ca/noxfile.py index 28e0f4ac3539..398678aba8ad 100644 --- a/packages/google-cloud-private-ca/noxfile.py +++ b/packages/google-cloud-private-ca/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-private-catalog/noxfile.py b/packages/google-cloud-private-catalog/noxfile.py index 19b1ad978481..8d20f0ff0be8 100644 --- a/packages/google-cloud-private-catalog/noxfile.py +++ b/packages/google-cloud-private-catalog/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-privilegedaccessmanager/noxfile.py b/packages/google-cloud-privilegedaccessmanager/noxfile.py index c22f917195b8..4e8963e11bb5 100644 --- a/packages/google-cloud-privilegedaccessmanager/noxfile.py +++ b/packages/google-cloud-privilegedaccessmanager/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-productregistry/noxfile.py b/packages/google-cloud-productregistry/noxfile.py index e649af8196ab..e809929e21cb 100644 --- a/packages/google-cloud-productregistry/noxfile.py +++ b/packages/google-cloud-productregistry/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-pubsub/noxfile.py b/packages/google-cloud-pubsub/noxfile.py index d97d24973e43..bb50c8ccabe8 100644 --- a/packages/google-cloud-pubsub/noxfile.py +++ b/packages/google-cloud-pubsub/noxfile.py @@ -110,7 +110,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "mypy", # https://github.com/googleapis/python-pubsub/pull/552#issuecomment-1016256936 @@ -297,10 +297,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-quotas/noxfile.py b/packages/google-cloud-quotas/noxfile.py index afbaa0d59bd6..7c446a561d32 100644 --- a/packages/google-cloud-quotas/noxfile.py +++ b/packages/google-cloud-quotas/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-rapidmigrationassessment/noxfile.py b/packages/google-cloud-rapidmigrationassessment/noxfile.py index 19562da16e19..c6898868e7e5 100644 --- a/packages/google-cloud-rapidmigrationassessment/noxfile.py +++ b/packages/google-cloud-rapidmigrationassessment/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-recaptcha-enterprise/noxfile.py b/packages/google-cloud-recaptcha-enterprise/noxfile.py index d6587c9804f0..26915cca540f 100644 --- a/packages/google-cloud-recaptcha-enterprise/noxfile.py +++ b/packages/google-cloud-recaptcha-enterprise/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-recommendations-ai/noxfile.py b/packages/google-cloud-recommendations-ai/noxfile.py index 200ec93d232b..d1933b6e3757 100644 --- a/packages/google-cloud-recommendations-ai/noxfile.py +++ b/packages/google-cloud-recommendations-ai/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-recommender/noxfile.py b/packages/google-cloud-recommender/noxfile.py index 8d14eac02b93..b8164ef19296 100644 --- a/packages/google-cloud-recommender/noxfile.py +++ b/packages/google-cloud-recommender/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-redis-cluster/noxfile.py b/packages/google-cloud-redis-cluster/noxfile.py index f237094a5bda..0b08041e36ee 100644 --- a/packages/google-cloud-redis-cluster/noxfile.py +++ b/packages/google-cloud-redis-cluster/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-redis/noxfile.py b/packages/google-cloud-redis/noxfile.py index 54a60a0461b0..6c957add8788 100644 --- a/packages/google-cloud-redis/noxfile.py +++ b/packages/google-cloud-redis/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-resource-manager/noxfile.py b/packages/google-cloud-resource-manager/noxfile.py index 73690fe8bf90..fb8833ec3460 100644 --- a/packages/google-cloud-resource-manager/noxfile.py +++ b/packages/google-cloud-resource-manager/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-retail/noxfile.py b/packages/google-cloud-retail/noxfile.py index 86db514d7fb8..2ec898af2839 100644 --- a/packages/google-cloud-retail/noxfile.py +++ b/packages/google-cloud-retail/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-run/noxfile.py b/packages/google-cloud-run/noxfile.py index 87f38ce040e5..8813933874db 100644 --- a/packages/google-cloud-run/noxfile.py +++ b/packages/google-cloud-run/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-saasplatform-saasservicemgmt/noxfile.py b/packages/google-cloud-saasplatform-saasservicemgmt/noxfile.py index 3a76db4d5a06..21ac6bab688b 100644 --- a/packages/google-cloud-saasplatform-saasservicemgmt/noxfile.py +++ b/packages/google-cloud-saasplatform-saasservicemgmt/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-scheduler/noxfile.py b/packages/google-cloud-scheduler/noxfile.py index c901ecef64c9..97bcf9861742 100644 --- a/packages/google-cloud-scheduler/noxfile.py +++ b/packages/google-cloud-scheduler/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-secret-manager/noxfile.py b/packages/google-cloud-secret-manager/noxfile.py index 2d493d954928..8d5ffdfa6b3d 100644 --- a/packages/google-cloud-secret-manager/noxfile.py +++ b/packages/google-cloud-secret-manager/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-securesourcemanager/noxfile.py b/packages/google-cloud-securesourcemanager/noxfile.py index b437a71f8f75..e1a455125413 100644 --- a/packages/google-cloud-securesourcemanager/noxfile.py +++ b/packages/google-cloud-securesourcemanager/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-security-publicca/noxfile.py b/packages/google-cloud-security-publicca/noxfile.py index 2b233164d6e2..262f6f672f41 100644 --- a/packages/google-cloud-security-publicca/noxfile.py +++ b/packages/google-cloud-security-publicca/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-securitycenter/noxfile.py b/packages/google-cloud-securitycenter/noxfile.py index 2345db2f5d33..07408a3a4404 100644 --- a/packages/google-cloud-securitycenter/noxfile.py +++ b/packages/google-cloud-securitycenter/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-securitycentermanagement/noxfile.py b/packages/google-cloud-securitycentermanagement/noxfile.py index 8cbef8176766..9349ca33605b 100644 --- a/packages/google-cloud-securitycentermanagement/noxfile.py +++ b/packages/google-cloud-securitycentermanagement/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-service-control/noxfile.py b/packages/google-cloud-service-control/noxfile.py index 99515d75aebc..f64b8144e75e 100644 --- a/packages/google-cloud-service-control/noxfile.py +++ b/packages/google-cloud-service-control/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-service-directory/noxfile.py b/packages/google-cloud-service-directory/noxfile.py index c94ce6da0cf2..e940a43e4f20 100644 --- a/packages/google-cloud-service-directory/noxfile.py +++ b/packages/google-cloud-service-directory/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-service-management/noxfile.py b/packages/google-cloud-service-management/noxfile.py index b1899c305e04..800c766be9d9 100644 --- a/packages/google-cloud-service-management/noxfile.py +++ b/packages/google-cloud-service-management/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-service-usage/noxfile.py b/packages/google-cloud-service-usage/noxfile.py index 09762a8c2a92..f5cf78d544a5 100644 --- a/packages/google-cloud-service-usage/noxfile.py +++ b/packages/google-cloud-service-usage/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-servicehealth/noxfile.py b/packages/google-cloud-servicehealth/noxfile.py index c67cf2522b1e..75f6e8f9c6ed 100644 --- a/packages/google-cloud-servicehealth/noxfile.py +++ b/packages/google-cloud-servicehealth/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-shell/noxfile.py b/packages/google-cloud-shell/noxfile.py index 48fa6df1b5ff..c99fda8910e0 100644 --- a/packages/google-cloud-shell/noxfile.py +++ b/packages/google-cloud-shell/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-source-context/noxfile.py b/packages/google-cloud-source-context/noxfile.py index 721244ab422e..3eff7efc13cf 100644 --- a/packages/google-cloud-source-context/noxfile.py +++ b/packages/google-cloud-source-context/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-spanner/noxfile.py b/packages/google-cloud-spanner/noxfile.py index ff5ebf5d1712..67ea99cf611a 100644 --- a/packages/google-cloud-spanner/noxfile.py +++ b/packages/google-cloud-spanner/noxfile.py @@ -80,7 +80,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", "docfx", @@ -180,10 +180,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-speech/noxfile.py b/packages/google-cloud-speech/noxfile.py index 865c3c9ec938..37a3a44021c3 100644 --- a/packages/google-cloud-speech/noxfile.py +++ b/packages/google-cloud-speech/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -240,10 +240,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-sql/noxfile.py b/packages/google-cloud-sql/noxfile.py index 5369d84ec2a1..fa7550802b6a 100644 --- a/packages/google-cloud-sql/noxfile.py +++ b/packages/google-cloud-sql/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-storage-control/noxfile.py b/packages/google-cloud-storage-control/noxfile.py index 0d4221c63a8e..347c32205a19 100644 --- a/packages/google-cloud-storage-control/noxfile.py +++ b/packages/google-cloud-storage-control/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-storage-transfer/noxfile.py b/packages/google-cloud-storage-transfer/noxfile.py index f29b47dc96b9..fc503369abf7 100644 --- a/packages/google-cloud-storage-transfer/noxfile.py +++ b/packages/google-cloud-storage-transfer/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-storage/noxfile.py b/packages/google-cloud-storage/noxfile.py index 1a0140d7653d..160de5439693 100644 --- a/packages/google-cloud-storage/noxfile.py +++ b/packages/google-cloud-storage/noxfile.py @@ -99,7 +99,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -248,10 +248,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-storagebatchoperations/noxfile.py b/packages/google-cloud-storagebatchoperations/noxfile.py index 1963b347f8e1..df9cd652bfc6 100644 --- a/packages/google-cloud-storagebatchoperations/noxfile.py +++ b/packages/google-cloud-storagebatchoperations/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-storageinsights/noxfile.py b/packages/google-cloud-storageinsights/noxfile.py index 0af0290dc2f6..690d3082c715 100644 --- a/packages/google-cloud-storageinsights/noxfile.py +++ b/packages/google-cloud-storageinsights/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-support/noxfile.py b/packages/google-cloud-support/noxfile.py index 16f65be8a398..285ed801dfbf 100644 --- a/packages/google-cloud-support/noxfile.py +++ b/packages/google-cloud-support/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-talent/noxfile.py b/packages/google-cloud-talent/noxfile.py index 5ef4a880b013..2c1e627acdbf 100644 --- a/packages/google-cloud-talent/noxfile.py +++ b/packages/google-cloud-talent/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-tasks/noxfile.py b/packages/google-cloud-tasks/noxfile.py index c1fe484d3b5b..9237bde29b56 100644 --- a/packages/google-cloud-tasks/noxfile.py +++ b/packages/google-cloud-tasks/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-telcoautomation/noxfile.py b/packages/google-cloud-telcoautomation/noxfile.py index 03d79c0e2ee2..50adadef72c5 100644 --- a/packages/google-cloud-telcoautomation/noxfile.py +++ b/packages/google-cloud-telcoautomation/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-texttospeech/noxfile.py b/packages/google-cloud-texttospeech/noxfile.py index 036ed1779f1c..de1b8194019c 100644 --- a/packages/google-cloud-texttospeech/noxfile.py +++ b/packages/google-cloud-texttospeech/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-tpu/noxfile.py b/packages/google-cloud-tpu/noxfile.py index eacd622a9619..11e32cd59278 100644 --- a/packages/google-cloud-tpu/noxfile.py +++ b/packages/google-cloud-tpu/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-trace/noxfile.py b/packages/google-cloud-trace/noxfile.py index 7f7838599884..73bd58c10ce9 100644 --- a/packages/google-cloud-trace/noxfile.py +++ b/packages/google-cloud-trace/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-translate/noxfile.py b/packages/google-cloud-translate/noxfile.py index 3ececd4fa8bc..edaf62fd490d 100644 --- a/packages/google-cloud-translate/noxfile.py +++ b/packages/google-cloud-translate/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-vectorsearch/noxfile.py b/packages/google-cloud-vectorsearch/noxfile.py index b827135fc027..a72ef5fdb291 100644 --- a/packages/google-cloud-vectorsearch/noxfile.py +++ b/packages/google-cloud-vectorsearch/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-video-live-stream/noxfile.py b/packages/google-cloud-video-live-stream/noxfile.py index 859f42aae7ec..5ba61bf18267 100644 --- a/packages/google-cloud-video-live-stream/noxfile.py +++ b/packages/google-cloud-video-live-stream/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-video-stitcher/noxfile.py b/packages/google-cloud-video-stitcher/noxfile.py index b61a78dedbb9..f8e2c6cf1bb5 100644 --- a/packages/google-cloud-video-stitcher/noxfile.py +++ b/packages/google-cloud-video-stitcher/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-video-transcoder/noxfile.py b/packages/google-cloud-video-transcoder/noxfile.py index 9cd9da5c06e5..86066bdee7a3 100644 --- a/packages/google-cloud-video-transcoder/noxfile.py +++ b/packages/google-cloud-video-transcoder/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-videointelligence/noxfile.py b/packages/google-cloud-videointelligence/noxfile.py index 25652bf9acc5..416e19e668bd 100644 --- a/packages/google-cloud-videointelligence/noxfile.py +++ b/packages/google-cloud-videointelligence/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-vision/noxfile.py b/packages/google-cloud-vision/noxfile.py index 8f7bf5191840..d2c37ec5e80e 100644 --- a/packages/google-cloud-vision/noxfile.py +++ b/packages/google-cloud-vision/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -240,10 +240,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-visionai/noxfile.py b/packages/google-cloud-visionai/noxfile.py index a2c83db98ed8..440bfdff568b 100644 --- a/packages/google-cloud-visionai/noxfile.py +++ b/packages/google-cloud-visionai/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-vm-migration/noxfile.py b/packages/google-cloud-vm-migration/noxfile.py index fd26ce79e00d..84dc84d29afb 100644 --- a/packages/google-cloud-vm-migration/noxfile.py +++ b/packages/google-cloud-vm-migration/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-vmwareengine/noxfile.py b/packages/google-cloud-vmwareengine/noxfile.py index 23f0a32e6b06..955c1a52e1d6 100644 --- a/packages/google-cloud-vmwareengine/noxfile.py +++ b/packages/google-cloud-vmwareengine/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-vpc-access/noxfile.py b/packages/google-cloud-vpc-access/noxfile.py index 6188112c9813..08a58ea2eacf 100644 --- a/packages/google-cloud-vpc-access/noxfile.py +++ b/packages/google-cloud-vpc-access/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-webrisk/noxfile.py b/packages/google-cloud-webrisk/noxfile.py index 738e400d70db..d4af2d3d4797 100644 --- a/packages/google-cloud-webrisk/noxfile.py +++ b/packages/google-cloud-webrisk/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-websecurityscanner/noxfile.py b/packages/google-cloud-websecurityscanner/noxfile.py index e2aef06e0214..69fc5aee5837 100644 --- a/packages/google-cloud-websecurityscanner/noxfile.py +++ b/packages/google-cloud-websecurityscanner/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-workflows/noxfile.py b/packages/google-cloud-workflows/noxfile.py index 5c427ba0cb8f..45d075037b95 100644 --- a/packages/google-cloud-workflows/noxfile.py +++ b/packages/google-cloud-workflows/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-workloadidentity/noxfile.py b/packages/google-cloud-workloadidentity/noxfile.py index bd5c8bfc7229..2ffaaa12806b 100644 --- a/packages/google-cloud-workloadidentity/noxfile.py +++ b/packages/google-cloud-workloadidentity/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-workloadmanager/noxfile.py b/packages/google-cloud-workloadmanager/noxfile.py index 56d4718e0fc3..2c38da5af585 100644 --- a/packages/google-cloud-workloadmanager/noxfile.py +++ b/packages/google-cloud-workloadmanager/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-cloud-workstations/noxfile.py b/packages/google-cloud-workstations/noxfile.py index eeb641eabf46..5c5665b1e00d 100644 --- a/packages/google-cloud-workstations/noxfile.py +++ b/packages/google-cloud-workstations/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-developer-knowledge/noxfile.py b/packages/google-developer-knowledge/noxfile.py index 07d2ea84bc5f..e5c2de578b4c 100644 --- a/packages/google-developer-knowledge/noxfile.py +++ b/packages/google-developer-knowledge/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-devicesandservices-health/noxfile.py b/packages/google-devicesandservices-health/noxfile.py index fbffe9b1cc9f..c5391b442506 100644 --- a/packages/google-devicesandservices-health/noxfile.py +++ b/packages/google-devicesandservices-health/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-geo-type/noxfile.py b/packages/google-geo-type/noxfile.py index d9d91ae83194..e697beec33eb 100644 --- a/packages/google-geo-type/noxfile.py +++ b/packages/google-geo-type/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-maps-addressvalidation/noxfile.py b/packages/google-maps-addressvalidation/noxfile.py index ba0834e25fb1..0de4d5373af8 100644 --- a/packages/google-maps-addressvalidation/noxfile.py +++ b/packages/google-maps-addressvalidation/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-maps-areainsights/noxfile.py b/packages/google-maps-areainsights/noxfile.py index 640fcfdcc261..927d6d7631ad 100644 --- a/packages/google-maps-areainsights/noxfile.py +++ b/packages/google-maps-areainsights/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-maps-fleetengine-delivery/noxfile.py b/packages/google-maps-fleetengine-delivery/noxfile.py index e78c7c478cb9..9fea7af66fc7 100644 --- a/packages/google-maps-fleetengine-delivery/noxfile.py +++ b/packages/google-maps-fleetengine-delivery/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-maps-fleetengine/noxfile.py b/packages/google-maps-fleetengine/noxfile.py index aa1420bc714a..a245cad260c9 100644 --- a/packages/google-maps-fleetengine/noxfile.py +++ b/packages/google-maps-fleetengine/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-maps-geocode/noxfile.py b/packages/google-maps-geocode/noxfile.py index 27f3bfaab80e..2cc8e7354dfd 100644 --- a/packages/google-maps-geocode/noxfile.py +++ b/packages/google-maps-geocode/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-maps-isochrones/noxfile.py b/packages/google-maps-isochrones/noxfile.py index 49890bd54bc1..45338f3e3d50 100644 --- a/packages/google-maps-isochrones/noxfile.py +++ b/packages/google-maps-isochrones/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-maps-mapmanagement/noxfile.py b/packages/google-maps-mapmanagement/noxfile.py index 93b39580f046..be79778174c7 100644 --- a/packages/google-maps-mapmanagement/noxfile.py +++ b/packages/google-maps-mapmanagement/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-maps-mapsplatformdatasets/noxfile.py b/packages/google-maps-mapsplatformdatasets/noxfile.py index db17790e4a28..63adcb50d5d2 100644 --- a/packages/google-maps-mapsplatformdatasets/noxfile.py +++ b/packages/google-maps-mapsplatformdatasets/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-maps-navconnect/noxfile.py b/packages/google-maps-navconnect/noxfile.py index 3ad9fe66bfc3..9a4ff9ef5555 100644 --- a/packages/google-maps-navconnect/noxfile.py +++ b/packages/google-maps-navconnect/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-maps-places/noxfile.py b/packages/google-maps-places/noxfile.py index 2b6e862c5e67..73c77d70a516 100644 --- a/packages/google-maps-places/noxfile.py +++ b/packages/google-maps-places/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-maps-routeoptimization/noxfile.py b/packages/google-maps-routeoptimization/noxfile.py index f127fb2768bf..dd6c649d7953 100644 --- a/packages/google-maps-routeoptimization/noxfile.py +++ b/packages/google-maps-routeoptimization/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-maps-routing/noxfile.py b/packages/google-maps-routing/noxfile.py index a19f5fd663db..68e839d182ff 100644 --- a/packages/google-maps-routing/noxfile.py +++ b/packages/google-maps-routing/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-maps-solar/noxfile.py b/packages/google-maps-solar/noxfile.py index bbd0770e1860..ee6e6518b634 100644 --- a/packages/google-maps-solar/noxfile.py +++ b/packages/google-maps-solar/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-shopping-css/noxfile.py b/packages/google-shopping-css/noxfile.py index 2ee96cf636ae..a41d99c9d67e 100644 --- a/packages/google-shopping-css/noxfile.py +++ b/packages/google-shopping-css/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-shopping-merchant-accounts/noxfile.py b/packages/google-shopping-merchant-accounts/noxfile.py index f74f1d09c255..f14e729e99c0 100644 --- a/packages/google-shopping-merchant-accounts/noxfile.py +++ b/packages/google-shopping-merchant-accounts/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-shopping-merchant-conversions/noxfile.py b/packages/google-shopping-merchant-conversions/noxfile.py index 2e38dc5d268a..7e29c9d54d5a 100644 --- a/packages/google-shopping-merchant-conversions/noxfile.py +++ b/packages/google-shopping-merchant-conversions/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-shopping-merchant-datasources/noxfile.py b/packages/google-shopping-merchant-datasources/noxfile.py index c0b67d607ced..018003c13d2e 100644 --- a/packages/google-shopping-merchant-datasources/noxfile.py +++ b/packages/google-shopping-merchant-datasources/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-shopping-merchant-inventories/noxfile.py b/packages/google-shopping-merchant-inventories/noxfile.py index f8c5b39ceb60..95a77560819a 100644 --- a/packages/google-shopping-merchant-inventories/noxfile.py +++ b/packages/google-shopping-merchant-inventories/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-shopping-merchant-issueresolution/noxfile.py b/packages/google-shopping-merchant-issueresolution/noxfile.py index 3f1e4e891eae..cf35b57e19d3 100644 --- a/packages/google-shopping-merchant-issueresolution/noxfile.py +++ b/packages/google-shopping-merchant-issueresolution/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-shopping-merchant-lfp/noxfile.py b/packages/google-shopping-merchant-lfp/noxfile.py index 3c8b89399126..7cc578954ac4 100644 --- a/packages/google-shopping-merchant-lfp/noxfile.py +++ b/packages/google-shopping-merchant-lfp/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-shopping-merchant-loyaltycustomers/noxfile.py b/packages/google-shopping-merchant-loyaltycustomers/noxfile.py index af2c1a94de1e..49472e912b6c 100644 --- a/packages/google-shopping-merchant-loyaltycustomers/noxfile.py +++ b/packages/google-shopping-merchant-loyaltycustomers/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-shopping-merchant-notifications/noxfile.py b/packages/google-shopping-merchant-notifications/noxfile.py index 4c225355f4d8..c0a14d8df9b2 100644 --- a/packages/google-shopping-merchant-notifications/noxfile.py +++ b/packages/google-shopping-merchant-notifications/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-shopping-merchant-ordertracking/noxfile.py b/packages/google-shopping-merchant-ordertracking/noxfile.py index d84434333430..5f36d5315617 100644 --- a/packages/google-shopping-merchant-ordertracking/noxfile.py +++ b/packages/google-shopping-merchant-ordertracking/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-shopping-merchant-products/noxfile.py b/packages/google-shopping-merchant-products/noxfile.py index 0eb5e0d96869..4c49cc042c30 100644 --- a/packages/google-shopping-merchant-products/noxfile.py +++ b/packages/google-shopping-merchant-products/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-shopping-merchant-productstudio/noxfile.py b/packages/google-shopping-merchant-productstudio/noxfile.py index 7231926810fb..c0422a5a0427 100644 --- a/packages/google-shopping-merchant-productstudio/noxfile.py +++ b/packages/google-shopping-merchant-productstudio/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-shopping-merchant-promotions/noxfile.py b/packages/google-shopping-merchant-promotions/noxfile.py index 48069b4ecedb..cf08b8341d18 100644 --- a/packages/google-shopping-merchant-promotions/noxfile.py +++ b/packages/google-shopping-merchant-promotions/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-shopping-merchant-quota/noxfile.py b/packages/google-shopping-merchant-quota/noxfile.py index b742f428f286..bf1b00be45f1 100644 --- a/packages/google-shopping-merchant-quota/noxfile.py +++ b/packages/google-shopping-merchant-quota/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-shopping-merchant-reports/noxfile.py b/packages/google-shopping-merchant-reports/noxfile.py index fce1b65ce66f..3889eb8f8d17 100644 --- a/packages/google-shopping-merchant-reports/noxfile.py +++ b/packages/google-shopping-merchant-reports/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-shopping-merchant-reviews/noxfile.py b/packages/google-shopping-merchant-reviews/noxfile.py index 8bc9e9580945..3265391aaf19 100644 --- a/packages/google-shopping-merchant-reviews/noxfile.py +++ b/packages/google-shopping-merchant-reviews/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/google-shopping-type/noxfile.py b/packages/google-shopping-type/noxfile.py index afb8a6b92b60..c5d93c177d35 100644 --- a/packages/google-shopping-type/noxfile.py +++ b/packages/google-shopping-type/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/packages/grafeas/noxfile.py b/packages/grafeas/noxfile.py index 93f2be83eb2f..33a3a26b7001 100644 --- a/packages/grafeas/noxfile.py +++ b/packages/grafeas/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints): diff --git a/preview-packages/google-cloud-compute/noxfile.py b/preview-packages/google-cloud-compute/noxfile.py index 07995bbd0b40..fcfadb340ba7 100644 --- a/preview-packages/google-cloud-compute/noxfile.py +++ b/preview-packages/google-cloud-compute/noxfile.py @@ -93,7 +93,7 @@ "system", "cover", "lint", - "lint_setup_py", + "lint_twine_check", "blacken", "docs", ] @@ -239,10 +239,11 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -def lint_setup_py(session): - """Verify that setup.py is valid (including RST check).""" - session.install("setuptools", "docutils", "pygments") - session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def lint_twine_check(session): + """Verify that the package is valid using twine.""" + session.install("twine", "build") + session.run("python", "-m", "build", "--sdist") + session.run("twine", "check", "--strict", "dist/*") def install_unittest_dependencies(session, *constraints):