From b913a30078712d9b18968cdd7e9bf1c2fc2de43a Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Mar 06 2022 04:05:46 +0000 Subject: Switch to latest Python macros --- diff --git a/python-jupyter-console.spec b/python-jupyter-console.spec index 042229e..bd1d917 100644 --- a/python-jupyter-console.spec +++ b/python-jupyter-console.spec @@ -28,7 +28,6 @@ Patch4: https://github.com/jupyter/jupyter_console/commit/7f2dc911b41df9 BuildArch: noarch BuildRequires: python3-devel -BuildRequires: python3dist(setuptools) >= 40.8 %description An IPython-like terminal frontend for Jupyter kernels in any language. @@ -37,17 +36,10 @@ An IPython-like terminal frontend for Jupyter kernels in any language. %package -n python3-%{srcname} Summary: %{summary} -BuildRequires: python3dist(jupyter-client) -BuildRequires: python3dist(ipython) -BuildRequires: python3dist(ipykernel) BuildRequires: python3dist(pillow) -BuildRequires: python3dist(prompt-toolkit) >= 2 -BuildRequires: python3dist(pygments) BuildRequires: python3dist(pytest) BuildRequires: python3dist(pyzmq) -%{?python_enable_dependency_generator} - %description -n python3-%{srcname} An IPython-like terminal frontend for Jupyter kernels in any language. @@ -72,9 +64,11 @@ Documentation for jupyter-console # setuptools is used, but only implicitly through pip, not explicitly. sed -i 's/distutils.core/setuptools/g' setup.py +%generate_buildrequires +%pyproject_buildrequires -r %build -%py3_build +%pyproject_wheel # generate html docs %make_build -C docs html PYTHONPATH=${PWD}/build/lib @@ -82,10 +76,9 @@ mv docs/_build/html . # remove the sphinx-build leftovers rm -rf html/.{doctrees,buildinfo} - %install -%py3_install - +%pyproject_install +%pyproject_save_files %{srcname_} %check %{pytest} -ra @@ -95,13 +88,9 @@ export PATH=%{buildroot}%{_bindir}:$PATH export PYTHONPATH=%{buildroot}%{python3_sitelib} echo 'exit()' | jupyter-console --simple-prompt - -%files -n python3-%{srcname} +%files -n python3-%{srcname} -f %{pyproject_files} %doc README.md -%license COPYING.md %{_bindir}/%{srcname} -%{python3_sitelib}/%{srcname_}/ -%{python3_sitelib}/%{srcname_}-%{version}-py*.egg-info/ %files -n python-%{srcname}-doc %doc html