45b56b1
Name:		python-makefun
300923a
Version:	1.15.2
9102bee
Release:	%autorelease
45b56b1
Summary:	Dynamically create python functions with a proper signature
45b56b1
45b56b1
License:	BSD
45b56b1
URL:		https://pypi.org/project/makefun
45b56b1
Source0:	%{pypi_source makefun}
45b56b1
45b56b1
BuildArch:	noarch
45b56b1
BuildRequires:	pyproject-rpm-macros
45b56b1
45b56b1
%global _description \
45b56b1
%summary.
45b56b1
45b56b1
%description %_description
45b56b1
45b56b1
%package -n python3-makefun
45b56b1
Summary: %{summary}
45b56b1
%{?python_provide:%python_provide python3-makefun}
45b56b1
45b56b1
%description -n python3-makefun %_description
45b56b1
45b56b1
%prep
45b56b1
%autosetup -n makefun-%{version}
45b56b1
45b56b1
cat >pyproject.toml <
45b56b1
[build-system]
45b56b1
requires = ["pytest-runner", "setuptools_scm", "pypandoc", "six", "wheel"]
45b56b1
build-backend = "setuptools.build_meta"
45b56b1
EOF
45b56b1
45b56b1
sed -r -i "s/'pandoc', //" setup.py
45b56b1
45b56b1
%generate_buildrequires
45b56b1
%pyproject_buildrequires
45b56b1
45b56b1
%build
45b56b1
%pyproject_wheel
45b56b1
45b56b1
%install
45b56b1
%pyproject_install
45b56b1
45b56b1
%check
45b56b1
# Tests require pytest-cases, which requires this package. Yay!
0bedb53
PYTHONPATH=%{buildroot}/%{python3_sitelib} \
0bedb53
    %python3 -m pytest -v
45b56b1
45b56b1
%files -n python3-makefun
45b56b1
%license LICENSE
45b56b1
%doc README.md
45b56b1
%{python3_sitelib}/makefun/
45b56b1
%{python3_sitelib}/makefun-%{version}.dist-info/
45b56b1
45b56b1
%changelog
9102bee
%autochangelog