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