commit 9c5e15e3c7e9a7ce723cb945c042c3a125e2a3fff134bce0a195028b448293e6 Author: Matej Cepl Date: Mon Dec 27 20:17:51 2021 +0000 Accepting request 942330 from home:jayvdb:py-submit New dependency of easy-thumbnails OBS-URL: https://build.opensuse.org/request/show/942330 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-svglib?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/python-svglib.changes b/python-svglib.changes new file mode 100644 index 0000000..f587597 --- /dev/null +++ b/python-svglib.changes @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Fri Dec 24 06:15:20 UTC 2021 - John Vandenberg + +- Initial package for v1.1.0 + diff --git a/python-svglib.spec b/python-svglib.spec new file mode 100644 index 0000000..db434aa --- /dev/null +++ b/python-svglib.spec @@ -0,0 +1,79 @@ +# +# spec file for package python-svglib +# +# Copyright (c) 2021 SUSE LLC +# +# 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-%{**}} +%define skip_python2 1 +Name: python-svglib +Version: 1.1.0 +Release: 0 +Summary: Python library for reading and converting SVG +License: LGPL-3.0-only +URL: https://github.com/deeplook/svglib +Source: https://files.pythonhosted.org/packages/source/s/svglib/svglib-%{version}.tar.gz +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-reportlab +Requires(post): update-alternatives +Requires(postun): update-alternatives +BuildArch: noarch +# SECTION test requirements +BuildRequires: %{python_module cssselect2 >= 0.2.0} +BuildRequires: %{python_module lxml} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module reportlab} +BuildRequires: %{python_module tinycss2 >= 0.6.0} +BuildRequires: yudit +# /SECTION +%python_subpackages + +%description +Pure Python library for reading and converting SVG. + +%prep +%setup -q -n svglib-%{version} +# Remove hashbang +sed -i '1{/^#!/d}' svglib/svglib.py + +%build +%python_build + +%install +%python_install +%{python_clone -a %{buildroot}%{_bindir}/svg2pdf} +%{python_clone -a %{buildroot}%{_mandir}/man1/svg2pdf.1} +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +# Skip several tests needing files from internet +%pytest -rs -k 'not (TestWikipediaFlags or TestOtherFiles or (TestW3CSVG and test_convert_pdf_png))' + +%post +%{python_install_alternative svg2pdf svg2pdf.1%{ext_man}} + +%postun +%python_uninstall_alternative svg2pdf + +%files %{python_files} +%doc CHANGELOG.rst README.rst +%license LICENSE.txt +%python_alternative %{_bindir}/svg2pdf +%python_alternative %{_mandir}/man1/svg2pdf.1%{ext_man} +%{python_sitelib}/svglib*/ + +%changelog diff --git a/svglib-1.1.0.tar.gz b/svglib-1.1.0.tar.gz new file mode 100644 index 0000000..a460c01 --- /dev/null +++ b/svglib-1.1.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:520ee5290ee2ebeebd20ca0d7d995c08c903b364fcf515826bab43a1288d422e +size 2041441