File python-XML2Dict.spec of Package python-XML2Dict
#
# spec file for package python-XML2Dict
#
# Copyright (c) 2016, Martin Hauke <mardnh@gmx.de>
#
# 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-XML2Dict
Version: 0.2.2
Release: 0
License: Apache-2.0
Summary: Convert between XML String and Python Dict
Url: https://github.com/mcspring/XML2Dict
Group: Development/Languages/Python
Source: https://pypi.io/packages/source/X/XML2Dict/XML2Dict-%{version}.tar.gz
BuildRequires: python-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
XML2Dict is a python library, which used for converting python dict and XML type.
It is inspired from Chen Zheng's xml2dict (http://github.com/nkchenz/xml2dict/tree)
%prep
%setup -q -n XML2Dict-%{version}
sed -i 's/\r$//' README.md encoder.py decoder.py
%build
python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
# Fix path
mkdir -p %{buildroot}/%{python_sitelib}/XML2Dict
mv %{buildroot}/%{python_sitelib}/decoder.* %{buildroot}/%{python_sitelib}/XML2Dict/
mv %{buildroot}/%{python_sitelib}/encoder.* %{buildroot}/%{python_sitelib}/XML2Dict/
%files
%defattr(-,root,root,-)
%doc README.md
%{python_sitelib}/XML2Dict
%{python_sitelib}/XML2Dict-%{version}-py%{py_ver}.egg-info
%changelog