File python-zodburi.spec of Package python-zodburi
#
# spec file for package python-zodburi
#
# Copyright (c) 2018 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-%{**}}
%bcond_without test
Name: python-zodburi
Version: 2.3.0
Release: 0
Summary: Construct ZODB storage instances from URIs
License: BSD-4-Clause and ZPL-2.1 and MIT
Group: Development/Libraries/Python
Url: http://docs.pylonsproject.org/projects/zodburi/dev
Source: https://files.pythonhosted.org/packages/source/z/zodburi/zodburi-%{version}.tar.gz
BuildRequires: %{python_module ZConfig}
BuildRequires: %{python_module ZEO}
BuildRequires: %{python_module ZODB}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: python3-Sphinx
BuildRequires: python3-pylons-sphinx-themes
%if %{with test}
BuildRequires: %{python_module mock}
BuildRequires: %{python_module nose}
BuildRequires: %{python_module zodbpickle}
BuildRequires: python-futures
%endif
Requires: python-ZConfig
Requires: python-ZEO
Requires: python-ZODB
BuildArch: noarch
%python_subpackages
%description
A library which parses URIs and converts them to ZODB storage objects and
database arguments.
See the documentation at http://docs.pylonsproject.org/projects/zodburi/dev/
for more information.
%package -n %{name}-doc
Summary: Construct ZODB storage instances from URIs
Group: Development/Languages/Python
Provides: %{python_module zodburi-doc = %{version}}
%description -n %{name}-doc
This package contains documentation files for %{name}.
%prep
%setup -q -n zodburi-%{version}
%build
%python_build
%__python3 setup.py build_sphinx && rm build/sphinx/html/.buildinfo
%install
%python_install
%python_expand %fdupes -s %{buildroot}%{$python_sitelib}
%if %{with test}
%check
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
nosetests-%{$python_bin_suffix} --exclude='TestResolveURI$'
}
%endif
%files %{python_files}
%defattr(-,root,root)
%doc CHANGES.rst CONTRIBUTORS.txt COPYRIGHT.txt LICENSE.txt README.rst
%{python_sitelib}/*
%files -n %{name}-doc
%defattr(-,root,root,-)
%doc build/sphinx/html
%changelog