]> git.pld-linux.org Git - packages/python-attrs.git/blame - python-attrs.spec
- release 4
[packages/python-attrs.git] / python-attrs.spec
CommitLineData
b9e2540e
JB
1#
2# Conditional build:
3%bcond_without doc # Sphinx documentation
a4ef1b01 4%bcond_with tests # unit tests
b9e2540e
JB
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
7
8Summary: attrs - classes without boilerplate
9Summary(pl.UTF-8): attrs - klasy bez ramowego kodu
10Name: python-attrs
f141191f 11Version: 19.2.0
cac7bf7c 12Release: 4
b9e2540e
JB
13License: MIT
14Group: Libraries/Python
15#Source0Download: https://pypi.org/simple/attrs/
16Source0: https://files.pythonhosted.org/packages/source/a/attrs/attrs-%{version}.tar.gz
f141191f 17# Source0-md5: d5a6ee80beaa072bd2b3bcb6fee0d508
b9e2540e
JB
18URL: https://pypi.org/project/attrs/
19BuildRequires: rpm-pythonprov
20BuildRequires: rpmbuild(macros) >= 1.714
21%if %{with python2}
22BuildRequires: python-modules >= 1:2.7
23BuildRequires: python-setuptools
24%if %{with tests}
25BuildRequires: python-coverage
26BuildRequires: python-hypothesis
27BuildRequires: python-pympler
f141191f 28BuildRequires: python-pytest >= 4.3.0
b9e2540e
JB
29BuildRequires: python-six
30BuildRequires: python-zope.interface
31%endif
32%endif
33%if %{with python3}
34BuildRequires: python3-modules >= 1:3.4
35BuildRequires: python3-setuptools
36%if %{with tests}
37BuildRequires: python3-coverage
38BuildRequires: python3-hypothesis
39BuildRequires: python3-pympler
f141191f 40BuildRequires: python3-pytest >= 4.3.0
b9e2540e
JB
41BuildRequires: python3-six
42BuildRequires: python3-zope.interface
43%endif
44%endif
45%if %{with doc}
46BuildRequires: sphinx-pdg-3
47BuildRequires: python3-zope.interface
48%endif
49Requires: python-modules >= 1:2.7
50BuildArch: noarch
51BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52
53%description
54attrs is the Python package that will bring back the joy of writing
55classes by relieving you from the drudgery of implementing object
56protocols (aka dunder methods).
57
58%description -l pl.UTF-8
59attrs to pakiet Pythona, mający przywrócić radość pisania klas
60uwalniając od mordęgi implementowania protokołów obiektów (metod z
61podwójnym podkreśleniem).
62
63%package -n python3-attrs
64Summary: attrs - classes without boilerplate
65Summary(pl.UTF-8): attrs - klasy bez ramowego kodu
66Group: Libraries/Python
67Requires: python3-modules >= 1:3.4
68
69%description -n python3-attrs
70attrs is the Python package that will bring back the joy of writing
71classes by relieving you from the drudgery of implementing object
72protocols (aka dunder methods).
73
74%description -n python3-attrs -l pl.UTF-8
75attrs to pakiet Pythona, mający przywrócić radość pisania klas
76uwalniając od mordęgi implementowania protokołów obiektów (metod z
77podwójnym podkreśleniem).
78
79%package apidocs
80Summary: API documentation for Python attrs module
81Summary(pl.UTF-8): Dokumentacja API modułu Pythona attrs
82Group: Documentation
83
84%description apidocs
85API documentation for Pythona attrs module.
86
87%description apidocs -l pl.UTF-8
88Dokumentacja API modułu Pythona attrs.
89
90%prep
91%setup -q -n attrs-%{version}
92
93%build
94%if %{with python2}
95%py_build
96
97%if %{with tests}
98PYTHONPATH=$(pwd)/src \
99%{__python} -m pytest tests
100%endif
101%endif
102
103%if %{with python3}
104%py3_build
105
106%if %{with tests}
107PYTHONPATH=$(pwd)/src \
108%{__python3} -m pytest tests
109%endif
110%endif
111
112%if %{with doc}
113PYTHONPATH=$(pwd)/src \
114%{__make} -C docs html \
115 SPHINXBUILD=sphinx-build-3
116%endif
117
118%install
119rm -rf $RPM_BUILD_ROOT
120
121%if %{with python2}
122%py_install
123
124%py_postclean
125%endif
126
127%if %{with python3}
128%py3_install
129%endif
130
131%clean
132rm -rf $RPM_BUILD_ROOT
133
134%if %{with python2}
135%files
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
140%endif
141
142%if %{with python3}
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
148%endif
149
150%if %{with doc}
151%files apidocs
152%defattr(644,root,root,755)
153%doc docs/_build/html/{_static,*.html,*.js}
154%endif
This page took 0.279957 seconds and 4 git commands to generate.