%define scl rh-python36 %{?scl:%scl_package %{name}} %{!?scl:%global pkg_name %{name}} %define name XStatic %define version 1.0.2 %define unmangled_version 1.0.2 %define unmangled_version 1.0.2 %define release 1 Summary: XStatic base package with minimal support code %{?scl:Requires: %{scl}-runtime} %{?scl:BuildRequires: %{scl}-runtime} Name: %{?scl_prefix}XStatic Version: %{version} Release: %{release} Source0: XStatic-%{unmangled_version}.tar.gz License: MIT license Group: Development/Libraries BuildRoot: %{_tmppath}/XStatic-%{version}-%{release}-buildroot Prefix: %{_prefix} BuildArch: noarch Vendor: Thomas Waldmann Packager: Martin Juhl Url: https://github.com/xstatic-py/xstatic %description XStatic ------- The goal of XStatic family of packages is to provide static file packages with minimal overhead - without selling you some dependencies you don't want. XStatic has some minimal support code for working with the XStatic-* packages. Docs: https://xstatic.readthedocs.io/ Repository: https://github.com/xstatic-py/xstatic (base package) Find more stuff already packaged as xstatic package there: https://github.com/xstatic-py/ https://pypi.org/search/?q=xstatic Licenses: * MIT license (for XStatic code) * same license as packaged file (for static file packages) %prep %{?scl:scl enable %{scl} - << \EOF} set -ex %setup -n XStatic-%{unmangled_version} -n XStatic-%{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)