File python-xlrd.spec of Package python-xlrd

#
# spec file for package python-xlrd
#
# 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/
#


%bcond_without tests

%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name:           python-xlrd
Version:        1.0.0
Release:        0
Url:            http://www.lexicon.net/sjmachin/xlrd.htm
Summary:        Library for Developers to Extract Data From Microsoft Excel Spreadsheet Files
License:        BSD-3-Clause
Group:          Development/Languages/Python
Source:         https://files.pythonhosted.org/packages/source/x/xlrd/xlrd-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module setuptools}
%if %{with tests}
BuildRequires:  %{python_module nose}
%endif
BuildArch:      noarch
%python_subpackages

%description
Extract data from new and old Excel spreadsheets on any platform. Pure Python
(2.1 to 2.6). Strong support for Excel dates. Unicode-aware.

%prep
%setup -q -n xlrd-%{version}

%build
%python_build

%install
%python_install
mv %{buildroot}%{_bindir}/runxlrd.py %{buildroot}%{_bindir}/runxlrd

%if %{with tests}
%check
%python_expand nosetests-%{$python_bin_suffix}
%endif

%files %{python_files}
%defattr(-,root,root,-)
%doc HISTORY.html README.md 
%python3_only %{_bindir}/runxlrd
%{python_sitelib}/*

%changelog
openSUSE Build Service is sponsored by