File python-pymatbridge.spec of Package python-pymatbridge

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


%global __requires_exclude_from ^(/usr/lib.*/py.*/site-packages/pymatbridge/.*/.*\.mex.*)$


%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name:           python-pymatbridge
Version:        0.5.2
Release:        0
Summary:        A set of python and matlab interoperability functions
License:        BSD-3-Clause
Group:          Development/Languages/Python
Url:            https://github.com/arokem/python-matlab-bridge
Source:         https://files.pythonhosted.org/packages/source/p/pymatbridge/pymatbridge-%{version}.tar.gz
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module setuptools}
BuildRequires:  %{python_module numpy > 1.7}
BuildRequires:  %{python_module pyzmq-devel}
Requires:       python-numpy > 1.7
Requires:       python-pyzmq
ExclusiveArch:  x86_64
Requires(post): update-alternatives
Requires(postun): update-alternatives
%python_subpackages

%description
This package provides a set of python and matlab functions with the goal of
providing an easy, seamless way to call Matlab functions within Python (not so
much the other way, because why would anyone want to do something like that?).

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

%build
%python_build

%install
%python_install

%{python_expand rm -r %{buildroot}%{$python_sitelib}/pymatbridge/messenger/mexmaci64/
rm -r %{buildroot}%{$python_sitelib}/pymatbridge/messenger/mexw64/
%fdupes %{buildroot}%{$python_sitelib}
}

%python_clone -a %{buildroot}%{_bindir}/publish-notebook

%post
%python_install_alternative publish-notebook

%postun
%python_uninstall_alternative publish-notebook

%files %{python_files}
%defattr(-,root,root,-)
%doc pymatbridge/examples/
%{python_sitelib}/pymatbridge/
%{python_sitelib}/pymatbridge-%{version}-py*.egg-info
%python_alternative %{_bindir}/publish-notebook

%changelog
openSUSE Build Service is sponsored by