# Created by pyp2rpm-3.3.2 %global pypi_name jaraco_functools %global pkg_name jaraco-functools # Fedora doesn't have all the docs deps yet %bcond_with docs Name: python-%{pkg_name} Version: 4.0.2 Release: %autorelease Summary: Functools like those found in stdlib License: MIT URL: https://github.com/jaraco/jaraco.functools Source0: %{pypi_source %{pypi_name}} BuildArch: noarch %description Functools like those found in stdlib %package -n python3-%{pkg_name} Summary: %{summary} # python3-jaraco is an RPM-only namespace package for jaraco.* # it does not exists on PyPI and does not provide python3dist(jaraco) # DO NOT change this dependency to python3dist(jaraco) or similar Requires: python3-jaraco BuildRequires: python3-devel BuildConflicts: python3dist(pytest) = 3.7.3 BuildRequires: python3dist(jaraco-classes) BuildRequires: python3dist(pip) >= 3.4 BuildRequires: python3dist(pytest) >= 3.4 BuildRequires: python3dist(setuptools) %{?python_provide:%python_provide python3-%{pkg_name}} %description -n python3-%{pkg_name} Functools like those found in stdlib %if %{with docs} %package -n python-%{pkg_name}-doc Summary: jaraco-functools documentation BuildRequires: python3dist(jaraco-packaging) >= 3.2 BuildRequires: python3dist(rst-linker) >= 1.9 BuildRequires: python3dist(sphinx) %description -n python-%{pkg_name}-doc Documentation for jaraco-functools %endif %prep %autosetup -n %{pypi_name}-%{version} %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %if %{with docs} # generate html docs PYTHONPATH=${PWD} sphinx-build docs html # remove the sphinx-build leftovers rm -rf html/.{doctrees,buildinfo} %endif %install %pyproject_install %check %pytest %files -n python3-%{pkg_name} %license LICENSE %doc README.rst %{python3_sitelib}/jaraco/functools* %{python3_sitelib}/jaraco.functools-%{version}.dist-info %if %{with docs} %files -n python-%{pkg_name}-doc %doc html %license LICENSE %endif %changelog %autochangelog