Simplify the spec by not defining two separate %pypi_name macros

This commit is contained in:
Miro Hrončok 2022-01-25 14:50:03 +01:00
commit 03a5793d77

View file

@ -2,17 +2,14 @@
# to user locations are seen and properly loaded
%global py3_shebang_flags %nil
%global pypi_name jupyter_client
%global pypi_name_dash jupyter-client
Name: python-%{pypi_name_dash}
Name: python-jupyter-client
Version: 7.1.2
Release: 1%{?dist}
Summary: Jupyter protocol implementation and client libraries
License: BSD
URL: http://jupyter.org
Source0: %pypi_source
Source0: %{pypi_source jupyter_client}
BuildArch: noarch
@ -34,14 +31,14 @@ It also provides client and kernel management APIs for working with kernels.
It also provides the `jupyter kernelspec` entrypoint for installing kernelspecs
for use with Jupyter frontends.
%package -n python3-%{pypi_name_dash}
%package -n python3-jupyter-client
Summary: Jupyter protocol implementation and client libraries
%{?python_provide:%python_provide python3-%{pypi_name_dash}}
%{?python_provide:%python_provide python3-jupyter-client}
# It fallbacks to ifconfig without this, and ifconfig is deprecated
Recommends: python3-netifaces
%description -n python3-%{pypi_name_dash}
%description -n python3-jupyter-client
This package contains the reference implementation of the Jupyter protocol.
It also provides client and kernel management APIs for working with kernels.
@ -49,15 +46,15 @@ It also provides the `jupyter kernelspec` entrypoint for installing kernelspecs
for use with Jupyter frontends.
%if %{with doc}
%package -n python-%{pypi_name_dash}-doc
%package -n python-jupyter-client-doc
Summary: Documentation of the Jupyter protocol reference implementation
%description -n python-%{pypi_name_dash}-doc
%description -n python-jupyter-client-doc
Documentation of the reference implementation of the Jupyter protocol
%endif
%prep
%autosetup -p1 -n %{pypi_name}-%{version}
%autosetup -p1 -n jupyter_client-%{version}
%if %{with doc}
# Use local objects.inv for intersphinx:
@ -81,7 +78,7 @@ rm -r html/.{doctrees,buildinfo}
%install
%pyproject_install
%pyproject_save_files %{pypi_name}
%pyproject_save_files jupyter_client
%if %{with tests}
@ -95,7 +92,7 @@ rm -r html/.{doctrees,buildinfo}
%global _docdir_fmt %{name}
%files -n python3-%{pypi_name_dash} -f %{pyproject_files}
%files -n python3-jupyter-client -f %{pyproject_files}
%doc README.md
%license COPYING.md
%{_bindir}/jupyter-kernel
@ -103,7 +100,7 @@ rm -r html/.{doctrees,buildinfo}
%{_bindir}/jupyter-run
%if %{with doc}
%files -n python-%{pypi_name_dash}-doc
%files -n python-jupyter-client-doc
%doc html
%endif