]> git.pld-linux.org Git - packages/python-attrs.git/blame - python-attrs.spec
rebuild with python 3.10
[packages/python-attrs.git] / python-attrs.spec
CommitLineData
b9e2540e
JB
1#
2# Conditional build:
3%bcond_without doc # Sphinx documentation
d34d2ff7 4%bcond_with tests # unit tests (TODO: re-enable when proper pytest is available in PLD)
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
442bb680 11Version: 21.4.0
81c06f39 12Release: 2
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
442bb680 17# Source0-md5: 5a9b5e9ceebc380a13fb93235b11bbda
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}
625719fe 34BuildRequires: python3-modules >= 1:3.5
b9e2540e
JB
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
ccd7329d 47BuildRequires: python3-furo
625719fe 48BuildRequires: python3-sphinx-notfound-page
b9e2540e
JB
49BuildRequires: python3-zope.interface
50%endif
51Requires: python-modules >= 1:2.7
52BuildArch: noarch
53BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54
55%description
56attrs is the Python package that will bring back the joy of writing
57classes by relieving you from the drudgery of implementing object
58protocols (aka dunder methods).
59
60%description -l pl.UTF-8
61attrs to pakiet Pythona, mający przywrócić radość pisania klas
62uwalniając od mordęgi implementowania protokołów obiektów (metod z
63podwójnym podkreśleniem).
64
65%package -n python3-attrs
66Summary: attrs - classes without boilerplate
67Summary(pl.UTF-8): attrs - klasy bez ramowego kodu
68Group: Libraries/Python
625719fe 69Requires: python3-modules >= 1:3.5
b9e2540e
JB
70
71%description -n python3-attrs
72attrs is the Python package that will bring back the joy of writing
73classes by relieving you from the drudgery of implementing object
74protocols (aka dunder methods).
75
76%description -n python3-attrs -l pl.UTF-8
77attrs to pakiet Pythona, mający przywrócić radość pisania klas
78uwalniając od mordęgi implementowania protokołów obiektów (metod z
79podwójnym podkreśleniem).
80
81%package apidocs
82Summary: API documentation for Python attrs module
83Summary(pl.UTF-8): Dokumentacja API modułu Pythona attrs
84Group: Documentation
85
86%description apidocs
87API documentation for Pythona attrs module.
88
89%description apidocs -l pl.UTF-8
90Dokumentacja API modułu Pythona attrs.
91
92%prep
93%setup -q -n attrs-%{version}
94
95%build
96%if %{with python2}
97%py_build
98
99%if %{with tests}
100PYTHONPATH=$(pwd)/src \
101%{__python} -m pytest tests
102%endif
103%endif
104
105%if %{with python3}
106%py3_build
107
108%if %{with tests}
109PYTHONPATH=$(pwd)/src \
110%{__python3} -m pytest tests
111%endif
112%endif
113
114%if %{with doc}
115PYTHONPATH=$(pwd)/src \
116%{__make} -C docs html \
117 SPHINXBUILD=sphinx-build-3
118%endif
119
120%install
121rm -rf $RPM_BUILD_ROOT
122
123%if %{with python2}
124%py_install
125
126%py_postclean
127%endif
128
129%if %{with python3}
130%py3_install
131%endif
132
133%clean
134rm -rf $RPM_BUILD_ROOT
135
136%if %{with python2}
137%files
138%defattr(644,root,root,755)
139%doc AUTHORS.rst CHANGELOG.rst LICENSE README.rst
140%{py_sitescriptdir}/attr
442bb680 141%{py_sitescriptdir}/attrs
b9e2540e
JB
142%{py_sitescriptdir}/attrs-%{version}-py*.egg-info
143%endif
144
145%if %{with python3}
146%files -n python3-attrs
147%defattr(644,root,root,755)
148%doc AUTHORS.rst CHANGELOG.rst LICENSE README.rst
149%{py3_sitescriptdir}/attr
442bb680 150%{py3_sitescriptdir}/attrs
b9e2540e
JB
151%{py3_sitescriptdir}/attrs-%{version}-py*.egg-info
152%endif
153
154%if %{with doc}
155%files apidocs
156%defattr(644,root,root,755)
157%doc docs/_build/html/{_static,*.html,*.js}
158%endif
This page took 0.104087 seconds and 4 git commands to generate.