]> git.pld-linux.org Git - SPECS.git/blob - python-wrapt.spec
SPECS updated Sun 1 Aug 20:28:02 CEST 2021
[SPECS.git] / python-wrapt.spec
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
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
9 Name:           python-%{module}
10 Version:        1.12.1
11 Release:        2
12 License:        BSD
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
20 %if %{with python2}
21 BuildRequires:  python-devel >= 1:2.7
22 %endif
23 %if %{with python3}
24 BuildRequires:  python3-devel >= 1:3.4
25 %endif
26 Requires:       python-modules >= 1:2.7
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
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
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
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
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
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)
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
119 %endif
120
121 %if %{with python3}
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
130 %endif
This page took 0.382647 seconds and 3 git commands to generate.