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