%define scl rh-python36 %{?scl:%scl_package %{name}} %{!?scl:%global pkg_name %{name}} %define name importlib_resources %define version 1.0.2 %define unmangled_version 1.0.2 %define unmangled_version 1.0.2 %define release 1 Summary: Read resources from Python packages %{?scl:Requires: %{scl}-runtime} %{?scl:BuildRequires: %{scl}-runtime} Name: %{?scl_prefix}importlib_resources Version: %{version} Release: %{release} Source0: importlib_resources-%{unmangled_version}.tar.gz License: Apache Software License Group: Development/Libraries BuildRoot: %{_tmppath}/importlib_resources-%{version}-%{release}-buildroot Prefix: %{_prefix} BuildArch: noarch Vendor: Barry Warsaw Packager: Martin Juhl Url: http://importlib-resources.readthedocs.io/ %description ========================= ``importlib_resources`` ========================= ``importlib_resources`` is a backport of Python 3.7's standard library `importlib.resources `_ module for Python 2.7, and 3.4 through 3.6. Users of Python 3.7 and beyond should use the standard library module, since for these versions, ``importlib_resources`` just delegates to that module. The key goal of this module is to replace parts of `pkg_resources `_ with a solution in Python's stdlib that relies on well-defined APIs. This makes reading resources included in packages easier, with more stable and consistent semantics. Note that ``pip 10`` is required if you are going to ``pip install importlib_resources``. Project details =============== * Project home: https://gitlab.com/python-devs/importlib_resources * Report bugs at: https://gitlab.com/python-devs/importlib_resources/issues * Code hosting: https://gitlab.com/python-devs/importlib_resources.git * Documentation: http://importlib_resources.readthedocs.io/ %prep %{?scl:scl enable %{scl} - << \EOF} set -ex %setup -n importlib_resources-%{unmangled_version} -n importlib_resources-%{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)