Blob Blame History Raw
Name:           python-absl-py
Version:        1.3.0
Release:        %autorelease
Summary:        Abseil Python Common Libraries

License:        Apache-2.0
Source0:        %{url}/archive/v%{version}/abseil-py-%{version}.tar.gz

BuildArch:      noarch

BuildRequires:  python3-devel

%global common_description %{expand:
This repository is a collection of Python library code for building Python
applications. The code is collected from Google’s own Python code base, and has
been extensively tested and used in production.


  • Simple application startup
  • Distributed commandline flags system
  • Custom logging module with additional features
  • Testing utilities}

%description %{common_description}

%package -n     python3-absl-py
Summary:        %{summary}

%py_provides python3-absl

%description -n python3-absl-py %{common_description}

%autosetup -n abseil-py-%{version}



%pyproject_save_files absl

# Since we cannot run the full upstream test suite (see comments below), we
# start with an import “smoke test”:

# Upstream provides some “smoke tests” that we can run, too. We cannot use the
# wrapper smoke_tests/ because it downloads things from the
# Internet, but we can run the Python scripts manually.
PYTHONPATH='%{buildroot}/%{python3_sitelib}'; export PYTHONPATH
%{python3} smoke_tests/ --echo smoke 2>&1 |
  grep -F 'echo is smoke.'
%{python3} smoke_tests/ | grep -Fq 'msg_for_test'

# Running the actual test suite requires bazel, which will almost certainly
# never be packaged for Fedora due to its Byzantine mass of bundled
# dependencies. It is possible to invoke the tests with another runner, such as
# pytest, but there are many spurious failures due to the incorrect
# environment, so it is useless to do so.

%files -n python3-absl-py -f %{pyproject_files}
%doc smoke_tests