%define scl rh-python36 %{?scl:%scl_package %{name}} %{!?scl:%global pkg_name %{name}} %define name extras %define version 1.0.0 %define unmangled_version 1.0.0 %define unmangled_version 1.0.0 %define release 1 Summary: Useful extra bits for Python - things that shold be in the standard library %{?scl:Requires: %{scl}-runtime} %{?scl:BuildRequires: %{scl}-runtime} Name: %{?scl_prefix}extras Version: %{version} Release: %{release} Source0: extras-%{unmangled_version}.tar.gz License: UNKNOWN Group: Development/Libraries BuildRoot: %{_tmppath}/extras-%{version}-%{release}-buildroot Prefix: %{_prefix} BuildArch: noarch Vendor: Testing cabal Packager: Martin Juhl Url: https://github.com/testing-cabal/extras %description ====== extras ====== extras is a set of extensions to the Python standard library, originally written to make the code within testtools cleaner, but now split out for general use outside of a testing context. Documentation ------------- pydoc extras is your friend. extras currently contains the following functions: * try_import * try_imports * safe_hasattr Which do what their name suggests. Licensing --------- This project is distributed under the MIT license and copyright is owned by the extras authors. See LICENSE for details. Required Dependencies --------------------- * Python 2.6+ or 3.0+ Bug reports and patches ----------------------- Please report bugs using github issues at . Patches can also be submitted via github. You can mail the authors directly via the mailing list testtools-dev@lists.launchpad.net. (Note that Launchpad discards email from unknown addresses - be sure to sign up for a Launchpad account before mailing the list, or your mail will be silently discarded). History ------- extras used to be testtools.helpers, and was factored out when folk wanted to use it separately. Thanks ------ * Martin Pool %prep %{?scl:scl enable %{scl} - << \EOF} set -ex %setup -n extras-%{unmangled_version} -n extras-%{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)