%global pypi_name importlib_resources %global __python3 /usr/bin/python3.11 %global python3_pkgversion 3.11 %global desc \ importlib_resources is a backport of Python 3.7's standard library\ importlib.resources module for 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. Name: python-importlib-resources Version: 1.0.2 Release: 2%{?dist} Summary: Read resources from Python packages License: ASL 2.0 URL: https://importlib-resources.readthedocs.io/ Source0: %pypi_source Patch0001: 0001-raise-NotImplementedError-on-Python-2.patch BuildArch: noarch BuildRequires: python%{python3_pkgversion}-devel python%{python3_pkgversion}-setuptools # BuildRequires: python3dist(sphinx) BuildRequires: python%{python3_pkgversion}dist(wheel) %description %{desc} %package -n python%{python3_pkgversion}-importlib-resources Summary: %{summary} %{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}} %description -n python%{python3_pkgversion}-importlib-resources %{desc} # %%package doc # Summary: importlib_resources documentation # %%description doc # Documentation for importlib_resources %prep %autosetup -p1 -n %{pypi_name}-%{version} # Remove bundled egg-info rm -rf %{pypi_name}.egg-info %build %py3_build # generate html docs #PYTHONPATH=${PWD} sphinx-build-3 importlib_resources/docs html # remove the sphinx-build leftovers #rm -rf html/.{doctrees,buildinfo} %install %py3_install # Don't ship docs sources or tests rm -r %{buildroot}/%{python3_sitelib}/%{pypi_name}/{docs,tests}/ # %%check # %%{__python3} setup.py test %files -n python%{python3_pkgversion}-importlib-resources %license LICENSE %doc README.rst %{python3_sitelib}/%{pypi_name} %{python3_sitelib}/%{pypi_name}-%{version}-py3.11.egg-info # %%files doc # %%license LICENSE # %%doc html %changelog