]> git.pld-linux.org Git - packages/python-cached_property.git/blame - python-cached_property.spec
- python 3.7 rebuild
[packages/python-cached_property.git] / python-cached_property.spec
CommitLineData
3ecdc3da
ER
1#
2# Conditional build:
3%bcond_without doc # don't build doc
4%bcond_with tests # do not perform "make test"
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
7
8%define module cached_property
9Summary: A cached-property for decorating methods in Python classes
10Name: python-%{module}
11Version: 1.3.0
b243a47a 12Release: 3
3ecdc3da
ER
13License: BSD
14Group: Libraries/Python
15Source0: https://github.com/pydanny/cached-property/archive/34b1caf8/cached-property-%{version}.tar.gz
16# Source0-md5: 973727514d27e4f4a07358802c4943dc
17URL: https://github.com/pydanny/cached-property
18BuildRequires: rpm-pythonprov
19BuildRequires: rpmbuild(macros) >= 1.714
20%if %{with python2}
21BuildRequires: python-modules
22BuildRequires: python-setuptools
23%if %{with tests}
24BuildRequires: python-freezegun
25BuildRequires: python-pytest
26BuildRequires: python-tox >= 1.7.2
27%endif
28%endif
29%if %{with python3}
30BuildRequires: python3-modules
31BuildRequires: python3-setuptools
32%if %{with tests}
33BuildRequires: python3-freezegun
34BuildRequires: python3-pytest
35%endif
36%endif
37BuildArch: noarch
38BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40%description
41cached_property allows properties in Python classes to be cached until
42the cache is invalidated or expired.
43
44%package -n python3-%{module}
45Summary: A cached-property for decorating methods in Python classes
46Group: Libraries/Python
47
48%description -n python3-%{module}
49cached_property allows properties in Python classes to be cached until
50the cache is invalidated or expired.
51
52%prep
53%setup -qc
54mv cached-property-*/* .
55
56%build
57%if %{with python2}
58%py_build
59%endif
60
61%if %{with python3}
62%py3_build
63%endif
64
65%if %{with tests}
66# FIXME: python3 tests do not run: it wants %{_bindir}/py.test but python3-pytest provides %{_bindir}/py.test-3.4
67tox --sitepackages --skip-missing-interpreters
68%endif
69
70%install
71rm -rf $RPM_BUILD_ROOT
72%if %{with python2}
73%py_install
74%py_postclean
75%endif
76
77%if %{with python3}
78%py3_install
79%endif
80
81%clean
82rm -rf $RPM_BUILD_ROOT
83
84%if %{with python2}
85%files
86%defattr(644,root,root,755)
87%doc AUTHORS.rst HISTORY.rst CONTRIBUTING.rst README.rst LICENSE
88%{py_sitescriptdir}/%{module}.py[co]
89%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
90%endif
91
92%if %{with python3}
93%files -n python3-%{module}
94%defattr(644,root,root,755)
95%doc AUTHORS.rst HISTORY.rst CONTRIBUTING.rst README.rst LICENSE
96%{py3_sitescriptdir}/%{module}.py
97%{py3_sitescriptdir}/__pycache__/%{module}.*.pyc
98%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
99%endif
This page took 0.095429 seconds and 4 git commands to generate.