]> git.pld-linux.org Git - packages/python-cffi.git/blob - python-cffi.spec
- rebuild with python 3.8
[packages/python-cffi.git] / python-cffi.spec
1 # TODO: examine test_thread.py failures and remove --ignore from py.test invocations
2 #
3 # Conditional build:
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6 %bcond_without  doc     # Sphinx based documentation
7 %bcond_without  tests   # unit tests
8 #
9 Summary:        Foreign Function Interface for Python 2 calling C code
10 Summary(pl.UTF-8):      Interfejs funkcji obcych (FFI) dla Pythona 2 wywołującego kod w C
11 Name:           python-cffi
12 Version:        1.12.3
13 Release:        2
14 License:        MIT
15 Group:          Libraries/Python
16 #Source0Download: https://pypi.org/simple/cffi/
17 Source0:        https://files.pythonhosted.org/packages/source/c/cffi/cffi-%{version}.tar.gz
18 # Source0-md5:  35ad1f9e1003cac9404c1493eb10d7f5
19 URL:            http://cffi.readthedocs.org/
20 BuildRequires:  libffi-devel >= 3
21 BuildRequires:  pkgconfig
22 %if %{with python2}
23 BuildRequires:  python >= 1:2.6
24 BuildRequires:  python-devel >= 1:2.6
25 %if %{with tests}
26 BuildRequires:  python-pycparser
27 BuildRequires:  python-pytest
28 %endif
29 %endif
30 %if %{with python3}
31 BuildRequires:  python3 >= 1:3.2
32 BuildRequires:  python3-devel >= 1:3.2
33 %if %{with tests}
34 BuildRequires:  python3-pycparser
35 BuildRequires:  python3-pytest
36 %endif
37 %endif
38 BuildRequires:  rpm-pythonprov
39 BuildRequires:  rpmbuild(macros) >= 1.714
40 %{?with_doc:BuildRequires:      sphinx-pdg}
41 Requires:       python-modules >= 1:2.6
42 Requires:       python-pycparser
43 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45 %description
46 Foreign Function Interface for Python calling C code. The aim of this
47 project is to provide a convenient and reliable way of calling C code
48 from Python without learning additional language or API.
49
50 This package contains Python 2 module.
51
52 %description -l pl.UTF-8
53 CFFI to interfejs funkcji obcych (FFI - foreign Function Interface) do
54 wywoływania kodu w C z Pythona. Celem projektu jest dostarczenie
55 wygodnego i wiarygodnego sposobu wywoływania kodu w C z Pythona bez
56 potrzeby nauki dodatkowego języka lub API.
57
58 Ten pakiet zawiera moduł Pythona 2.
59
60 %package -n python3-cffi
61 Summary:        Foreign Function Interface for Python 3 calling C code
62 Summary(pl.UTF-8):      Interfejs funkcji obcych (FFI) dla Pythona 3 wywołującego kod w C
63 Group:          Libraries/Python
64 Requires:       python3-modules >= 1:3.2
65 Requires:       python3-pycparser
66
67 %description -n python3-cffi
68 Foreign Function Interface for Python calling C code. The aim of this
69 project is to provide a convenient and reliable way of calling C code
70 from Python without learning additional language or API.
71
72 This package contains Python 3 module.
73
74 %description -n python3-cffi -l pl.UTF-8
75 CFFI to interfejs funkcji obcych (FFI - foreign Function Interface) do
76 wywoływania kodu w C z Pythona. Celem projektu jest dostarczenie
77 wygodnego i wiarygodnego sposobu wywoływania kodu w C z Pythona bez
78 potrzeby nauki dodatkowego języka lub API.
79
80 Ten pakiet zawiera moduł Pythona 3.
81
82 %package apidocs
83 Summary:        API documentation for Python CFFI module
84 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona CFFI
85 Group:          Documentation
86 %if "%{_rpmversion}" >= "5"
87 BuildArch:      noarch
88 %endif
89
90 %description apidocs
91 API documentation for Python CFFI module.
92
93 %description apidocs -l pl.UTF-8
94 Dokumentacja API modułu Pythona CFFI.
95
96 %prep
97 %setup -q -n cffi-%{version}
98
99 %build
100 %if %{with python2}
101 %py_build
102
103 %if %{with tests}
104 PYTHONPATH=$(pwd):$(echo $(pwd)/build-2/lib.linux-*) \
105 py.test-2 c testing
106 %endif
107 %endif
108
109 %if %{with python3}
110 %py3_build
111
112 %if %{with tests}
113 PYTHONPATH=$(pwd):$(echo $(pwd)/build-3/lib.linux-*) \
114 py.test-3 c testing
115 %endif
116 %endif
117
118 %if %{with doc}
119 %{__make} -C doc html
120 %endif
121
122 %install
123 rm -rf $RPM_BUILD_ROOT
124
125 %if %{with python2}
126 %py_install
127
128 %py_postclean
129 %endif
130
131 %if %{with python3}
132 %py3_install
133 %endif
134
135 %clean
136 rm -rf $RPM_BUILD_ROOT
137
138 %if %{with python2}
139 %files
140 %defattr(644,root,root,755)
141 %doc AUTHORS LICENSE README.md
142 %attr(755,root,root) %{py_sitedir}/_cffi_backend.so
143 %dir %{py_sitedir}/cffi
144 %{py_sitedir}/cffi/_cffi_errors.h
145 %{py_sitedir}/cffi/_cffi_include.h
146 %{py_sitedir}/cffi/_embedding.h
147 %{py_sitedir}/cffi/parse_c_type.h
148 %{py_sitedir}/cffi/*.py[co]
149 %{py_sitedir}/cffi-%{version}-py*.egg-info
150 %endif
151
152 %if %{with python3}
153 %files -n python3-cffi
154 %defattr(644,root,root,755)
155 %doc AUTHORS LICENSE README.md
156 %attr(755,root,root) %{py3_sitedir}/_cffi_backend.cpython-*.so
157 %dir %{py3_sitedir}/cffi
158 %{py3_sitedir}/cffi/_cffi_errors.h
159 %{py3_sitedir}/cffi/_cffi_include.h
160 %{py3_sitedir}/cffi/_embedding.h
161 %{py3_sitedir}/cffi/parse_c_type.h
162 %{py3_sitedir}/cffi/*.py
163 %{py3_sitedir}/cffi/__pycache__
164 %{py3_sitedir}/cffi-%{version}-py*.egg-info
165 %endif
166
167 %if %{with doc}
168 %files apidocs
169 %defattr(644,root,root,755)
170 %doc doc/build/html/{_static,*.html,*.js}
171 %endif
This page took 0.06592 seconds and 4 git commands to generate.