%global python3_pkgversion 3.11 # Sphinx-generated HTML documentation is not suitable for packaging; see # RHBZ#2006555 for discussion. Additionally, upstream uses the furo theme, # which we would have to patch; see RHBZ#1910798. # # We could, in theory, generate PDF documentation as a substitute, but this # would still require it requires %{py3_dist myst-parser}, which is not # currently packaged–and we are not willing to package it solely for this # purpose. Name: python%{python3_pkgversion}-editables-epel Version: 0.3 Release: %autorelease Summary: Editable installations # SPDX License: MIT URL: https://github.com/pfmoore/editables # PyPI source distributions lack tests; use the GitHub archive Source: %{url}/archive/%{version}/editables-%{version}.tar.gz BuildArch: noarch BuildRequires: python%{python3_pkgversion}-devel BuildRequires: %{py3_dist pip} BuildRequires: %{py3_dist setuptools} BuildRequires: %{py3_dist wheel} # Most of the dependencies, and all of the pytest options, in tox.ini are for # coverage analysis and for installation with pip/virtualenv. Rather than # working around all of these, it is simpler not to use tox for dependency # generation or testing. BuildRequires: %{py3_dist pytest} %global common_description %{expand: A Python library for creating “editable wheels” This library supports the building of wheels which, when installed, will expose packages in a local directory on sys.path in “editable mode”. In other words, changes to the package source will be reflected in the package visible to Python, without needing a reinstall.} %description %{common_description} %package -n python%{python3_pkgversion}-editables Summary: %{summary} %description -n python%{python3_pkgversion}-editables %{common_description} %prep %autosetup -n editables-%{version} %build %python3 -c 'from setuptools.build_meta import build_wheel; build_wheel("dist")' %install %py3_install_wheel editables-*-py3-none-any.whl DISTINFO=%{buildroot}%{python3_sitelib}/editables-%{version}.dist-info rm -rv "${DISTINFO}/RECORD" "${DISTINFO}/REQUESTED" echo rpm >"${DISTINFO}/INSTALLER" %check %pytest %files -n python%{python3_pkgversion}-editables %doc CHANGELOG.md %doc README.md %license LICENSE.txt %{python3_sitelib}/editables/ %{python3_sitelib}/editables-%{version}.dist-info/ %changelog %autochangelog