3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
7 Summary: A Python module for decorators, wrappers and monkey patching
12 Group: Libraries/Python
13 Source0: https://pypi.python.org/packages/source/w/wrapt/%{module}-%{version}.tar.gz
14 # Source0-md5: 79732bbc096235704e7523d3bacd202c
15 URL: https://github.com/GrahamDumpleton/wrapt
16 BuildRequires: rpm-pythonprov
17 BuildRequires: rpmbuild(macros) >= 1.714
19 BuildRequires: python-devel
22 BuildRequires: python3-devel
24 Requires: python-modules
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 The aim of the wrapt module is to provide a transparent object proxy
29 for Python, which can be used as the basis for the construction of
30 function wrappers and decorator functions.
32 The wrapt module focuses very much on correctness. It therefore goes
33 way beyond existing mechanisms such as functools.wraps() to ensure
34 that decorators preserve introspectability, signatures, type checking
35 abilities etc. The decorators that can be constructed using this
36 module will work in far more scenarios than typical decorators and
37 provide more predictable and consistent behaviour.
39 %package -n python3-%{module}
40 Summary: A Python module for decorators, wrappers and monkey patching
41 Group: Libraries/Python
42 Requires: python3-modules
44 %description -n python3-%{module}
45 The aim of the wrapt module is to provide a transparent object proxy
46 for Python, which can be used as the basis for the construction of
47 function wrappers and decorator functions.
49 The wrapt module focuses very much on correctness. It therefore goes
50 way beyond existing mechanisms such as functools.wraps() to ensure
51 that decorators preserve introspectability, signatures, type checking
52 abilities etc. The decorators that can be constructed using this
53 module will work in far more scenarios than typical decorators and
54 provide more predictable and consistent behaviour.
57 %setup -q -n %{module}-%{version}
69 rm -rf $RPM_BUILD_ROOT
82 rm -rf $RPM_BUILD_ROOT
86 %defattr(644,root,root,755)
88 %dir %{py_sitedir}/%{module}
89 %{py_sitedir}/%{module}/*.py[co]
90 %attr(755,root,root) %{py_sitedir}/%{module}/*.so
91 %{py_sitedir}/%{module}-%{version}-py*.egg-info
95 %files -n python3-%{module}
96 %defattr(644,root,root,755)
98 %dir %{py3_sitedir}/%{module}
99 %{py3_sitedir}/%{module}/*.py
100 %attr(755,root,root) %{py3_sitedir}/%{module}/*.so
101 %{py3_sitedir}/%{module}/__pycache__
102 %{py3_sitedir}/%{module}-%{version}-py*.egg-info