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