792498f
%global srcname fields
792498f
792498f
Name:           python-%{srcname}
792498f
Version:        5.0.0
792498f
Release:        1%{?dist}
792498f
Summary:        Container class boilerplate killer
792498f
792498f
License:        BSD
792498f
URL:            https://github.com/ionelmc/%{name}
792498f
Source0:        https://github.com/ionelmc/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
792498f
792498f
# Compatibility with python-sphinx >= 1.3, already applied upstream
792498f
Patch0:         %{name}-5.0.0-sphinx-1.3.patch
792498f
792498f
BuildArch:      noarch
792498f
792498f
%description
792498f
Container class boilerplate killer.
792498f
792498f
Features:
792498f
- Human-readable __repr__
792498f
- Complete set of comparison methods
792498f
- Keyword and positional argument support. Works like a normal class - you can
792498f
  override just about anything in the subclass (eg: a custom __init__). In
792498f
  contrast, hynek/characteristic forces different call schematics and calls
792498f
  your __init__ with different arguments.
792498f
792498f
%package doc
792498f
Summary:        Documentation for '%{name}'
792498f
BuildRequires:  python%{python3_pkgversion}-sphinx
792498f
BuildRequires:  python%{python3_pkgversion}-sphinx-theme-py3doc-enhanced
792498f
792498f
%description doc
792498f
HTML API documentation for the '%{srcname}' Python module.
792498f
792498f
%package -n python%{python3_pkgversion}-%{srcname}
792498f
Summary:        %{summary}
792498f
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
792498f
BuildRequires:  python%{python3_pkgversion}-devel
792498f
BuildRequires:  python%{python3_pkgversion}-pytest
792498f
BuildRequires:  python%{python3_pkgversion}-pytest-benchmark
792498f
792498f
%if !0%{?rhel} || 0%{?rhel} >= 8
792498f
Recommends:     %{name}-doc = %{version}-%{release}
792498f
%endif # rhel
792498f
792498f
%description -n python%{python3_pkgversion}-%{srcname}
792498f
Container class boilerplate killer.
792498f
792498f
Features:
792498f
- Human-readable __repr__
792498f
- Complete set of comparison methods
792498f
- Keyword and positional argument support. Works like a normal class - you can
792498f
  override just about anything in the subclass (eg: a custom __init__). In
792498f
  contrast, hynek/characteristic forces different call schematics and calls
792498f
  your __init__ with different arguments.
792498f
792498f
%prep
792498f
%autosetup -p1
792498f
792498f
%build
792498f
%py3_build
792498f
PYTHONPATH=$PWD/src sphinx-build -b html docs docs/_build/html
792498f
rm -rf docs/_build/html/.buildinfo docs/_build/html/.doctrees
792498f
792498f
%install
792498f
%py3_install
792498f
792498f
%check
792498f
# Perf tests require unmaintained 'characteristic' module
792498f
PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_version} \
792498f
  --ignore=tests/test_perf.py \
792498f
  tests
792498f
792498f
%files doc
792498f
%license LICENSE
792498f
%doc docs/_build/html
792498f
792498f
%files -n python%{python3_pkgversion}-%{srcname}
792498f
%license LICENSE
792498f
%doc AUTHORS.rst CHANGELOG.rst README.rst
792498f
%{python3_sitelib}/%{srcname}/
792498f
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info/
792498f
792498f
%changelog
792498f
* Thu Feb 14 2019 Scott K Logan <logans@cottsay.net> - 5.0.0-1
792498f
- Initial package