File python-odo.spec of Package python-odo

#
# spec file for package python-odo
#
# Copyright (c) 2017 SUSE LINUX Products 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 test

%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name:           python-odo
Version:        0.5.1
Release:        0
Summary:        Data migration utilities
License:        BSD-2-Clause
Group:          Development/Languages/Python
Url:            https://github.com/blaze/odo
Source:         https://github.com/blaze/odo/archive/v%{version}.tar.gz
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module setuptools}
BuildRequires:  %{python_module DataShape >= 0.5.0}
BuildRequires:  %{python_module multipledispatch >= 0.4.7}
BuildRequires:  %{python_module networkx}
BuildRequires:  %{python_module numpy-devel >= 1.7}
BuildRequires:  %{python_module pandas >= 0.15.0}
BuildRequires:  %{python_module toolz >= 0.7.3}
%if %{with test}
BuildRequires:  %{python_module dask}
BuildRequires:  %{python_module pytest}
%endif
Requires:       python-DataShape >= 0.5.0
Requires:       python-multipledispatch >= 0.4.7
Requires:       python-networkx
Requires:       python-numpy >= 1.7
Requires:       python-pandas >= 0.15.0
Requires:       python-toolz >= 0.7.3
Recommends:     python-SQLAlchemy >= 0.8.0
Recommends:     python-bcolz
Recommends:     python-boto
Recommends:     python-dask
Recommends:     python-h5py
Recommends:     python-paramiko
Recommends:     python-pymongo >= 2.8
Recommends:     python-pywebhdfs
Recommends:     python-sas7bdat
Requires(post): update-alternatives
Requires(preun): update-alternatives
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
%python_subpackages

%description
Odo migrates data between different containers. It operates on small,
in-memory containers and large, out-of-core containers.  Odo leverages
the existing Python ecosystem. It can, for example, use sqlalchemy for
SQL interation and h5py for HDF5 interaction.

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

%build
%python_build

%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}

%python_clone -a %{buildroot}%{_bindir}/odo

%if %{with test}
%check
pushd odo/tests
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
py.test-%{$python_bin_suffix} .
}
popd
%endif

%post
%python_install_alternative odo

%preun
%python_uninstall_alternative odo

%files %{python_files}
%defattr(-,root,root,-)
%doc README.rst
%python_alternative %{_bindir}/odo
%{python_sitelib}/*

%changelog
openSUSE Build Service is sponsored by