diff --git a/.gitignore b/.gitignore index 94025a4..4683c40 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,6 @@ /python-test-utils-1.1.0.tar.gz /python-test-utils-1.3.1.tar.gz +/python-test-utils-1.3.2.tar.gz +/python-test-utils-1.3.3.tar.gz +/python-test-utils-1.4.0.tar.gz +/google-cloud-testutils-1.7.1.tar.gz diff --git a/generate-tarball.sh b/generate-tarball.sh new file mode 100755 index 0000000..1b813d1 --- /dev/null +++ b/generate-tarball.sh @@ -0,0 +1,15 @@ +#!/bin/bash +set -euo pipefail + +VERSION=${1:?Usage: $0 } +TAG="google-cloud-testutils-v${VERSION}" +workdir=$(mktemp -d) + +trap 'rm -rf "${workdir}"' EXIT + +git clone --depth 1 --branch "${TAG}" \ + https://github.com/googleapis/google-cloud-python "${workdir}/repo" + +tar czf "google-cloud-testutils-${VERSION}.tar.gz" \ + --transform "s,^repo/packages/google-cloud-testutils,google-cloud-testutils-${VERSION}," \ + -C "${workdir}" repo/packages/google-cloud-testutils diff --git a/python-google-cloud-testutils.spec b/python-google-cloud-testutils.spec index a64f252..814eef1 100644 --- a/python-google-cloud-testutils.spec +++ b/python-google-cloud-testutils.spec @@ -2,22 +2,20 @@ %bcond_without tests %global srcname google-cloud-testutils -%global forgeurl https://github.com/googleapis/python-test-utils -Version: 1.3.1 -%global tag v%{version} -%forgemeta Name: python-%{srcname} +Version: 1.7.1 Release: %autorelease Summary: Python test utilities for Google Cloud APIs -License: ASL 2.0 -URL: %forgeurl -Source0: %forgesource +License: Apache-2.0 +URL: https://github.com/googleapis/google-cloud-python +Source0: %{srcname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel +BuildRequires: python3-google-auth %if %{with tests} BuildRequires: python3dist(pytest) @@ -36,39 +34,34 @@ Summary: %{summary} %description -n python3-%{srcname} %{_description} - %prep -%forgesetup - +%autosetup -n %{srcname}-%{version} %generate_buildrequires -%pyproject_buildrequires -r - +%pyproject_buildrequires %build %pyproject_wheel - %install %pyproject_install %pyproject_save_files test_utils # Remove extra scripts and tests. -rm -rf %{buildroot}%{python3_sitelib}/{scripts,tests} -rm -f %{buildroot}%{_bindir}/lower-bound-checker +rm %{buildroot}%{_bindir}/lower-bound-checker +%check +%pyproject_check_import -e "tests*" %if %{with tests} -%check # Lower bounds checking tests won't work since installing things via # pip is not going to work during RPM builds. %pytest --disable-warnings --ignore tests/unit/test_lower_bound_checker.py %endif - %files -n python3-%{srcname} -f %{pyproject_files} -%doc README.rst CHANGELOG.md CODE_OF_CONDUCT.md - +%doc README.rst CHANGELOG.md +%license LICENSE %changelog %autochangelog diff --git a/sources b/sources index 27244da..5e55aee 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (python-test-utils-1.3.1.tar.gz) = 93d2f7e6944e9c0483b641af7277d1403bfc392759e6f37cdc89ca9c2d84b0397baf768e7a31195fecca3eb51a9ef8703fc4972aa572f97d3e46d9768e453736 +SHA512 (google-cloud-testutils-1.7.1.tar.gz) = a0d7c1b3220bd5f97f2cfc363e67551da5428d0788679c5c9178dbf03d3a7351e78aa2a8aad0bfa159d4016a6bf1893696199ccb18818b412653f503e3447014