Blame SPECS/python-fields.spec

42aa91
%global srcname fields
42aa91
42aa91
Name:           python-%{srcname}
42aa91
Version:        5.0.0
42aa91
Release:        8%{?dist}
42aa91
Summary:        Container class boilerplate killer
42aa91
42aa91
License:        BSD
42aa91
URL:            https://github.com/ionelmc/%{name}
42aa91
Source0:        https://github.com/ionelmc/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
42aa91
42aa91
# Compatibility with python-sphinx >= 1.3, already applied upstream
42aa91
Patch0:         %{name}-5.0.0-sphinx-1.3.patch
42aa91
42aa91
BuildArch:      noarch
42aa91
42aa91
%description
42aa91
Container class boilerplate killer.
42aa91
42aa91
Features:
42aa91
- Human-readable __repr__
42aa91
- Complete set of comparison methods
42aa91
- Keyword and positional argument support. Works like a normal class - you can
42aa91
  override just about anything in the subclass (eg: a custom __init__). In
42aa91
  contrast, hynek/characteristic forces different call schematics and calls
42aa91
  your __init__ with different arguments.
42aa91
42aa91
%package doc
42aa91
Summary:        Documentation for '%{name}'
42aa91
BuildRequires:  python%{python3_pkgversion}-sphinx
42aa91
BuildRequires:  python%{python3_pkgversion}-sphinx-theme-py3doc-enhanced
42aa91
42aa91
%description doc
42aa91
HTML API documentation for the '%{srcname}' Python module.
42aa91
42aa91
%package -n python%{python3_pkgversion}-%{srcname}
42aa91
Summary:        %{summary}
42aa91
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
42aa91
BuildRequires:  python%{python3_pkgversion}-devel
42aa91
BuildRequires:  python%{python3_pkgversion}-setuptools
42aa91
BuildRequires:  python%{python3_pkgversion}-pytest
42aa91
BuildRequires:  python%{python3_pkgversion}-pytest-benchmark
42aa91
42aa91
%if !0%{?rhel} || 0%{?rhel} >= 8
42aa91
Recommends:     %{name}-doc = %{version}-%{release}
42aa91
%endif # rhel
42aa91
42aa91
%description -n python%{python3_pkgversion}-%{srcname}
42aa91
Container class boilerplate killer.
42aa91
42aa91
Features:
42aa91
- Human-readable __repr__
42aa91
- Complete set of comparison methods
42aa91
- Keyword and positional argument support. Works like a normal class - you can
42aa91
  override just about anything in the subclass (eg: a custom __init__). In
42aa91
  contrast, hynek/characteristic forces different call schematics and calls
42aa91
  your __init__ with different arguments.
42aa91
42aa91
%prep
42aa91
%autosetup -p1
42aa91
sed -i 's/\[pytest\]/\[tool:pytest\]/' setup.cfg
42aa91
42aa91
%build
42aa91
%py3_build
42aa91
PYTHONPATH=$PWD/src sphinx-build -b html docs docs/_build/html
42aa91
rm -rf docs/_build/html/.buildinfo docs/_build/html/.doctrees
42aa91
42aa91
%install
42aa91
%py3_install
42aa91
42aa91
%check
42aa91
# Perf tests require unmaintained 'characteristic' module
42aa91
PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_version} \
42aa91
  --ignore=tests/test_perf.py \
42aa91
  tests
42aa91
42aa91
%files doc
42aa91
%license LICENSE
42aa91
%doc docs/_build/html
42aa91
42aa91
%files -n python%{python3_pkgversion}-%{srcname}
42aa91
%license LICENSE
42aa91
%doc AUTHORS.rst CHANGELOG.rst README.rst
42aa91
%{python3_sitelib}/%{srcname}/
42aa91
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info/
42aa91
42aa91
%changelog
42aa91
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.0-8
42aa91
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
42aa91
42aa91
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.0-7
42aa91
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
42aa91
42aa91
* Sun May 24 2020 Miro Hrončok <mhroncok@redhat.com> - 5.0.0-6
42aa91
- Rebuilt for Python 3.9
42aa91
42aa91
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.0-5
42aa91
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
42aa91
42aa91
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 5.0.0-4
42aa91
- Rebuilt for Python 3.8.0rc1 (#1748018)
42aa91
42aa91
* Sat Aug 17 2019 Miro Hrončok <mhroncok@redhat.com> - 5.0.0-3
42aa91
- Rebuilt for Python 3.8
42aa91
42aa91
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.0-2
42aa91
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
42aa91
42aa91
* Thu Feb 14 2019 Scott K Logan <logans@cottsay.net> - 5.0.0-1
42aa91
- Initial package