forked from pool/python-svgwrite
- Convert to pip-based build
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-svgwrite?expand=0&rev=23
This commit is contained in:
67
python-svgwrite.spec
Normal file
67
python-svgwrite.spec
Normal file
@@ -0,0 +1,67 @@
|
||||
#
|
||||
# spec file for package python-svgwrite
|
||||
#
|
||||
# Copyright (c) 2025 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/
|
||||
#
|
||||
|
||||
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-svgwrite
|
||||
Version: 1.4.3
|
||||
Release: 0
|
||||
Summary: Python module for creating SVG drawings
|
||||
License: MIT
|
||||
URL: https://github.com/mozman/svgwrite
|
||||
Source: https://files.pythonhosted.org/packages/source/s/svgwrite/svgwrite-%{version}.zip
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: unzip
|
||||
Requires: python-pyparsing >= 2.0.1
|
||||
BuildArch: noarch
|
||||
# SECTION test requirements
|
||||
BuildRequires: %{python_module pyparsing >= 2.0.1}
|
||||
BuildRequires: %{python_module pytest}
|
||||
# /SECTION
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
A Python library to create SVG drawings.
|
||||
|
||||
%prep
|
||||
%setup -q -n svgwrite-%{version}
|
||||
find svgwrite -name "*.py" -exec sed -i -e '/^#!\//, 1d' {} \; -exec sed -i 's/\r$//' {} \;
|
||||
sed -i 's/\r$//' LICENSE.TXT NEWS.rst README.rst
|
||||
|
||||
%build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%pyproject_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
# test_embed_google_web_font - asks google for data
|
||||
# test_pretty_print - fails on python 3.8 because xml output is now ordering tags
|
||||
%pytest -k 'not test_embed_google_web_font and not test_pretty_print'
|
||||
|
||||
%files %{python_files}
|
||||
%doc NEWS.rst README.rst
|
||||
%license LICENSE.TXT
|
||||
%{python_sitelib}/svgwrite
|
||||
%{python_sitelib}/svgwrite-%{version}*-info
|
||||
|
||||
%changelog
|
||||
Reference in New Issue
Block a user