]> git.pld-linux.org Git - packages/python-wrapt.git/blame - python-wrapt.spec
new package
[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
7Summary: A Python module for decorators, wrappers and monkey patching
8Name: python-%{module}
9Version: 1.10.5
10Release: 1
11License: BSD
12Group: Libraries/Python
13Source0: https://pypi.python.org/packages/source/w/wrapt/%{module}-%{version}.tar.gz
14# Source0-md5: 79732bbc096235704e7523d3bacd202c
15URL: https://github.com/GrahamDumpleton/wrapt
16BuildRequires: rpm-pythonprov
17BuildRequires: rpmbuild(macros) >= 1.714
18%if %{with python2}
19BuildRequires: python-devel
20%endif
21%if %{with python3}
22BuildRequires: python3-devel
23%endif
24Requires: python-modules
25BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27%description
28The aim of the wrapt module is to provide a transparent object proxy
29for Python, which can be used as the basis for the construction of
30function wrappers and decorator functions.
31
32The wrapt module focuses very much on correctness. It therefore goes
33way beyond existing mechanisms such as functools.wraps() to ensure
34that decorators preserve introspectability, signatures, type checking
35abilities etc. The decorators that can be constructed using this
36module will work in far more scenarios than typical decorators and
37provide more predictable and consistent behaviour.
38
39%package -n python3-%{module}
40Summary: A Python module for decorators, wrappers and monkey patching
41Group: Libraries/Python
42Requires: python3-modules
43
44%description -n python3-%{module}
45The aim of the wrapt module is to provide a transparent object proxy
46for Python, which can be used as the basis for the construction of
47function wrappers and decorator functions.
48
49The wrapt module focuses very much on correctness. It therefore goes
50way beyond existing mechanisms such as functools.wraps() to ensure
51that decorators preserve introspectability, signatures, type checking
52abilities etc. The decorators that can be constructed using this
53module will work in far more scenarios than typical decorators and
54provide more predictable and consistent behaviour.
55
56%prep
57%setup -q -n %{module}-%{version}
58
59%build
60%if %{with python2}
61%py_build
62%endif
63
64%if %{with python3}
65%py3_build
66%endif
67
68%install
69rm -rf $RPM_BUILD_ROOT
70
71%if %{with python2}
72%py_install
73
74%py_postclean
75%endif
76
77%if %{with python3}
78%py3_install
79%endif
80
81%clean
82rm -rf $RPM_BUILD_ROOT
83
84%if %{with python2}
85%files
86%defattr(644,root,root,755)
87%doc README
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
92%endif
93
94%if %{with python3}
95%files -n python3-%{module}
96%defattr(644,root,root,755)
97%doc README
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
103%endif
This page took 0.065488 seconds and 4 git commands to generate.