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