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