%define scl rh-python36 %{?scl:%scl_package %{name}} %{!?scl:%global pkg_name %{name}} %define name gitdb %define version 4.0.2 %define unmangled_version 4.0.2 %define unmangled_version 4.0.2 %define release 1 Summary: Git Object Database %{?scl:Requires: %{scl}-runtime} %{?scl:BuildRequires: %{scl}-runtime} Name: %{?scl_prefix}gitdb Version: %{version} Release: %{release} Source0: gitdb-%{unmangled_version}.tar.gz License: BSD License Group: Development/Libraries BuildRoot: %{_tmppath}/gitdb-%{version}-%{release}-buildroot Prefix: %{_prefix} BuildArch: noarch Vendor: Sebastian Thiel Packager: Martin Juhl Url: https://github.com/gitpython-developers/gitdb %description GitDB is a pure-Python git object database %prep %{?scl:scl enable %{scl} - << \EOF} set -ex %setup -n gitdb-%{unmangled_version} -n gitdb-%{unmangled_version} %{?scl:EOF} %build %{?scl:scl enable %{scl} - << \EOF} set -ex python3 setup.py build %{?scl:EOF} %install %{?scl:scl enable %{scl} - << \EOF} set -ex python3 setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES %{?scl:EOF} %clean %{?scl:scl enable %{scl} - << \EOF} set -ex rm -rf $RPM_BUILD_ROOT %{?scl:EOF} %files -f INSTALLED_FILES %defattr(-,root,root)