%global pkgvers 2 %global scdate0 20211209 %global schash0 6f8ba7fdbd359fe7972456dd69c18a9c49a50c0d %global branch0 main %global source0 https://github.com/octoml/synr.git %global sshort0 %{expand:%%{lua:print(('%{schash0}'):sub(1,8))}} Name: python-synr Version: 0.6.0 Release: %{scdate0}.%{pkgvers}.git%{sshort0}%{?dist} Summary: A stable AST for python License: BSD BuildArch: noarch URL: https://github.com/octoml/synr BuildRequires: git python3-devel python3-setuptools %description A stable AST for python %prep %setup -T -c -n %{name} find %{_builddir} -name SPECPARTS -exec rm -rf {} + git clone --depth 1 -n -b %{branch0} %{source0} . git fetch --depth 1 origin %{schash0} git reset --hard %{schash0} git log --format=fuller rm -rf tests cat < setup.py #!/usr/bin/env python import setuptools setuptools.setup(name="synr", version="%{version}", package_dir={"synr": "synr"}, packages=setuptools.find_packages(where=".")) EOF %build %py3_build %install %py3_install %files %license LICENSE %doc README.md %{python3_sitelib}/synr/ %{python3_sitelib}/synr-%{version}-py%{python3_version}.egg-info/ %changelog * Thu Jul 01 2021 Cristian Balint - github release updates