%global srcname svg2tikz %global forgeurl https://github.com/xyz2tex/svg2tikz Version: 2.1.0 %global tag v%{version} %forgemeta Name: python-%{srcname} Release: 1%{?dist} Summary: Convert SVG to TikZ/PGF code License: GPL-2.0-or-later URL: %{forgeurl} Source0: %{forgesource} BuildRequires: python3-devel BuildRequires: gobject-introspection-devel Requires: xclip BuildArch: noarch %global _description %{expand: SVG2TikZ, formally known as Inkscape2TikZ, are a set of tools for converting SVG graphics to TikZ/PGF code.} %description %_description %package -n python3-%{srcname} Summary: %{summary} %description -n python3-%{srcname} %_description %prep %forgeautosetup %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files %{srcname} # Shebang fix sed -i /env\ python/d %{buildroot}%{python3_sitelib}/svg2tikz/__init__.py sed -i /env\ python/d %{buildroot}%{python3_sitelib}/svg2tikz/extensions/__init__.py # Executable fix sed -i /env\ python/d %{buildroot}%{python3_sitelib}/svg2tikz/extensions/tikz_export.py %check %{py3_test_envvars} %{python3} -m unittest %files -n python3-%{srcname} -f %{pyproject_files} %doc README.md %doc CHANGELOG.md # Poetry does not mark license files # https://github.com/python-poetry/poetry/issues/1350 %license %{python3_sitelib}/svg2tikz-2.1.0.dist-info/LICENSE %changelog * Thu Sep 07 2023 Benson Muite - 2.1.0-1 - Initial packaging