python-persistent/python-persistent.spec

98 lines
3.1 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-persistent
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2013 LISA GmbH, Bingen, 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-persistent
Version: 4.2.4.2
Release: 0
Summary: Translucent persistent objects
License: ZPL-2.1
Group: Development/Languages/Python
Url: https://github.com/zopefoundation/persistent
Source: https://files.pythonhosted.org/packages/source/p/persistent/persistent-%{version}.tar.gz
# Documentation requirements:
BuildRequires: %{python_module Sphinx}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module repoze.sphinx.autointerface}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module zope.interface}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-zope.interface
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%python_subpackages
%description
This package contains a generic persistence implementation for Python. It forms
the core protocol for making objects interact "transparently" with a database
such as the ZODB.
%package devel
Summary: Translucent persistent objects
Group: Development/Languages/Python
Requires: %{name} = %{version}
%description devel
This package contains the files needed for binding the %{name} C module.
%package doc
Summary: Translucent persistent objects
Group: Development/Languages/Python
Requires: %{name} = %{version}
%description doc
This package contains documentation files for %{name}.
%prep
%setup -q -n persistent-%{version}
rm -rf persistent.egg-info
%build
%python_build
%{_python_use_flavor python3}
python3 setup.py build_sphinx && rm build/sphinx/html/.buildinfo
%install
%python_install
# don't bother with development files
%{python_expand rm %{buildroot}%{$python_sitearch}/persistent/*.c
%fdupes -s %{buildroot}%{$python_sitearch}
}
%check
%python_exec setup.py -q test
%files %{python_files}
%defattr(-,root,root,-)
%doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst
%exclude %{python_sitearch}/persistent/*.h
%{python_sitearch}/*
%files %{python_files devel}
%defattr(-,root,root,-)
%dir %{python_sysconfig_path include}/persistent
%{python_sysconfig_path include}/persistent/*.h
%{python_sitearch}/persistent/*.h
%files %{python_files doc}
%defattr(-,root,root,-)
%doc build/sphinx/html/
%changelog