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: 06af884070d9180694becdb106e5cd65
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-sphinx-notfound-page
48 BuildRequires: python3-zope.interface
50 Requires: python-modules >= 1:2.7
52 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
55 attrs is the Python package that will bring back the joy of writing
56 classes by relieving you from the drudgery of implementing object
57 protocols (aka dunder methods).
59 %description -l pl.UTF-8
60 attrs to pakiet Pythona, mający przywrócić radość pisania klas
61 uwalniając od mordęgi implementowania protokołów obiektów (metod z
62 podwójnym podkreśleniem).
64 %package -n python3-attrs
65 Summary: attrs - classes without boilerplate
66 Summary(pl.UTF-8): attrs - klasy bez ramowego kodu
67 Group: Libraries/Python
68 Requires: python3-modules >= 1:3.5
70 %description -n python3-attrs
71 attrs is the Python package that will bring back the joy of writing
72 classes by relieving you from the drudgery of implementing object
73 protocols (aka dunder methods).
75 %description -n python3-attrs -l pl.UTF-8
76 attrs to pakiet Pythona, mający przywrócić radość pisania klas
77 uwalniając od mordęgi implementowania protokołów obiektów (metod z
78 podwójnym podkreśleniem).
81 Summary: API documentation for Python attrs module
82 Summary(pl.UTF-8): Dokumentacja API modułu Pythona attrs
86 API documentation for Pythona attrs module.
88 %description apidocs -l pl.UTF-8
89 Dokumentacja API modułu Pythona attrs.
92 %setup -q -n attrs-%{version}
99 PYTHONPATH=$(pwd)/src \
100 %{__python} -m pytest tests
108 PYTHONPATH=$(pwd)/src \
109 %{__python3} -m pytest tests
114 PYTHONPATH=$(pwd)/src \
115 %{__make} -C docs html \
116 SPHINXBUILD=sphinx-build-3
120 rm -rf $RPM_BUILD_ROOT
133 rm -rf $RPM_BUILD_ROOT
137 %defattr(644,root,root,755)
138 %doc AUTHORS.rst CHANGELOG.rst LICENSE README.rst
139 %{py_sitescriptdir}/attr
140 %{py_sitescriptdir}/attrs-%{version}-py*.egg-info
144 %files -n python3-attrs
145 %defattr(644,root,root,755)
146 %doc AUTHORS.rst CHANGELOG.rst LICENSE README.rst
147 %{py3_sitescriptdir}/attr
148 %{py3_sitescriptdir}/attrs-%{version}-py*.egg-info
153 %defattr(644,root,root,755)
154 %doc docs/_build/html/{_static,*.html,*.js}