2013-02-10 11:02:31 +01:00
|
|
|
#
|
|
|
|
# spec file for package python-cffi
|
|
|
|
#
|
2015-04-23 08:53:38 +02:00
|
|
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
2013-02-10 11:02:31 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
2013-09-30 10:50:15 +02:00
|
|
|
#
|
2013-02-10 11:02:31 +01:00
|
|
|
|
|
|
|
|
|
|
|
Name: python-cffi
|
2015-09-17 13:31:05 +02:00
|
|
|
Version: 1.2.1
|
2013-02-10 11:02:31 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Foreign Function Interface for Python calling C code
|
2013-09-30 10:50:15 +02:00
|
|
|
License: MIT
|
2013-02-10 11:02:31 +01:00
|
|
|
Group: Development/Languages/Python
|
2013-09-30 10:50:15 +02:00
|
|
|
Url: http://cffi.readthedocs.org
|
2015-09-17 13:31:05 +02:00
|
|
|
Source0: https://pypi.python.org/packages/source/c/cffi/cffi-%{version}.tar.gz
|
2015-06-02 19:47:58 +02:00
|
|
|
Source1: python-cffi-rpmlintrc
|
|
|
|
BuildRequires: gcc-c++
|
2013-02-10 11:02:31 +01:00
|
|
|
BuildRequires: python-devel
|
2013-10-24 12:59:46 +02:00
|
|
|
BuildRequires: python-setuptools
|
2013-02-10 11:02:31 +01:00
|
|
|
# Documentation requirements:
|
|
|
|
BuildRequires: python-Sphinx
|
|
|
|
BuildRequires: python-pycparser
|
2014-02-24 16:15:49 +01:00
|
|
|
BuildRequires: python-pytest
|
2013-02-10 11:02:31 +01:00
|
|
|
Requires: python-pycparser
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
|
|
|
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
2014-03-31 16:19:07 +02:00
|
|
|
BuildRequires: libffi43-devel
|
|
|
|
%else
|
|
|
|
BuildRequires: pkgconfig(libffi)
|
2013-02-10 11:02:31 +01:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%description
|
|
|
|
Foreign Function Interface for Python calling C code. The aim of this project
|
|
|
|
is to provide a convenient and reliable way of calling C code from Python.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n cffi-%{version}
|
|
|
|
|
|
|
|
%build
|
|
|
|
CFLAGS="%{optflags}" python setup.py build
|
|
|
|
python setup.py build_sphinx && rm build/sphinx/html/.buildinfo
|
|
|
|
|
|
|
|
%install
|
|
|
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
|
|
|
|
2015-06-02 19:47:58 +02:00
|
|
|
# tests fail on SLE11 i586, so skip them
|
|
|
|
# TODO recheck with version > 1.1.0
|
|
|
|
%if 0%{?suse_version} > 1110
|
2014-04-02 10:15:41 +02:00
|
|
|
%check
|
|
|
|
PYTHONPATH=%{buildroot}%{python_sitearch} py.test
|
2015-06-02 19:47:58 +02:00
|
|
|
%endif
|
2013-02-10 11:02:31 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc LICENSE build/sphinx/html/
|
|
|
|
%{python_sitearch}/*
|
|
|
|
|
|
|
|
%changelog
|