File python-blockcanvas.spec of Package python-blockcanvas

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


%define modname blockcanvas
Name:           python-%{modname}
Version:        4.0.3
Release:        0
Summary:        Visual environment for creating simulation experiments
License:        BSD-3-Clause and LGPL-2.1 and GPL-2.0
Group:          Development/Libraries/Python
# the program is licensed as BSD-3-Clause, images are licensed under various other licenses
Url:            https://pypi.python.org/pypi/blockcanvas/
Source:         http://www.enthought.com/repo/ets/%{modname}-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  fdupes
BuildRequires:  python-Sphinx
BuildRequires:  python-devel
BuildRequires:  python-setuptools
%if 0%{?suse_version} <= 1110
%{!?python_sitearch: %global python_sitearch  %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(True);")}
%py_requires
%endif

%description
The blockcanvas project provides a visual environment for creating simulation
experiments, where function and data are separated. Thus, you can define your
simulation algorithm by visually connecting function blocks into a data flow
network, and then run it with various data sets (known as "contexts");
likewise, you can use the same context in a different functional simulation.

The project provides support for plotting, function searching and inspection,
and optimization. It includes a stand-alone application that demonstrates the
block-canvas environment, but the same functionality can be incorporated into
other applications.

The blockcanvas project relies on included libraries that allow multiple data
sets using Numeric arrays to be incorporated in a Traits-based model in a
way that is simple, fast, efficient, and consistent.

Part of the Enthought Tool Suite (ETS).

%package doc
Summary:        Documentation for %{name}
Group:          Development/Libraries/Python
Recommends:     %{name}
%if 0%{?suse_version} > 1110
BuildArch:      noarch
%endif

%description doc
Documentation and help files for %{name}

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

%build
python setup.py build

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
pushd docs
make html
popd
rm docs/build/html/.buildinfo
chmod a+x %{buildroot}%{python_sitearch}/%{modname}/canvas/enable_glyph_lib.py
chmod a+x %{buildroot}%{python_sitearch}/%{modname}/cobyla2c/example.py
chmod a+x %{buildroot}%{python_sitearch}/%{modname}/numerical_modeling/workflow/block_experiment_networkx/compiler_/ast/extract_children_trees.py
%if 0%{?suse_version} > 1110
rm %{buildroot}%{python_sitearch}/%{modname}/cobyla2c/*.c
%endif
%fdupes %{buildroot}
%fdupes -s docs/build/

%files
%defattr(-,root,root,-)
%doc LICENSE.txt image_LICENSE*.txt
%{python_sitearch}/%{modname}/
%{python_sitearch}/%{modname}-%{version}-py*.egg-info/

%files doc
%defattr(-,root,root,-)
%doc README.rst docs/build/* docs/*.txt

%changelog
openSUSE Build Service is sponsored by