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: 5b2db50fcc31be34d32798183c9bd062
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.4
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-zope.interface
49 Requires: python-modules >= 1:2.7
51 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54 attrs is the Python package that will bring back the joy of writing
55 classes by relieving you from the drudgery of implementing object
56 protocols (aka dunder methods).
58 %description -l pl.UTF-8
59 attrs to pakiet Pythona, mający przywrócić radość pisania klas
60 uwalniając od mordęgi implementowania protokołów obiektów (metod z
61 podwójnym podkreśleniem).
63 %package -n python3-attrs
64 Summary: attrs - classes without boilerplate
65 Summary(pl.UTF-8): attrs - klasy bez ramowego kodu
66 Group: Libraries/Python
67 Requires: python3-modules >= 1:3.4
69 %description -n python3-attrs
70 attrs is the Python package that will bring back the joy of writing
71 classes by relieving you from the drudgery of implementing object
72 protocols (aka dunder methods).
74 %description -n python3-attrs -l pl.UTF-8
75 attrs to pakiet Pythona, mający przywrócić radość pisania klas
76 uwalniając od mordęgi implementowania protokołów obiektów (metod z
77 podwójnym podkreśleniem).
80 Summary: API documentation for Python attrs module
81 Summary(pl.UTF-8): Dokumentacja API modułu Pythona attrs
85 API documentation for Pythona attrs module.
87 %description apidocs -l pl.UTF-8
88 Dokumentacja API modułu Pythona attrs.
91 %setup -q -n attrs-%{version}
98 PYTHONPATH=$(pwd)/src \
99 %{__python} -m pytest tests
107 PYTHONPATH=$(pwd)/src \
108 %{__python3} -m pytest tests
113 PYTHONPATH=$(pwd)/src \
114 %{__make} -C docs html \
115 SPHINXBUILD=sphinx-build-3
119 rm -rf $RPM_BUILD_ROOT
132 rm -rf $RPM_BUILD_ROOT
136 %defattr(644,root,root,755)
137 %doc AUTHORS.rst CHANGELOG.rst LICENSE README.rst
138 %{py_sitescriptdir}/attr
139 %{py_sitescriptdir}/attrs-%{version}-py*.egg-info
143 %files -n python3-attrs
144 %defattr(644,root,root,755)
145 %doc AUTHORS.rst CHANGELOG.rst LICENSE README.rst
146 %{py3_sitescriptdir}/attr
147 %{py3_sitescriptdir}/attrs-%{version}-py*.egg-info
152 %defattr(644,root,root,755)
153 %doc docs/_build/html/{_static,*.html,*.js}