Blame python-google-cloud-core.spec

2b764f6
%bcond_without tests
2b764f6
2b764f6
%global         srcname     google-cloud-core
2b764f6
%global         forgeurl    https://github.com/googleapis/python-cloud-core
0c46e86
Version:        2.3.3
2b764f6
%global         tag         v%{version}
2b764f6
%forgemeta
2b764f6
2b764f6
Name:           python-%{srcname}
5455658
Release:        %autorelease
2b764f6
Summary:        Core Helpers for Google Cloud Python Client Library
2b764f6
d4f4ad8
License:        Apache-2.0
2b764f6
URL:            %forgeurl
2b764f6
Source0:        %forgesource
2b764f6
2b764f6
BuildArch:      noarch
2b764f6
effe265
BuildRequires:  python3-devel
2b764f6
2b764f6
%if %{with tests}
2b764f6
BuildRequires:  python3dist(pytest)
2b764f6
%endif
2b764f6
2b764f6
%global _description %{expand:
2b764f6
This library is not meant to stand-alone. Instead it defines common helpers
2b764f6
(e.g. base Client classes) used by all of the google-cloud-* packages.}
2b764f6
2b764f6
%description %{_description}
2b764f6
2b764f6
2b764f6
%package -n python3-%{srcname}
2b764f6
Summary:        %{summary}
2b764f6
%description -n python3-%{srcname} %{_description}
2b764f6
2b764f6
2b764f6
# Build the grpc extras subpackage.
2b764f6
%pyproject_extras_subpkg -n python3-%{srcname} grpc
2b764f6
2b764f6
2b764f6
%prep
83210b3
%forgeautosetup -p0
2b764f6
2b764f6
2b764f6
%generate_buildrequires
d4f4ad8
%pyproject_buildrequires
2b764f6
2b764f6
2b764f6
%build
2b764f6
%pyproject_wheel
2b764f6
2b764f6
2b764f6
%install
2b764f6
%pyproject_install
2b764f6
%pyproject_save_files google
2b764f6
2b764f6
2b764f6
%check
d4f4ad8
%pyproject_check_import
d4f4ad8
d4f4ad8
%if %{with tests}
d4f4ad8
# NOTE(mhayden): Setting PYTHONUSERBASE as a hack for PEP 420 namespaces.
d4f4ad8
# Thanks to churchyard for the fix.
d4f4ad8
PYTHONUSERBASE=%{buildroot}%{_prefix} \
d4f4ad8
    %pytest tests/unit
2b764f6
%endif
2b764f6
2b764f6
2b764f6
%files -n python3-%{srcname} -f %{pyproject_files}
8eac474
%doc *.rst *.md
2b764f6
%{python3_sitelib}/google_cloud_core-%{version}-py%{python3_version}-nspkg.pth
2b764f6
2b764f6
2b764f6
%changelog
5455658
%autochangelog