python-marshmallow/python-marshmallow.spec

91 lines
2.7 KiB
RPMSpec

#
# spec file for package python-marshmallow
#
# 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-%{**}}
%{!?license: %global license %doc}
%bcond_without test
Name: python-marshmallow
Version: 2.13.6
Release: 0
License: MIT AND BSD-3-Clause
Summary: Converting complex datatypes to and from native Python datatypes
Url: http://marshmallow.readthedocs.io/
Group: Development/Languages/Python
Source: https://files.pythonhosted.org/packages/source/m/marshmallow/marshmallow-%{version}.tar.gz
# PATCH-FIX-OPENSUSE patch-remove-unsupported-theme-option.patch sebix+novell.com@sebix.at
Patch0: patch-remove-unsupported-theme-option.patch
BuildRequires: python-rpm-macros
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python3-Sphinx
BuildRequires: python3-sphinx-issues
# SECTION test requirements
%if %{with test}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module pytz}
BuildRequires: %{python_module simplejson}
%endif
# /SECTION
Suggests: python-python-dateutil
Suggests: python-simplejson
Suggests: %{name}-docs
BuildArch: noarch
%python_subpackages
%package -n %{name}-docs
Summary: Documentation files for %name
Group: Documentation/Other
%description
marshmallow is an ORM/ODM/framework-agnostic library for converting complex
datatypes, such as objects, to and from native Python datatypes.
%description -n %name-docs
HTML Documentation and examples for %name.
%prep
%setup -q -n marshmallow-%{version}
%patch0 -p1
%build
%python_build
pushd docs
make html
rm _build/html/.buildinfo
popd
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%if %{with test}
%check
%python_exec setup.py test
%endif
%files %{python_files}
%doc AUTHORS.rst CHANGELOG.rst README.rst
%license LICENSE NOTICE
%{python_sitelib}/*
%files -n %{name}-docs
%doc examples docs/_build/html/
%changelog