14
0
forked from pool/python-scour
Files
python-scour/python-scour.spec
Tomáš Chvátal 5775c80250 Accepting request 688295 from home:pgajdos
- version update to 0.37
  * Fix escaping of quotes in attribute values.
  * A lot of performance improvements.
  * Fix exception when removing duplicated gradients while
    `--keep-unreferenced-defs` is used.
  * Remove some illegal optimizations of `m0 0` sub-path commands.
  * Fix and improve handling of boolean flags in elliptical arc path
    commands.
  * Fix exception when using two-number forms of the filter attributes
    `baseFrequency`, `order`, `radius` and `stdDeviation`.
  * Improve whitespace handling in text nodes fixing an issue where
    scouring added spaces in error and reducing file size in many cases.
  * Drop official support for Python 3.3.
- etc. see HISTORY.md for details.
- build also python3 variant
- run unit tests
- package LICENSE and *.md

OBS-URL: https://build.opensuse.org/request/show/688295
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-scour?expand=0&rev=13
2019-03-25 15:52:53 +00:00

78 lines
2.3 KiB
RPMSpec

#
# spec file for package python-scour
#
# Copyright (c) 2019 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 https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-scour
Version: 0.37
Release: 0
Summary: An SVG scrubber
License: Apache-2.0
Group: Productivity/Graphics/Other
Url: https://github.com/oberstet/scour
Source: https://github.com/scour-project/scour/archive/v%{version}/scour-%{version}.tar.gz
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: unzip
Requires: python-setuptools
Requires(post): update-alternatives
Requires(postun): update-alternatives
Provides: scour = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%python_subpackages
%description
Scour is a Python script that aggressively cleans SVG files, removing
a lot of "cruft" that certain tools or authors embed into their
documents.
The goal of scour is to provide an identically rendered image.
%prep
%setup -q -n scour-%{version}
# remove unwanted shebang
sed -i '/^#!/ d' scour/{scour.py,yocto_css.py,svg_transform.py}
%build
%python_build
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/scour
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python testscour.py
%post
%python_install_alternative scour
%postun
%python_uninstall_alternative scour
%files %{python_files}
%defattr(-,root,root)
%license LICENSE
%doc *.md
%python_alternative %{_bindir}/scour
%{python_sitelib}/scour/
%{python_sitelib}/scour-*.egg-info
%changelog