%define scl rh-python36 %{?scl:%scl_package %{name}} %{!?scl:%global pkg_name %{name}} %define name GitPython %define version 3.1.0 %define unmangled_version 3.1.0 %define unmangled_version 3.1.0 %define release 1 Summary: Python Git Library %{?scl:Requires: %{scl}-runtime} %{?scl:BuildRequires: %{scl}-runtime} Name: %{?scl_prefix}GitPython Version: %{version} Release: %{release} Source0: GitPython-%{unmangled_version}.tar.gz License: BSD License Group: Development/Libraries BuildRoot: %{_tmppath}/GitPython-%{version}-%{release}-buildroot Prefix: %{_prefix} BuildArch: noarch Vendor: Sebastian Thiel, Michael Trier Packager: Martin Juhl Url: https://github.com/gitpython-developers/GitPython %description GitPython is a python library used to interact with Git repositories %prep %{?scl:scl enable %{scl} - << \EOF} set -ex %setup -n GitPython-%{unmangled_version} -n GitPython-%{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)