3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
7 Summary: Python 2 module for decorators, wrappers and monkey patching
8 Summary(pl.UTF-8): Moduł Pythona 2 do dekorowania, opakowywania i łatania w locie
13 Group: Libraries/Python
14 #Source0Download: https://pypi.org/simple/wrapt/
15 Source0: https://files.pythonhosted.org/packages/source/w/wrapt/%{module}-%{version}.tar.gz
16 # Source0-md5: 6d56ed0de4336462a73350341462f45e
17 URL: https://github.com/GrahamDumpleton/wrapt
18 BuildRequires: rpm-pythonprov
19 BuildRequires: rpmbuild(macros) >= 1.714
21 BuildRequires: python-devel >= 1:2.7
24 BuildRequires: python3-devel >= 1:3.4
26 Requires: python-modules >= 1:2.7
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 The aim of the wrapt module is to provide a transparent object proxy
31 for Python, which can be used as the basis for the construction of
32 function wrappers and decorator functions.
34 The wrapt module focuses very much on correctness. It therefore goes
35 way beyond existing mechanisms such as functools.wraps() to ensure
36 that decorators preserve introspectability, signatures, type checking
37 abilities etc. The decorators that can be constructed using this
38 module will work in far more scenarios than typical decorators and
39 provide more predictable and consistent behaviour.
41 %description -l pl.UTF-8
42 Celem modułu wrapt jest dostarczenie przezroczystego proxy obiektów
43 dla Pythona. Można go używać jako podstawy do konstruowania opakowań
44 funkcji lub funkcji dekoratorów.
46 Moduł wrapt skupia się bardzo na poprawności - wykracza więc poza
47 istniejące mechanizmy, tkaie jak functools.wraps(), aby zapewnić, że
48 dekoratory zachowują introspekcje, sygnatury, możliwość sprawdzania
49 typów itp. Dekoratory tworzone przy użyciu tego modułu będą działać w
50 większej liczbie scenariuszy niż typowe dekoratory oraz zapewniać
51 bardziej przewidywalne i spójne zachowanie.
53 %package -n python3-%{module}
54 Summary: Python 3 module for decorators, wrappers and monkey patching
55 Summary(pl.UTF-8): Moduł Pythona 3 do dekorowania, opakowywania i łatania w locie
56 Group: Libraries/Python
57 Requires: python3-modules >= 1:3.4
59 %description -n python3-%{module}
60 The aim of the wrapt module is to provide a transparent object proxy
61 for Python, which can be used as the basis for the construction of
62 function wrappers and decorator functions.
64 The wrapt module focuses very much on correctness. It therefore goes
65 way beyond existing mechanisms such as functools.wraps() to ensure
66 that decorators preserve introspectability, signatures, type checking
67 abilities etc. The decorators that can be constructed using this
68 module will work in far more scenarios than typical decorators and
69 provide more predictable and consistent behaviour.
71 %description -n python3-%{module} -l pl.UTF-8
72 Celem modułu wrapt jest dostarczenie przezroczystego proxy obiektów
73 dla Pythona. Można go używać jako podstawy do konstruowania opakowań
74 funkcji lub funkcji dekoratorów.
76 Moduł wrapt skupia się bardzo na poprawności - wykracza więc poza
77 istniejące mechanizmy, tkaie jak functools.wraps(), aby zapewnić, że
78 dekoratory zachowują introspekcje, sygnatury, możliwość sprawdzania
79 typów itp. Dekoratory tworzone przy użyciu tego modułu będą działać w
80 większej liczbie scenariuszy niż typowe dekoratory oraz zapewniać
81 bardziej przewidywalne i spójne zachowanie.
84 %setup -q -n %{module}-%{version}
96 rm -rf $RPM_BUILD_ROOT
109 rm -rf $RPM_BUILD_ROOT
113 %defattr(644,root,root,755)
114 %doc LICENSE README.rst
115 %dir %{py_sitedir}/%{module}
116 %{py_sitedir}/%{module}/*.py[co]
117 %attr(755,root,root) %{py_sitedir}/%{module}/*.so
118 %{py_sitedir}/%{module}-%{version}-py*.egg-info
122 %files -n python3-%{module}
123 %defattr(644,root,root,755)
124 %doc LICENSE README.rst
125 %dir %{py3_sitedir}/%{module}
126 %{py3_sitedir}/%{module}/*.py
127 %attr(755,root,root) %{py3_sitedir}/%{module}/*.so
128 %{py3_sitedir}/%{module}/__pycache__
129 %{py3_sitedir}/%{module}-%{version}-py*.egg-info