File python-xlutils.spec of Package python-xlutils
#
# spec file for package python-xlutils
#
# Copyright (c) 2018 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-xlutils
Version: 2.0.0
Release: 0
Summary: Utilities for working with Excel files that require both xlrd and xlwt
License: MIT
Group: Development/Languages/Python
Url: http://www.python-excel.org
Source: https://files.pythonhosted.org/packages/source/x/xlutils/xlutils-%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
# SECTION test requirements
BuildRequires: %{python_module errorhandler}
BuildRequires: %{python_module manuel}
BuildRequires: %{python_module mock}
BuildRequires: %{python_module testfixtures}
BuildRequires: %{python_module xlrd >= 0.7.2}
BuildRequires: %{python_module xlwt >= 0.7.4}
# /SECTION
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-errorhandler
Requires: python-xlrd >= 0.7.2
Requires: python-xlwt >= 0.7.4
BuildArch: noarch
Requires(post): update-alternatives
Requires(postun): update-alternatives
%python_subpackages
%description
This package provides a collection of utilities for working with Excel
files. Since these utilities may require either or both of the xlrd
and xlwt packages, they are collected together here, separate from either
package.
%prep
%setup -q -n xlutils-%{version}
%build
%python_build
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/margins
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%python_exec setup.py test
%post
%python_install_alternative margins
%postun
%python_uninstall_alternative margins
%files %{python_files}
%defattr(-,root,root,-)
%doc README.rst
%python_alternative %{_bindir}/margins
%{python_sitelib}/*
%changelog