3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
5 %bcond_without doc # sphinx based documentation
7 Summary: Foreign Function Interface for Python 2 calling C code
8 Summary(pl.UTF-8): Interfejs funkcji obcych (FFI) dla Pythona 2 wywołującego kod w C
13 Group: Libraries/Python
14 Source0: https://pypi.python.org/packages/source/c/cffi/cffi-%{version}.tar.gz
15 # Source0-md5: 1a877bf113bfe90fdefedbf9e39310d2
16 URL: http://cffi.readthedocs.org/
18 BuildRequires: python >= 1:2.6
19 BuildRequires: python-devel >= 1:2.6
20 BuildRequires: rpmbuild(macros) >= 1.219
23 BuildRequires: python3 >= 3.2
24 BuildRequires: python3-devel >= 3.2
26 %{?with_doc:BuildRequires: sphinx-pdg}
27 BuildRequires: rpm-pythonprov
28 Requires: python-modules
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 Foreign Function Interface for Python calling C code. The aim of this
33 project is to provide a convenient and reliable way of calling C code
34 from Python without learning additional language or API.
36 This package contains Python 2 module.
38 %description -l pl.UTF-8
39 CFFI to interfejs funkcji obcych (FFI - foreign Function Interface) do
40 wywoływania kodu w C z Pythona. Celem projektu jest dostarczenie
41 wygodnego i wiarygodnego sposobu wywoływania kodu w C z Pythona bez
42 potrzeby nauki dodatkowego języka lub API.
44 Ten pakiet zawiera moduł Pythona 2.
46 %package -n python3-cffi
47 Summary: Foreign Function Interface for Python 3 calling C code
48 Summary(pl.UTF-8): Interfejs funkcji obcych (FFI) dla Pythona 3 wywołującego kod w C
49 Group: Libraries/Python
50 Requires: python3-modules
52 %description -n python3-cffi
53 Foreign Function Interface for Python calling C code. The aim of this
54 project is to provide a convenient and reliable way of calling C code
55 from Python without learning additional language or API.
57 This package contains Python 3 module.
59 %description -n python3-cffi -l pl.UTF-8
60 CFFI to interfejs funkcji obcych (FFI - foreign Function Interface) do
61 wywoływania kodu w C z Pythona. Celem projektu jest dostarczenie
62 wygodnego i wiarygodnego sposobu wywoływania kodu w C z Pythona bez
63 potrzeby nauki dodatkowego języka lub API.
65 Ten pakiet zawiera moduł Pythona 3.
68 %setup -q -n cffi-%{version}
72 %{__python} setup.py build \
76 %{__python3} setup.py build \
85 rm -rf $RPM_BUILD_ROOT
88 %{__python} setup.py \
90 --build-base build-2 \
92 --root=$RPM_BUILD_ROOT \
99 %{__python3} setup.py \
101 --build-base build-3 \
103 --root=$RPM_BUILD_ROOT \
108 rm -rf $RPM_BUILD_ROOT
112 %defattr(644,root,root,755)
113 %{?with_doc:%doc doc/build/html/{*.html,*.js,_static}}
114 %attr(755,root,root) %{py_sitedir}/_cffi_backend.so
115 %dir %{py_sitedir}/cffi
116 %{py_sitedir}/cffi/*.py[co]
117 %{py_sitedir}/cffi-%{version}-py*.egg-info
121 %files -n python3-cffi
122 %defattr(644,root,root,755)
123 %{?with_doc:%doc doc/build/html/{*.html,*.js,_static}}
124 %attr(755,root,root) %{py3_sitedir}/_cffi_backend.cpython-*.so
125 %{py3_sitedir}/cffi/*.py
126 %{py3_sitedir}/cffi/__pycache__
127 %{py3_sitedir}/cffi-%{version}-py*.egg-info