File python-Biggus.spec of Package python-Biggus

#
# spec file for package python-Biggus
#
# Copyright (c) 2015 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/
#


Name:           python-Biggus
Version:        0.10.0
Release:        0
Summary:        Virtual large arrays and lazy evaluation
License:        LGPL-3.0
Group:          Development/Languages/Python
Url:            https://github.com/SciTools/biggus
Source:         https://pypi.python.org/packages/source/B/Biggus/Biggus-%{version}.tar.gz
BuildRequires:  python-devel
BuildRequires:  python-mock
BuildRequires:  python-nose
BuildRequires:  python-numpy-devel
BuildRequires:  python-pep8
Requires:       python-numpy
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
BuildArch:      noarch
%endif

%description
Virtual large arrays and lazy evaluation.

For example, we can combine multiple array data sources into a single virtual array::

    >>> first_time_series = OrthoArrayAdapter(hdf_var_a)
    >>> second_time_series = OrthoArrayAdapater(hdf_var_b)
    >>> print first_time_series.shape, second_time_series.shape
    (52000, 800, 600) (56000, 800, 600)
    >>> time_series = biggus.LinearMosaic([first_time_series, second_time_series], axis=0)
    >>> time_series
    <LinearMosaic shape=(108000, 800, 600) dtype=dtype('float32')>

*Any* biggus Array can then be indexed, independent of underlying data sources::

    >>> time_series[51999:52001, 10, 12]
    <LinearMosaic shape=(2,) dtype=dtype('float32')>

And an Array can be converted to a numpy ndarray on demand::

    >>> time_series[51999:52001, 10, 12].ndarray()
    array([ 0.72151309,  0.54654914], dtype=float32)

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

%build
python setup.py build

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}

# test fails on pep8 errors
# %check
# nosetests -e test_pep8

%files
%defattr(-,root,root,-)
%doc COPYING COPYING.LESSER README.rst
%{python_sitelib}/biggus/
%{python_sitelib}/Biggus-%{version}-py*.egg-info

%changelog
openSUSE Build Service is sponsored by