#4 Update to 6.1.7
Merged 3 years ago by thrnciar. Opened 3 years ago by thrnciar.
rpms/ thrnciar/python-jupyter-client update-to-6.1.7  into  master

file modified
+19 -28
@@ -2,8 +2,8 @@ 

  %global pypi_name_dash jupyter-client

  

  Name:           python-%{pypi_name_dash}

- Version:        6.1.5

- Release:        2%{?dist}

+ Version:        6.1.7

+ Release:        1%{?dist}

  Summary:        Jupyter protocol implementation and client libraries

  

  License:        BSD
@@ -12,33 +12,14 @@ 

  

  BuildArch:      noarch

  

- BuildRequires:  python3-setuptools

  BuildRequires:  python3-devel

+ BuildRequires:  pyproject-rpm-macros

  

  %bcond_without doc

  %bcond_without tests

  

- %if %{with doc}

- BuildRequires:  python3-sphinx

- BuildRequires:  python3-sphinx_rtd_theme

- BuildRequires:  python3-sphinxcontrib-napoleon

- BuildRequires:  python3-sphinxcontrib-github-alt

- 

- BuildRequires:  python3-dateutil

- BuildRequires:  python3-ipython-doc

- BuildRequires:  python3-traitlets

- BuildRequires:  python3-ipykernel

- BuildRequires:  python3-jupyter-core

- BuildRequires:  python3-zmq

- %endif

- 

  %if %{with tests}

- BuildRequires:  python3-dateutil

- BuildRequires:  python3-ipykernel

- BuildRequires:  python3-ipython

- BuildRequires:  python3-jupyter-core >= 4.6

- BuildRequires:  python3-pytest

- BuildRequires:  python3-tornado

+ # The zmq tests are split in RPM only, the dependency is not tracked on Python level:

  BuildRequires:  python3-zmq-tests

  %endif

  
@@ -66,6 +47,10 @@ 

  %if %{with doc}

  %package -n python-%{pypi_name_dash}-doc

  Summary:        Documentation of the Jupyter protocol reference implementation

+ BuildRequires:  python3-sphinx

+ BuildRequires:  python3-sphinx_rtd_theme

+ BuildRequires:  python3-sphinxcontrib-github-alt

+ 

  %description -n python-%{pypi_name_dash}-doc

  Documentation of the reference implementation of the Jupyter protocol

  %endif
@@ -79,8 +64,12 @@ 

  %endif

  

  

+ %generate_buildrequires

+ %pyproject_buildrequires %{?with_tests:-x test}

+ 

+ 

  %build

- %py3_build

+ %pyproject_wheel

  

  %if %{with doc}

  PYTHONPATH=build/lib/ sphinx-build-3 docs html
@@ -90,7 +79,8 @@ 

  

  

  %install

- %py3_install

+ %pyproject_install

+ %pyproject_save_files %{pypi_name}

  

  

  %if %{with tests}
@@ -103,14 +93,12 @@ 

  

  %global _docdir_fmt %{name}

  

- %files -n python3-%{pypi_name_dash}

+ %files -n python3-%{pypi_name_dash} -f %{pyproject_files}

  %doc README.md

  %license COPYING.md

  %{_bindir}/jupyter-kernel

  %{_bindir}/jupyter-kernelspec

  %{_bindir}/jupyter-run

- %{python3_sitelib}/%{pypi_name}-%{version}-py?.*.egg-info/

- %{python3_sitelib}/%{pypi_name}/

  

  %if %{with doc}

  %files -n python-%{pypi_name_dash}-doc
@@ -118,6 +106,9 @@ 

  %endif

  

  %changelog

+ * Thu Sep 17 2020 Tomas Hrnciar <thrnciar@redhat.com> - 6.1.7-1

+ - Update to 6.1.7 (#1868821)

+ 

  * Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 6.1.5-2

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

  

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (jupyter_client-6.1.5.tar.gz) = b289b07f1300a7aa541b15ece33340fde7dd9765a200214668ad3a124ec7fd98c742f61417c9d31d6daff9ecc1aaaca6ec516f359cc26007731c0f8d859a73a9

+ SHA512 (jupyter_client-6.1.7.tar.gz) = 154734e75b26ac2db2a724aa40dd4f4bb7599f8a55dad03bbe09e3f29dd224d4cdf566b479661d20e3c13d79c062bc545ab709eab6fe645eff86a4c23c619d14

ImportError while importing test module '/builddir/build/BUILD/jupyter_client-6.1.7/jupyter_client/tests/test_kernelmanager.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
jupyter_client/tests/test_kernelmanager.py:17: in <module>
    from async_generator import async_generator, yield_
E   ModuleNotFoundError: No module named 'async_generator'

I'll update specfile with async_generator dependency.

The bconds are gone now and so is the doc build. That is not entirely good.

  1. This package needs to be bootstrapped (build without tests and docs first, then the dependencies are built, then this again with tests and docs).
  2. Other packages (Build)Require python-jupyter-client-doc.

rebased onto e0007dc

3 years ago

rebased onto 90347c4

3 years ago

rebased onto 2a982ab

3 years ago

@churchyard, PTAL. I wasn't sure where to put this BuildRequire. Since there is no package for tests I put it here.

It doesn't really matter "where" you put this, here is fine, but please make sure to:

  • conditionalize on %{with tests}
  • add a comment that explains why this is needed (something like: the tests are split in RPM only, the dependency si not tracked on Python level)

BuildRequires: python3-setuptools should be removed (it is brought in by %pyproject_buildrequires if needed).

python-sphinx_rtd_theme -> python3-sphinx_rtd_theme, the same with python-sphinxcontrib-github-alt

+ Requires:  python-%{pypi_name_dash}-doc

Why was this added?

Please only use -x test when %{with tests}, for example:

%pyproject_buildrequires %{?with_tests:-t}

This should be part of the %prep section, not %generate_buildrequires.

+ Requires: python-%{pypi_name_dash}-doc

Why was this added?

I thought that it's needed for 2nd build with tests and docs.

The bconds are gone now and so is the doc build. That is not entirely good.

  1. This package needs to be bootstrapped (build without tests and docs first, then the dependencies are built, then this again with tests and docs).
  2. Other packages (Build)Require python-jupyter-client-doc.

rebased onto f178a67

3 years ago

I thought that it's needed for 2nd build with tests and docs.

The need for 2 builds is "bootstrapping" -- it is not possible to build python-jupyter-client with doc+tests before other packages that (build)require python3-jupyter-client are rebuilt. That creates a build dependency loop that is often described as "dependency hell": You need to build A in order to build B, but you need B to build A.

So we first build this package without doc+tests in order to have (an untested) build of python3-jupyter-client available for other packages. Once all the (Build)Requires of python-jupyter-client are built, we enable doc and tests and build the package again.

In either case, the python3-jupyter-client package should not require python-jupyter-client-doc:

  1. When built without doc, there is no python-jupyter-client-doc and python3-jupyter-client would fail to install.
  2. When built with doc, the package would install, but the dependency would be redundant (the package does not require its documentation in order to function).

Thank you for the thorough explanation. PR is now updated with all of your suggestions.

# The tests are split in RPM only, the dependency si not tracked on Python level.

The comment would IMHO be more understandable when inside the %if section, so it is clear that it belongs to python3-zmq-tests.

Also, I have made a typo when suggesting the comment (si).

Oh. The bcond definition (%bcond_without tests) needs to be located before %if %{with tests} is used.

rebased onto 1e7b283

3 years ago

I've changed the order and fixed the comment.

rebased onto 72ed0b9

3 years ago

Pull-Request has been merged by thrnciar

3 years ago