File python-svgwrite.spec of Package python-svgwrite

#
# spec file for package python-svgwrite
#
# Copyright (c) 2018 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-svgwrite
Version:        1.1.12
Release:        0
Summary:        Create SVG Drawings
License:        MIT
Group:          Development/Libraries/Python
URL:            https://github.com/mozman/svgwrite
Source0:        https://files.pythonhosted.org/packages/source/s/svgwrite/svgwrite-%{version}.zip
BuildRequires:  fdupes
BuildRequires:  python-devel
BuildRequires:  python-pyparsing >= 2.0.1
BuildRequires:  python-setuptools
BuildRequires:  python-xml
BuildRequires:  unzip
Requires:       python-pyparsing >= 2.0.1
Requires:       python-xml
BuildArch:      noarch

%description
A Python library to create SVG drawings.

%prep
%setup -q -n svgwrite-%{version}
for py in svgwrite/*.py svgwrite/data/*.py ; do
    sed -i '/\/usr\/bin\/env/d' "${py}"
done
find -name "*.py" -exec sed -i 's/\r$//' {} \;
sed -i 's/\r$//' \
    LICENSE.TXT NEWS.rst README.rst examples/runall.sh \
    examples/ltattrie/rgb.txt examples/ltattrie/runall.sh
find examples -name "*.bat" -delete

%build

%install
python setup.py install \
    --root=%{buildroot} \
    --prefix=%{_prefix}
%fdupes -s examples

%check
python -m unittest discover -s tests

%files
%license LICENSE.TXT
%doc NEWS.rst README.rst examples
%{python_sitelib}/svgwrite/
%{python_sitelib}/svgwrite-%{version}-py%{py_ver}.egg-info

%changelog
openSUSE Build Service is sponsored by