diff --git a/0001-Skip-test-that-needs-internet-connection.patch b/0001-Skip-test-that-needs-internet-connection.patch new file mode 100644 index 0000000000000000000000000000000000000000..67a17289ff6072336ae187ec0aa3ddb0ddab2fd9 --- /dev/null +++ b/0001-Skip-test-that-needs-internet-connection.patch @@ -0,0 +1,24 @@ +From c14947308ff6851cbbbad098e9758f6baf06dc0a Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Fri, 28 Jun 2019 11:18:26 +0200 +Subject: [PATCH] Skip test that needs internet connection + +--- + tests/test_style.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tests/test_style.py b/tests/test_style.py +index 1480d0c..b16cc36 100644 +--- a/tests/test_style.py ++++ b/tests/test_style.py +@@ -55,6 +55,7 @@ class TestScript(unittest.TestCase): + self.assertEqual(result, "https://fonts.gstatic.com/s/indieflower/v9/m8JVjfNVeKWVnh3QMuKkFcZVaUuH.woff2") + + def test_embed_google_web_font(self): ++ self.skipTest("Internet connection is not available in Koji") + dwg = Drawing() + dwg.embed_google_web_font(name="Indie Flower", uri="http://fonts.googleapis.com/css?family=Indie+Flower") + style = dwg.defs.elements[0] +-- +2.20.1 + diff --git a/LICENSE.TXT b/LICENSE.TXT new file mode 100644 index 0000000000000000000000000000000000000000..836ed0b78c12593cdf3435722635b9256ca3d67f --- /dev/null +++ b/LICENSE.TXT @@ -0,0 +1,45 @@ +Copyright (c) 2012, Manfred Moitzi + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Deutsche Übersetzung: + +Copyright (c) 2012, Manfred Moitzi + +Hiermit wird unentgeltlich, jeder Person, die eine Kopie der Software +und der zugehörigen Dokumentationen (die "Software") erhält, die +Erlaubnis erteilt, uneingeschränkt zu benutzen, inklusive und ohne +Ausnahme, dem Recht, sie zu verwenden, kopieren, ändern, fusionieren, +verlegen, verbreiten, unterlizenzieren und/oder zu verkaufen, und +Personen, die diese Software erhalten, diese Rechte zu geben, unter den +folgenden Bedingungen: + +Der obige Urheberrechtsvermerk und dieser Erlaubnisvermerk sind in allen +Kopien oder Teilkopien der Software beizulegen. + +DIE SOFTWARE WIRD OHNE JEDE AUSDRÜCKLICHE ODER IMPLIZIERTE GARANTIE +BEREITGESTELLT, EINSCHLIESSLICH DER GARANTIE ZUR BENUTZUNG FÜR DEN +VORGESEHENEN ODER EINEM BESTIMMTEN ZWECK SOWIE JEGLICHER +RECHTSVERLETZUNG, JEDOCH NICHT DARAUF BESCHRÄNKT. IN KEINEM FALL SIND +DIE AUTOREN ODER COPYRIGHTINHABER FÜR JEGLICHEN SCHADEN ODER SONSTIGE +ANSPRÜCHE HAFTBAR ZU MACHEN, OB INFOLGE DER ERFÜLLUNG EINES VERTRAGES, +EINES DELIKTES ODER ANDERS IM ZUSAMMENHANG MIT DER SOFTWARE ODER +SONSTIGER VERWENDUNG DER SOFTWARE ENTSTANDEN. + diff --git a/python-svgwrite.spec b/python-svgwrite.spec new file mode 100644 index 0000000000000000000000000000000000000000..2abd3dbd27057bdf0d030e0ea8d67132fc27cd26 --- /dev/null +++ b/python-svgwrite.spec @@ -0,0 +1,59 @@ +%global pypi_name svgwrite + +Name: python-%{pypi_name} +Version: 1.4.1 +Release: 1 +Summary: Python library to create SVG drawings + +License: MIT +URL: https://github.com/mozman/svgwrite +Source0: %{pypi_name}-%{version}.tar.gz +Patch0: 0001-Skip-test-that-needs-internet-connection.patch + +BuildArch: noarch + +%description +Python library to create SVG drawings. + +%package -n python3-%{pypi_name} +Summary: Python 3 library to create SVG drawings +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pyparsing +BuildRequires: python3-pytest +Requires: python3-setuptools +Requires: python3-pyparsing +%{?python_provide:%python_provide python3-%{pypi_name}} + +%description -n python3-%{pypi_name} +Python 3 library to create SVG drawings. + +%prep +%autosetup -n %{pypi_name}-%{version} -p1 + +%build +%py3_build + + +%install +%py3_install +# Remove shebang +for lib in %{buildroot}%{python3_sitelib}/%{pypi_name}/{,*/}/*.py; do + sed '1{\@^#!/usr/bin/env python@d}' $lib > $lib.new && + touch -r $lib $lib.new && + mv $lib.new $lib +done + +%check +%{__python3} -m unittest discover -s tests + +%files -n python3-%{pypi_name} +%license LICENSE.TXT +%doc NEWS.rst README.rst +%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info +%{python3_sitelib}/%{pypi_name}/ + + +%changelog +* Fri Jun 25 2021 liufeng - 1.4.1-1 +- Package Init diff --git a/svgwrite-1.4.1.tar.gz b/svgwrite-1.4.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..5075af62d4c662e123356a47e2fad673d52c2bbb Binary files /dev/null and b/svgwrite-1.4.1.tar.gz differ