diff --git a/python-msal.spec b/python-msal.spec index 8d7d1fc..c2af995 100644 --- a/python-msal.spec +++ b/python-msal.spec @@ -37,27 +37,38 @@ protocols.} %package -n python3-%{srcname} Summary: %{summary} -%description -n python3-%{srcname} %{_description} +# setup.cfg: install_requires +BuildRequires: (python3dist(requests) >= 2 with python3dist(requests) < 3) +BuildRequires: (python3dist(pyjwt) >= 1 with python3dist(pyjwt) < 3) +# The above dependency is PyJWT[crypto], but EPEL8 does not have extras +# metapackages; the extra depends on cryptography >= 1.4, which tightents this +# package’s own dependency on cryptography>=0.6,<44. See: +# https://github.com/jpadilla/pyjwt/blob/285afade1d14eb810615c5bc751ea2c6a7a3314a/setup.py#L74. +BuildRequires: (python3dist(cryptography) >= 1.4 with python3dist(cryptography) < 44) -%pyproject_extras_subpkg -n python3-%{srcname} broker +# setup.cfg: options.extras_require.broker +# Not packaged for EPEL8: +# BuildRequires: (python3dist(pymsalruntime) >= 0.13.2 with python3dist(pymsalruntime) < 0.14) +%if %{with tests} +# Not strictly required, but a convenient test runner +BuildRequires: python3dist(pytest) +%endif -%prep -%forgeautosetup -p1 +%description -n python3-%{srcname} %{_description} -%generate_buildrequires -%pyproject_buildrequires -r +%prep +%forgeautosetup -p1 %build -%pyproject_wheel +%py3_build %install -%pyproject_install -%pyproject_save_files msal +%py3_install %if %{with tests} @@ -66,9 +77,13 @@ Summary: %{summary} %endif -%files -n python3-%{srcname} -f %{pyproject_files} +%files -n python3-%{srcname} +%license LICENSE %doc README.md +%{python3_sitelib}/%{srcname}/ +%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info/ + %changelog %autochangelog