]>
Commit | Line | Data |
---|---|---|
1504bca3 JK |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
5 | ||
6 | %define module wrapt | |
dbb63cef JB |
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 | |
1504bca3 | 9 | Name: python-%{module} |
e0bc3049 | 10 | Version: 1.11.2 |
8f5a2fcb | 11 | Release: 3 |
1504bca3 JK |
12 | License: BSD |
13 | Group: Libraries/Python | |
dbb63cef JB |
14 | #Source0Download: https://pypi.org/simple/wrapt/ |
15 | Source0: https://files.pythonhosted.org/packages/source/w/wrapt/%{module}-%{version}.tar.gz | |
e0bc3049 | 16 | # Source0-md5: cc15c001b129f81eb2f79b15eb99ffe5 |
1504bca3 JK |
17 | URL: https://github.com/GrahamDumpleton/wrapt |
18 | BuildRequires: rpm-pythonprov | |
19 | BuildRequires: rpmbuild(macros) >= 1.714 | |
20 | %if %{with python2} | |
dbb63cef | 21 | BuildRequires: python-devel >= 1:2.7 |
1504bca3 JK |
22 | %endif |
23 | %if %{with python3} | |
dbb63cef | 24 | BuildRequires: python3-devel >= 1:3.4 |
1504bca3 | 25 | %endif |
dbb63cef | 26 | Requires: python-modules >= 1:2.7 |
1504bca3 JK |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
28 | ||
29 | %description | |
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. | |
33 | ||
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. | |
40 | ||
dbb63cef JB |
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. | |
45 | ||
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. | |
52 | ||
1504bca3 | 53 | %package -n python3-%{module} |
dbb63cef JB |
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 | |
1504bca3 | 56 | Group: Libraries/Python |
dbb63cef | 57 | Requires: python3-modules >= 1:3.4 |
1504bca3 JK |
58 | |
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. | |
63 | ||
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. | |
70 | ||
dbb63cef JB |
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. | |
75 | ||
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. | |
82 | ||
1504bca3 JK |
83 | %prep |
84 | %setup -q -n %{module}-%{version} | |
85 | ||
86 | %build | |
87 | %if %{with python2} | |
88 | %py_build | |
89 | %endif | |
90 | ||
91 | %if %{with python3} | |
92 | %py3_build | |
93 | %endif | |
94 | ||
95 | %install | |
96 | rm -rf $RPM_BUILD_ROOT | |
97 | ||
98 | %if %{with python2} | |
99 | %py_install | |
100 | ||
101 | %py_postclean | |
102 | %endif | |
103 | ||
104 | %if %{with python3} | |
105 | %py3_install | |
106 | %endif | |
107 | ||
108 | %clean | |
109 | rm -rf $RPM_BUILD_ROOT | |
110 | ||
111 | %if %{with python2} | |
112 | %files | |
113 | %defattr(644,root,root,755) | |
dbb63cef | 114 | %doc LICENSE README.rst |
1504bca3 JK |
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 | |
119 | %endif | |
120 | ||
121 | %if %{with python3} | |
122 | %files -n python3-%{module} | |
123 | %defattr(644,root,root,755) | |
dbb63cef | 124 | %doc LICENSE README.rst |
1504bca3 JK |
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 | |
130 | %endif |