Blame python-grpc-google-iam-v1.spec

9d363f5
# Upstream test directory is empty.
9d363f5
%bcond_with     tests
9d363f5
30bf036
%global         srcname     grpc-google-iam-v1
1b4e5db
%global         forgeurl    https://github.com/googleapis/python-grpc-google-iam-v1
Packit 5e4b506
Version:        0.13.0
1b4e5db
%global         tag         v%{version}
1b4e5db
%forgemeta
30bf036
30bf036
Name:           python-%{srcname}
a0d758a
Release:        %autorelease
30bf036
Summary:        GRPC library for the google-iam-v1 service
30bf036
470217f
License:        Apache-2.0
1b4e5db
URL:            %forgeurl
1b4e5db
Source0:        %forgesource
30bf036
30bf036
BuildArch:      noarch
30bf036
30bf036
BuildRequires:  python3-devel
30bf036
9d363f5
%if %{with tests}
9d363f5
BuildRequires:  python3dist(pytest)
9d363f5
%endif
9d363f5
30bf036
%global _description %{expand:
30bf036
The IDL-derived library for the google-iam (v1) service in Google Cloud.}
30bf036
30bf036
%description %{_description}
30bf036
30bf036
30bf036
%package -n python3-%{srcname}
30bf036
Summary:        %{summary}
30bf036
%description -n python3-%{srcname} %{_description}
30bf036
30bf036
30bf036
%prep
1b4e5db
%forgeautosetup
30bf036
30bf036
30bf036
%generate_buildrequires
9d363f5
%pyproject_buildrequires -x testing
30bf036
30bf036
30bf036
%build
30bf036
%pyproject_wheel
30bf036
30bf036
30bf036
%install
30bf036
%pyproject_install
30bf036
%pyproject_save_files google
30bf036
30bf036
127cf83
%check
9d363f5
%if %{with tests}
9d363f5
# NOTE(mhayden): Setting PYTHONUSERBASE as a hack for PEP 420 namespaces.
9d363f5
# Thanks to churchyard for the fix.
9d363f5
PYTHONUSERBASE=%{buildroot}%{_prefix} \
9d363f5
    %pytest tests/unit
9d363f5
%endif
9d363f5
127cf83
30bf036
%files -n python3-%{srcname} -f %{pyproject_files}
30bf036
%doc README.rst
30bf036
30bf036
30bf036
%changelog
a0d758a
%autochangelog