- split off -doc subpackage, to prevent build cycle with Sphinx

- separate cffi-doc subpackage to break build loop leading to Sphinx

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cffi?expand=0&rev=32
This commit is contained in:
Jan Matejek 2017-03-27 11:51:35 +00:00 committed by Git OBS Bridge
parent 3fb594641e
commit 4eb897a99c
5 changed files with 63 additions and 3 deletions

4
python-cffi-doc.changes Normal file
View File

@ -0,0 +1,4 @@
-------------------------------------------------------------------
Mon Mar 27 11:33:20 UTC 2017 - jmatejek@suse.com
- separate cffi-doc subpackage to break build loop leading to Sphinx

52
python-cffi-doc.spec Normal file
View File

@ -0,0 +1,52 @@
#
# spec file for package python-cffi-doc
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-cffi-doc
Version: 1.9.1
Release: 0
Summary: Documentation for Foreign Function Interface in Python
License: MIT
Group: Development/Languages/Python
Url: https://cffi.readthedocs.org
Source0: https://files.pythonhosted.org/packages/source/c/cffi/cffi-%{version}.tar.gz
BuildRequires: python3-Sphinx
Provides: %{python_module cffi-doc = %{version}}
Supplements: %{python_module cffi = %{version}}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%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.
This package provides the HTML documentation for Python cffi module.
%prep
%setup -q -n cffi-%{version}
%build
python3 setup.py build_sphinx && rm build/sphinx/html/.buildinfo
%install
%files
%defattr(-,root,root,-)
%doc LICENSE build/sphinx/html
%changelog

View File

@ -1,3 +1,4 @@
# cffi specifically installs C headers in site-packages, so :
addFilter("devel-file-in-non-devel-package .*/site-packages/cffi/parse_c_type.h")
addFilter("devel-file-in-non-devel-package .*/site-packages/cffi/_cffi_include.h")
addFilter("devel-file-in-non-devel-package .*/site-packages/cffi/_embedding.h")

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Mar 27 11:50:31 UTC 2017 - jmatejek@suse.com
- split off -doc subpackage, to prevent build cycle with Sphinx
-------------------------------------------------------------------
Thu Mar 16 17:33:16 UTC 2017 - jmatejek@suse.com

View File

@ -34,7 +34,6 @@ BuildRequires: python-rpm-macros
# Documentation requirements:
BuildRequires: %{python_module pycparser}
BuildRequires: %{python_module pytest}
BuildRequires: python3-Sphinx
Requires: python-pycparser
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: pkgconfig(libffi)
@ -51,7 +50,6 @@ is to provide a convenient and reliable way of calling C code from Python.
%build
export CFLAGS="%{optflags}"
%python_build
python3 setup.py build_sphinx && rm build/sphinx/html/.buildinfo
%install
%python_install
@ -61,7 +59,7 @@ python3 setup.py build_sphinx && rm build/sphinx/html/.buildinfo
%files %{python_files}
%defattr(-,root,root,-)
%doc LICENSE build/sphinx/html
%doc LICENSE
%{python_sitearch}/*
%changelog