|
|
2c52330 |
%global modname absl
|
|
|
2c52330 |
%global srcname %{modname}-py
|
|
|
2c52330 |
%global reponame abseil-py
|
|
|
2c52330 |
%global egginfo_name %(echo %{srcname} | tr - _)
|
|
|
2c52330 |
|
|
|
2c52330 |
Name: python-%{srcname}
|
|
|
2c52330 |
Version: 0.11.0
|
|
|
2c52330 |
Release: 2%{?dist}
|
|
|
2c52330 |
Summary: Abseil Python Common Libraries
|
|
|
2c52330 |
|
|
|
2c52330 |
# Overall license is ASL 2.0. Contents of absl/third_party/unittest3_backport/
|
|
|
2c52330 |
# are under the Python license (derived from the Python 3 standard library).
|
|
|
2c52330 |
License: ASL 2.0 and Python
|
|
|
2c52330 |
URL: https://github.com/abseil/%{reponame}/
|
|
|
2c52330 |
Source0: %{url}/archive/pypi-v%{version}/%{reponame}-pypi-v%{version}.tar.gz
|
|
|
2c52330 |
|
|
|
2c52330 |
BuildRequires: python3-devel >= 3.4
|
|
|
2c52330 |
BuildRequires: python3dist(setuptools)
|
|
|
2c52330 |
BuildRequires: pyproject-rpm-macros
|
|
|
2c52330 |
|
|
|
2c52330 |
BuildArch: noarch
|
|
|
2c52330 |
|
|
|
2c52330 |
%global common_description %{expand:
|
|
|
2c52330 |
This repository is a collection of Python library code for building Python
|
|
|
2c52330 |
applications. The code is collected from Google’s own Python code base, and has
|
|
|
2c52330 |
been extensively tested and used in production.
|
|
|
2c52330 |
|
|
|
2c52330 |
Features:
|
|
|
2c52330 |
|
|
|
2c52330 |
• Simple application startup
|
|
|
2c52330 |
• Distributed commandline flags system
|
|
|
2c52330 |
• Custom logging module with additional features
|
|
|
2c52330 |
• Testing utilities}
|
|
|
2c52330 |
|
|
|
2c52330 |
%description %{common_description}
|
|
|
2c52330 |
|
|
|
2c52330 |
|
|
|
2c52330 |
%generate_buildrequires
|
|
|
2c52330 |
%pyproject_buildrequires -r
|
|
|
2c52330 |
|
|
|
2c52330 |
|
|
|
2c52330 |
%package -n python3-%{srcname}
|
|
|
2c52330 |
Summary: %{summary}
|
|
|
2c52330 |
%if 0%{?fedora} < 33
|
|
|
2c52330 |
%py_provides python3-%{srcname}
|
|
|
2c52330 |
%endif
|
|
|
2c52330 |
|
|
|
2c52330 |
%description -n python3-%{srcname} %{common_description}
|
|
|
2c52330 |
|
|
|
2c52330 |
|
|
|
2c52330 |
%prep
|
|
|
2c52330 |
%autosetup -n %{reponame}-pypi-v%{version}
|
|
|
2c52330 |
cp -p absl/third_party/unittest3_backport/LICENSE LICENSE-PYTHON
|
|
|
2c52330 |
|
|
|
2c52330 |
# Despite the third_party/ prefix, absl/third_party/unittest3_backport/ is not
|
|
|
2c52330 |
# exactly a bundled library. On Python 3, it is merely a shim around the
|
|
|
2c52330 |
# unittest module from the Python standard library. On Python 2, it is a
|
|
|
2c52330 |
# backport of much of the added functionality from the Python 3 version of the
|
|
|
2c52330 |
# unittest module; while derived from some version of the Python 3 standard
|
|
|
2c52330 |
# library, this backport is specific to absl-py, is maintained in the same
|
|
|
2c52330 |
# source code repository, and appears not to be separately distributed or used
|
|
|
2c52330 |
# by any other software.
|
|
|
2c52330 |
|
|
|
2c52330 |
|
|
|
2c52330 |
%build
|
|
|
2c52330 |
%py3_build
|
|
|
2c52330 |
|
|
|
2c52330 |
|
|
|
2c52330 |
%install
|
|
|
2c52330 |
%py3_install
|
|
|
2c52330 |
|
|
|
2c52330 |
|
|
|
2c52330 |
%check
|
|
|
2c52330 |
# We cannot use smoke_tests/smoke_test.sh because it downloads things from the
|
|
|
2c52330 |
# Internet. We can, however, run the sample Python scripts manually, which is
|
|
|
2c52330 |
# better than nothing.
|
|
|
2c52330 |
PYTHONPATH=%{buildroot}/%{python3_sitelib}; export PYTHONPATH
|
|
|
2c52330 |
%{__python3} smoke_tests/sample_app.py --echo smoke
|
|
|
2c52330 |
%{__python3} smoke_tests/sample_test.py
|
|
|
2c52330 |
|
|
|
2c52330 |
# Running the actual test suite requires bazel, which will almost certainly
|
|
|
2c52330 |
# never be packaged for Fedora due to its Byzantine mass of bundled
|
|
|
2c52330 |
# dependencies. It is possible to invoke the tests with another runner, such as
|
|
|
2c52330 |
# pytest, but there are many spurious failures due to the incorrect
|
|
|
2c52330 |
# environment, so it is useless to do so.
|
|
|
2c52330 |
|
|
|
2c52330 |
|
|
|
2c52330 |
%files -n python3-%{srcname}
|
|
|
2c52330 |
%license LICENSE
|
|
|
2c52330 |
%license LICENSE-PYTHON
|
|
|
2c52330 |
%doc AUTHORS
|
|
|
2c52330 |
%doc CONTRIBUTING.md
|
|
|
2c52330 |
%doc README.md
|
|
|
2c52330 |
%doc smoke_tests
|
|
|
2c52330 |
|
|
|
2c52330 |
%{python3_sitelib}/%{modname}
|
|
|
2c52330 |
%{python3_sitelib}/%{egginfo_name}-%{version}-py%{python3_version}.egg-info
|
|
|
2c52330 |
|
|
|
2c52330 |
|
|
|
2c52330 |
%changelog
|
|
|
2c52330 |
* Wed Nov 25 2020 Benjamin A. Beasley <code@musicinmybrain.net> - 1.1.0-2
|
|
|
2c52330 |
- Remove EPEL conditionals from Fedora spec file
|
|
|
2c52330 |
* Wed Nov 25 2020 Benjamin A. Beasley <code@musicinmybrain.net> - 1.1.0-1
|
|
|
2c52330 |
- Initial package
|