%global pkgvers 0 %global scdate0 20240320 %global schash0 52c93d1dedd056a3403a9422d3909124603fb4ef %global branch0 development %global source0 https://github.com/UCSBarchlab/PyRTL.git %global sshort0 %{expand:%%{lua:print(('%{schash0}'):sub(1,8))}} %define with_doc 0 Name: pyrtl Version: 0.10.1 Release: %{scdate0}.%{pkgvers}.git%{sshort0}%{?dist} Summary: A collection of classes for pythonic register-transfer level License: Python BuildArch: noarch URL: https://ucsbarchlab.github.io/PyRTL BuildRequires: git make python3 python3-rpm-macros python3-setuptools %if ! (0%{?rhel} == 9) BuildRequires: python3-pytest python3-nose python3-pyparsing %endif %if %{with_doc} %if 0%{?fedora} BuildRequires: graphviz python3-sphinx python3-sphinx-hoverxref python3-sphinx_rtd_theme BuildRequires: config(latexmk) tex(tex) tex(latex) tex(fncychap.sty) tex(wrapfig.sty) BuildRequires: tex(capt-of.sty) tex(framed.sty) tex(upquote.sty) tex(needspace.sty) BuildRequires: tex(tabulary.sty) tex(tgtermes.sty) %endif %endif %description PyRTL provides a collection of classes for pythonic register-transfer level design, simulation, tracing, and testing suitable for teaching and research. %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 %if 0%{?rhel} %if "%{_arch}" == "ppc64le" || "%{_arch}" == "aarch64" sed -i "s|'-m64',||g" pyrtl/compilesim.py sed -i "s|'-march=native',||g" pyrtl/compilesim.py %endif %endif sed -i "s|'python'|'python3'|" tests/test_examples.py %py3_build %if %{with_doc} pushd docs %if 0%{?fedora} make html make latexpdf %endif popd %endif %install %py3_install rm -rf %{buildroot}/%{python3_sitelib}/tests %check %if 0%{?fedora} || "%{_arch}" == "x86_64" export PYTHONPATH=%{buildroot}%{python3_sitelib} python3 -m pytest -vv tests || true %endif %files %doc README.md %license LICENSE.md %if %{with_doc} %if 0%{?fedora} %doc docs/_build/html %doc docs/_build/latex/pyrtl.pdf %else %doc docs %endif %endif %{python3_sitelib}/* %changelog * Fri Feb 21 2020 Cristian Balint - update github releases