]> git.pld-linux.org Git - packages/python-cffi.git/blame - python-cffi.spec
- updated to 0.8.2
[packages/python-cffi.git] / python-cffi.spec
CommitLineData
a3ed0930
JB
1#
2# Conditional build:
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
5%bcond_without doc # sphinx based documentation
6#
7Summary: Foreign Function Interface for Python 2 calling C code
8Summary(pl.UTF-8): Interfejs funkcji obcych (FFI) dla Pythona 2 wywołującego kod w C
9Name: python-cffi
4db1fe8b 10Version: 0.8.2
a3ed0930
JB
11Release: 1
12License: MIT
13Group: Libraries/Python
14Source0: https://pypi.python.org/packages/source/c/cffi/cffi-%{version}.tar.gz
4db1fe8b 15# Source0-md5: 37fc88c62f40d04e8a18192433f951ec
a3ed0930
JB
16URL: http://cffi.readthedocs.org/
17%if %{with python2}
18BuildRequires: python >= 1:2.6
19BuildRequires: python-devel >= 1:2.6
a3ed0930
JB
20%endif
21%if %{with python3}
22BuildRequires: python3 >= 3.2
23BuildRequires: python3-devel >= 3.2
24%endif
25%{?with_doc:BuildRequires: sphinx-pdg}
26BuildRequires: rpm-pythonprov
ba8b774a 27BuildRequires: rpmbuild(macros) >= 1.612
a3ed0930 28Requires: python-modules
494e0686 29Requires: python-pycparser
a3ed0930
JB
30BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32%description
33Foreign Function Interface for Python calling C code. The aim of this
34project is to provide a convenient and reliable way of calling C code
35from Python without learning additional language or API.
36
37This package contains Python 2 module.
38
39%description -l pl.UTF-8
40CFFI to interfejs funkcji obcych (FFI - foreign Function Interface) do
41wywoływania kodu w C z Pythona. Celem projektu jest dostarczenie
42wygodnego i wiarygodnego sposobu wywoływania kodu w C z Pythona bez
43potrzeby nauki dodatkowego języka lub API.
44
45Ten pakiet zawiera moduł Pythona 2.
46
47%package -n python3-cffi
48Summary: Foreign Function Interface for Python 3 calling C code
49Summary(pl.UTF-8): Interfejs funkcji obcych (FFI) dla Pythona 3 wywołującego kod w C
50Group: Libraries/Python
51Requires: python3-modules
494e0686 52Requires: python3-pycparser
a3ed0930
JB
53
54%description -n python3-cffi
55Foreign Function Interface for Python calling C code. The aim of this
56project is to provide a convenient and reliable way of calling C code
57from Python without learning additional language or API.
58
59This package contains Python 3 module.
60
61%description -n python3-cffi -l pl.UTF-8
62CFFI to interfejs funkcji obcych (FFI - foreign Function Interface) do
63wywoływania kodu w C z Pythona. Celem projektu jest dostarczenie
64wygodnego i wiarygodnego sposobu wywoływania kodu w C z Pythona bez
65potrzeby nauki dodatkowego języka lub API.
66
67Ten pakiet zawiera moduł Pythona 3.
68
69%prep
70%setup -q -n cffi-%{version}
71
72%build
73%if %{with python2}
74%{__python} setup.py build \
75 --build-base build-2
76%endif
77%if %{with python3}
78%{__python3} setup.py build \
79 --build-base build-3
80%endif
81
82%if %{with doc}
83%{__make} -C doc html
84%endif
85
86%install
87rm -rf $RPM_BUILD_ROOT
88
89%if %{with python2}
90%{__python} setup.py \
91 build \
92 --build-base build-2 \
93 install \
94 --root=$RPM_BUILD_ROOT \
95 --optimize=2
96
97%py_postclean
98%endif
99
100%if %{with python3}
101%{__python3} setup.py \
102 build \
103 --build-base build-3 \
104 install \
105 --root=$RPM_BUILD_ROOT \
106 --optimize=2
107%endif
108
109%clean
110rm -rf $RPM_BUILD_ROOT
111
112%if %{with python2}
113%files
114%defattr(644,root,root,755)
115%{?with_doc:%doc doc/build/html/{*.html,*.js,_static}}
116%attr(755,root,root) %{py_sitedir}/_cffi_backend.so
117%dir %{py_sitedir}/cffi
118%{py_sitedir}/cffi/*.py[co]
119%{py_sitedir}/cffi-%{version}-py*.egg-info
120%endif
121
122%if %{with python3}
123%files -n python3-cffi
124%defattr(644,root,root,755)
125%{?with_doc:%doc doc/build/html/{*.html,*.js,_static}}
126%attr(755,root,root) %{py3_sitedir}/_cffi_backend.cpython-*.so
494e0686 127%dir %{py3_sitedir}/cffi
a3ed0930
JB
128%{py3_sitedir}/cffi/*.py
129%{py3_sitedir}/cffi/__pycache__
130%{py3_sitedir}/cffi-%{version}-py*.egg-info
131%endif
This page took 0.12341 seconds and 4 git commands to generate.