15
0
forked from pool/python-ZEO
Files
python-ZEO/python-ZEO.spec

122 lines
3.8 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-ZEO
#
# 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-ZEO
Version: 5.1.0
Release: 0
Summary: Client-Server storage implementation for ZODB
License: ZPL-2.1
Group: Development/Languages/Python
Url: http://docs.pylonsproject.org
Source: https://files.pythonhosted.org/packages/source/Z/ZEO/ZEO-%{version}.tar.gz
Source99: %{name}-rpmlintrc
BuildRequires: %{python_module devel}
# SECTION documentation requirements
BuildRequires: %{python_module Sphinx}
BuildRequires: %{python_module ZConfig}
BuildRequires: %{python_module ZODB >= 4.0.0}
# /SECTION
# SECTION testing requirements
BuildRequires: %{python_module manuel}
BuildRequires: %{python_module mock}
BuildRequires: %{python_module msgpack-python}
BuildRequires: %{python_module random2}
BuildRequires: %{python_module zodbpickle >= 0.6.0}
BuildRequires: %{python_module zope.testing}
BuildRequires: python2-futures
BuildRequires: python2-trollius
# /SECTION
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-ZConfig
Requires: python-ZODB >= 4.0.0
Requires: python-persistent
Requires: python-transaction
%ifpython2
Requires: python-trollius
%endif
Requires: python-zc.lockfile
Requires: python-zdaemon
Requires: python-zope.interface
Requires(post): update-alternatives
Requires(preun): update-alternatives
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%python_subpackages
%description
ZEO provides a client-server storage implementation for ZODB.
%package -n %{name}-doc
Summary: Client-Server storage implementation for ZODB
Group: Development/Languages/Python
Provides: %{python_module ZEO-doc = %{version}}
Requires: %{name} = %{version}
%description -n %{name}-doc
This package contains documentation files for %{name}.
%prep
%setup -q -n ZEO-%{version}
# delete backup files
find . -name "*~" -print -delete
# remove unwanted shebang
find src -name "*.py" | xargs sed -i '1 { /^#!/ d }'
rm -rf src/ZEO.egg-info
%build
%python_build
%{_python_use_flavor python3}
python3 setup.py build_sphinx && rm build/sphinx/html/.buildinfo
%install
%python_install
%python_expand %fdupes -s %{buildroot}%{$python_sitelib}
%python_clone -a %{buildroot}%{_bindir}/runzeo
%python_clone -a %{buildroot}%{_bindir}/zeoctl
%python_clone -a %{buildroot}%{_bindir}/zeopack
%python_clone -a %{buildroot}%{_bindir}/zeo-nagios
%check
%python_exec setup.py test
%post
%python_install_alternative runzeo zeoctl zeopack zeo-nagios
%postun
%python_uninstall_alternative runzeo
%files %{python_files}
%defattr(-,root,root,-)
%doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst
%python_alternative %{_bindir}/runzeo
%python_alternative %{_bindir}/zeoctl
%python_alternative %{_bindir}/zeopack
%python_alternative %{_bindir}/zeo-nagios
%{python_sitelib}/ZEO
%{python_sitelib}/ZEO-%{version}-py%{python_version}.egg-info
%files -n %{name}-doc
%defattr(-,root,root,-)
%doc build/sphinx/html
%changelog