3 %bcond_without doc # Sphinx documentation
4 %bcond_with tests # unit tests (TODO: re-enable when proper pytest is available in PLD)
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
8 Summary: attrs - classes without boilerplate
9 Summary(pl.UTF-8): attrs - klasy bez ramowego kodu
14 Group: Libraries/Python
15 #Source0Download: https://pypi.org/simple/attrs/
16 Source0: https://files.pythonhosted.org/packages/source/a/attrs/attrs-%{version}.tar.gz
17 # Source0-md5: 5a9b5e9ceebc380a13fb93235b11bbda
18 URL: https://pypi.org/project/attrs/
19 BuildRequires: rpm-pythonprov
20 BuildRequires: rpmbuild(macros) >= 1.714
22 BuildRequires: python-modules >= 1:2.7
23 BuildRequires: python-setuptools
25 BuildRequires: python-coverage
26 BuildRequires: python-hypothesis
27 BuildRequires: python-pympler
28 BuildRequires: python-pytest >= 4.3.0
29 BuildRequires: python-six
30 BuildRequires: python-zope.interface
34 BuildRequires: python3-modules >= 1:3.5
35 BuildRequires: python3-setuptools
37 BuildRequires: python3-coverage
38 BuildRequires: python3-hypothesis
39 BuildRequires: python3-pympler
40 BuildRequires: python3-pytest >= 4.3.0
41 BuildRequires: python3-six
42 BuildRequires: python3-zope.interface
46 BuildRequires: sphinx-pdg-3
47 BuildRequires: python3-furo
48 BuildRequires: python3-sphinx-notfound-page
49 BuildRequires: python3-zope.interface
51 Requires: python-modules >= 1:2.7
53 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
56 attrs is the Python package that will bring back the joy of writing
57 classes by relieving you from the drudgery of implementing object
58 protocols (aka dunder methods).
60 %description -l pl.UTF-8
61 attrs to pakiet Pythona, mający przywrócić radość pisania klas
62 uwalniając od mordęgi implementowania protokołów obiektów (metod z
63 podwójnym podkreśleniem).
65 %package -n python3-attrs
66 Summary: attrs - classes without boilerplate
67 Summary(pl.UTF-8): attrs - klasy bez ramowego kodu
68 Group: Libraries/Python
69 Requires: python3-modules >= 1:3.5
71 %description -n python3-attrs
72 attrs is the Python package that will bring back the joy of writing
73 classes by relieving you from the drudgery of implementing object
74 protocols (aka dunder methods).
76 %description -n python3-attrs -l pl.UTF-8
77 attrs to pakiet Pythona, mający przywrócić radość pisania klas
78 uwalniając od mordęgi implementowania protokołów obiektów (metod z
79 podwójnym podkreśleniem).
82 Summary: API documentation for Python attrs module
83 Summary(pl.UTF-8): Dokumentacja API modułu Pythona attrs
87 API documentation for Pythona attrs module.
89 %description apidocs -l pl.UTF-8
90 Dokumentacja API modułu Pythona attrs.
93 %setup -q -n attrs-%{version}
100 PYTHONPATH=$(pwd)/src \
101 %{__python} -m pytest tests
109 PYTHONPATH=$(pwd)/src \
110 %{__python3} -m pytest tests
115 PYTHONPATH=$(pwd)/src \
116 %{__make} -C docs html \
117 SPHINXBUILD=sphinx-build-3
121 rm -rf $RPM_BUILD_ROOT
134 rm -rf $RPM_BUILD_ROOT
138 %defattr(644,root,root,755)
139 %doc AUTHORS.rst CHANGELOG.rst LICENSE README.rst
140 %{py_sitescriptdir}/attr
141 %{py_sitescriptdir}/attrs
142 %{py_sitescriptdir}/attrs-%{version}-py*.egg-info
146 %files -n python3-attrs
147 %defattr(644,root,root,755)
148 %doc AUTHORS.rst CHANGELOG.rst LICENSE README.rst
149 %{py3_sitescriptdir}/attr
150 %{py3_sitescriptdir}/attrs
151 %{py3_sitescriptdir}/attrs-%{version}-py*.egg-info
156 %defattr(644,root,root,755)
157 %doc docs/_build/html/{_static,*.html,*.js}