]> git.pld-linux.org Git - packages/python-wrapt.git/blame - python-wrapt.spec
- release 3
[packages/python-wrapt.git] / python-wrapt.spec
CommitLineData
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
7Summary: Python 2 module for decorators, wrappers and monkey patching
8Summary(pl.UTF-8): Moduł Pythona 2 do dekorowania, opakowywania i łatania w locie
1504bca3 9Name: python-%{module}
e0bc3049 10Version: 1.11.2
8f5a2fcb 11Release: 3
1504bca3
JK
12License: BSD
13Group: Libraries/Python
dbb63cef
JB
14#Source0Download: https://pypi.org/simple/wrapt/
15Source0: https://files.pythonhosted.org/packages/source/w/wrapt/%{module}-%{version}.tar.gz
e0bc3049 16# Source0-md5: cc15c001b129f81eb2f79b15eb99ffe5
1504bca3
JK
17URL: https://github.com/GrahamDumpleton/wrapt
18BuildRequires: rpm-pythonprov
19BuildRequires: rpmbuild(macros) >= 1.714
20%if %{with python2}
dbb63cef 21BuildRequires: python-devel >= 1:2.7
1504bca3
JK
22%endif
23%if %{with python3}
dbb63cef 24BuildRequires: python3-devel >= 1:3.4
1504bca3 25%endif
dbb63cef 26Requires: python-modules >= 1:2.7
1504bca3
JK
27BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29%description
30The aim of the wrapt module is to provide a transparent object proxy
31for Python, which can be used as the basis for the construction of
32function wrappers and decorator functions.
33
34The wrapt module focuses very much on correctness. It therefore goes
35way beyond existing mechanisms such as functools.wraps() to ensure
36that decorators preserve introspectability, signatures, type checking
37abilities etc. The decorators that can be constructed using this
38module will work in far more scenarios than typical decorators and
39provide more predictable and consistent behaviour.
40
dbb63cef
JB
41%description -l pl.UTF-8
42Celem modułu wrapt jest dostarczenie przezroczystego proxy obiektów
43dla Pythona. Można go używać jako podstawy do konstruowania opakowań
44funkcji lub funkcji dekoratorów.
45
46Moduł wrapt skupia się bardzo na poprawności - wykracza więc poza
47istniejące mechanizmy, tkaie jak functools.wraps(), aby zapewnić, że
48dekoratory zachowują introspekcje, sygnatury, możliwość sprawdzania
49typów itp. Dekoratory tworzone przy użyciu tego modułu będą działać w
50większej liczbie scenariuszy niż typowe dekoratory oraz zapewniać
51bardziej przewidywalne i spójne zachowanie.
52
1504bca3 53%package -n python3-%{module}
dbb63cef
JB
54Summary: Python 3 module for decorators, wrappers and monkey patching
55Summary(pl.UTF-8): Moduł Pythona 3 do dekorowania, opakowywania i łatania w locie
1504bca3 56Group: Libraries/Python
dbb63cef 57Requires: python3-modules >= 1:3.4
1504bca3
JK
58
59%description -n python3-%{module}
60The aim of the wrapt module is to provide a transparent object proxy
61for Python, which can be used as the basis for the construction of
62function wrappers and decorator functions.
63
64The wrapt module focuses very much on correctness. It therefore goes
65way beyond existing mechanisms such as functools.wraps() to ensure
66that decorators preserve introspectability, signatures, type checking
67abilities etc. The decorators that can be constructed using this
68module will work in far more scenarios than typical decorators and
69provide more predictable and consistent behaviour.
70
dbb63cef
JB
71%description -n python3-%{module} -l pl.UTF-8
72Celem modułu wrapt jest dostarczenie przezroczystego proxy obiektów
73dla Pythona. Można go używać jako podstawy do konstruowania opakowań
74funkcji lub funkcji dekoratorów.
75
76Moduł wrapt skupia się bardzo na poprawności - wykracza więc poza
77istniejące mechanizmy, tkaie jak functools.wraps(), aby zapewnić, że
78dekoratory zachowują introspekcje, sygnatury, możliwość sprawdzania
79typów itp. Dekoratory tworzone przy użyciu tego modułu będą działać w
80większej liczbie scenariuszy niż typowe dekoratory oraz zapewniać
81bardziej 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
96rm -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
109rm -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
This page took 0.088095 seconds and 4 git commands to generate.