File python-u-msgpack-python.spec of Package python-u-msgpack-python

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


%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name:           python-u-msgpack-python
Version:        2.4.1
Release:        0
Summary:        A portable, lightweight MessagePack serializer and deserializer
License:        MIT
Group:          Development/Languages/Python
Url:            https://github.com/vsergeev/u-msgpack-python
Source:         https://pypi.io/packages/source/u/u-msgpack-python/u-msgpack-python-%{version}.tar.gz
Patch0:         u-msgpack-bigendian_broken.patch
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module setuptools}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
%python_subpackages

%description
u-msgpack-python is a lightweight MessagePack serializer and
deserializer module written in pure Python, compatible with both
Python 2 and Python 3, as well as CPython and PyPy implementations of
Python. u-msgpack-python is fully compliant with the latest
MessagePack specification. In particular, it supports the new binary,
UTF-8 string, and application-defined ext types.

%prep
%setup -q -n u-msgpack-python-%{version}
# we are noarch, so ifarch does not work here
case "$(uname -m)" in
    ppc|ppc64|s390|s390x)
%patch0 -p1
	;;
esac

%build
%python_build

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

%check
export LANG=en_US.UTF-8
%python_exec test_umsgpack.py

%files %{python_files}
%defattr(-,root,root,-)
%doc LICENSE
%pycache_only %{python_sitelib}/__pycache__
%{python_sitelib}/umsgpack.py*
%{python_sitelib}/u_msgpack_python-%{version}-py%{python_version}.egg-info

%changelog
openSUSE Build Service is sponsored by