%global pkgvers 0 %global scdate0 20230310 %global schash0 c80b473a9173c5baf6d5dfc2a35723664398e6b2 %global branch0 master %global source0 https://bitbucket.org/cdelker/schemdraw.git %global sshort0 %{expand:%%{lua:print(('%{schash0}'):sub(1,8))}} Name: schemdraw Version: 0.15 Release: %{scdate0}.%{pkgvers}.git%{sshort0}%{?dist} Summary: Python high-quality electrical circuit schematic diagrams BuildArch: noarch License: BSD URL: https://schemdraw.readthedocs.io BuildRequires: git make python3 python3-rpm-generators python3-rpm-macros python3-setuptools %if 0%{?fedora} BuildRequires: python3-matplotlib BuildRequires: python3-sphinx python3-sphinx_rtd_theme python3-jupyter-sphinx BuildRequires: ImageMagick config(latexmk) tex(tex) tex(latex) tex(fncychap.sty) BuildRequires: tex(wrapfig.sty) tex(capt-of.sty) tex(framed.sty) tex(tgtermes.sty) BuildRequires: tex(upquote.sty) tex(needspace.sty) tex(tabulary.sty) %endif %description Python package for producing high-quality electrical circuit schematic diagrams. %prep %setup -T -c -n %{name} git clone --depth 1 -n -b %{branch0} %{source0} . git fetch --depth 1 origin %{schash0} git reset --hard %{schash0} git log --format=fuller %build find . -name '*.py' -exec sed -i '/from __future__ import annotations/d' {} + %py3_build %install %py3_install %if 0%{?fedora} pushd docs # build PDF export PYTHONPATH=%{buildroot}%{python3_sitelib} make latexpdf popd %endif %files %doc README.md %if 0%{?fedora} %doc docs/_build/latex/*.pdf %else %doc docs %endif %license LICENSE.txt %{python3_sitelib}/* %changelog * Mon Jan 06 2020 Cristian Balint - git update releases