Spec URL: https://tomspur.fedorapeople.org/review/python-jupyter-notebook/python-jupyter-notebook.spec SRPM URL: https://tomspur.fedorapeople.org/review/python-jupyter-notebook/python-jupyter-notebook-4.2.0-1.fc23.src.rpm Description: The Jupyter Notebook is a web application that allows you to create and share documents that contain live code, equations, visualizations, and explanatory text. The Notebook has support for multiple programming languages, sharing, and interactive widgets. Fedora Account System Username: tomspur This is the work in procress version of the python-jupyter-notebook as some dependencies need to be reviewed first and will be added to this ticket as dependency.
Should this package be named python-jupyter-notebook or simply python-notebook? On pypi it is also just named notebook: https://pypi.python.org/pypi/notebook
I think python-jupyter-notebook meshes better with python-jupyter-client and python-jupyter-core. Easier to see that those packages go together.
for info, here how I spitted the package in Mageia, like Debian did) http://svnweb.mageia.org/packages/cauldron/jupyter-notebook/current/SPECS/jupyter-notebook.spec?view=markup doc is not build yet, but should come later. I think that the patch is needed (came from Debian) : http://svnweb.mageia.org/packages/cauldron/ipython/current/SOURCES/0001-use-setuptools-also-for-the-install-target-so-the-py.patch?view=markup
BR: python-sphinx_rtd_theme Links in /bin/ should be updated similarly to python-jupyter-client. %license. Suggestion to use "%global _docdir_fmt %{name}". %description should be word wrapped to 80 columns. And since the description is longer than two sentences, it's nice to define a %_description and then use '%description [subpackage ] %_description' to avoid repeating the text.
This spec depends on python(3)-ipython-genutils, but the package is named python(3)-ipython_genutils.
Also depends on python(3)-nbconvert for which I see no package request yet.
(In reply to Elliott Sales de Andrade from comment #6) > Also depends on python(3)-nbconvert for which I see no package request yet. I have submitted a python-nbconvert review request but that depends on some other stuff which I have also submitted, https://bugzilla.redhat.com/show_bug.cgi?id=1379096 Added depends on.
(In reply to Mukundan Ragavan from comment #7) > (In reply to Elliott Sales de Andrade from comment #6) > > Also depends on python(3)-nbconvert for which I see no package request yet. > > I have submitted a python-nbconvert review request but that depends on some > other stuff which I have also submitted, Thanks!
Review update: (In reply to Zbigniew Jędrzejewski-Szmek from comment #4) > Links in /bin/ should be updated similarly to python-jupyter-client. Links are still reversed. It should be like this: mv %{buildroot}/%{_bindir}/jupyter-nbextension %{buildroot}/%{_bindir}/jupyter-nbextension-%{python3_version} ln -s jupyter-nbextension-%{python3_version} %{buildroot}/%{_bindir}/jupyter-nbextension-%{python3_pkgversion} mv %{buildroot}/%{_bindir}/jupyter-serverextension %{buildroot}/%{_bindir}/jupyter-serverextension-%{python3_version} ln -s jupyter-serverextension-%{python3_version} %{buildroot}/%{_bindir}/jupyter-serverextension-%{python3_pkgversion} mv %{buildroot}/%{_bindir}/jupyter-notebook %{buildroot}/%{_bindir}/jupyter-notebook-%{python3_version} ln -s jupyter-notebook-%{python3_version} %{buildroot}/%{_bindir}/jupyter-notebook-%{python3_pkgversion} and similarly for the python2 version. > %license. - If (and only if) the source package includes the text of the license(s) in its own file, then that file, containing the text of the license(s) for the package is included in %license. Note: License file COPYING.md is not marked as %license See: http://fedoraproject.org/wiki/Packaging/LicensingGuidelines#License_Text > Suggestion to use "%global _docdir_fmt %{name}". > > %description should be word wrapped to 80 columns. > And since the description is longer than two sentences, it's nice to define > a %_description and then use '%description [subpackage ] %_description' to > avoid repeating the text. Still valid. Can you post an updated spec file? It would be great to get this wrapped up some time before F26, leaving enough time for testing.
I didn't have time to examine this closely, but a quick question: What's the benefit of having both python2 and python3 notebooks? Isn't it possible to just have the Python 3 version and install the Python 2 kernel to use it inside? (I really don't know) If the above is true but the notebook module is to be imported form other packages, then keep the package split, but just include the executable in the Python 3 subpackage. Guidelines: If the executables provide the same functionality independent of whether they are run on top of Python 2 or Python 3, then only the Python 3 version of the executable should be packaged. Transitioning from python2 to python3 is left to individual package maintainers except for packages in Fedora's critical path. For these, we want to port to python3 versions in the same Fedora release if possible.
(In reply to Miro Hrončok from comment #10) > I didn't have time to examine this closely, but a quick question: > > What's the benefit of having both python2 and python3 notebooks? > > Isn't it possible to just have the Python 3 version and install the Python 2 > kernel to use it inside? > > (I really don't know) This is true, but you could still use both base versions of the notebook and decide between py3 vs py2. Debian also has both versions: - https://packages.debian.org/de/sid/python3-notebook - https://packages.debian.org/de/sid/python-notebook > If the above is true but the notebook module is to be imported form other > packages, then keep the package split, but just include the executable in > the Python 3 subpackage. > > Guidelines: > > If the executables provide the same functionality independent of whether > they are run on top of Python 2 or Python 3, then only the Python 3 version > of the executable should be packaged. Transitioning from python2 to python3 > is left to individual package maintainers except for packages in Fedora's > critical path. For these, we want to port to python3 versions in the same > Fedora release if possible. I removed the executable from the python2-notebook. (In reply to Zbigniew Jędrzejewski-Szmek from comment #9) > Review update: > > (In reply to Zbigniew Jędrzejewski-Szmek from comment #4) > > Links in /bin/ should be updated similarly to python-jupyter-client. > > Links are still reversed. It should be like this: > mv %{buildroot}/%{_bindir}/jupyter-nbextension > %{buildroot}/%{_bindir}/jupyter-nbextension-%{python3_version} > ln -s jupyter-nbextension-%{python3_version} > %{buildroot}/%{_bindir}/jupyter-nbextension-%{python3_pkgversion} > mv %{buildroot}/%{_bindir}/jupyter-serverextension > %{buildroot}/%{_bindir}/jupyter-serverextension-%{python3_version} > ln -s jupyter-serverextension-%{python3_version} > %{buildroot}/%{_bindir}/jupyter-serverextension-%{python3_pkgversion} > mv %{buildroot}/%{_bindir}/jupyter-notebook > %{buildroot}/%{_bindir}/jupyter-notebook-%{python3_version} > ln -s jupyter-notebook-%{python3_version} > %{buildroot}/%{_bindir}/jupyter-notebook-%{python3_pkgversion} Changed. > and similarly for the python2 version. Removed (see above). > > %license. Added > - If (and only if) the source package includes the text of the license(s) > in its own file, then that file, containing the text of the license(s) > for the package is included in %license. > Note: License file COPYING.md is not marked as %license > See: > http://fedoraproject.org/wiki/Packaging/LicensingGuidelines#License_Text > > > Suggestion to use "%global _docdir_fmt %{name}". Added > > %description should be word wrapped to 80 columns. > > And since the description is longer than two sentences, it's nice to define > > a %_description and then use '%description [subpackage ] %_description' to > > avoid repeating the text. > > Still valid. Changed > Can you post an updated spec file? It would be great to get this wrapped up > some time > before F26, leaving enough time for testing. Sorry for the delay... I would welcome (co-)maintainers as I find increasingly less time to work on this, but want to have ipython updated in Fedora... I would remove the -doc package altogether as it uses intersphinx during the build. %changelog - rename to python-notebook - only ship python3 executables - update to 4.4.1 Spec URL: https://tomspur.fedorapeople.org/review/python-jupyter-notebook/python-notebook.spec SRPM URL: https://tomspur.fedorapeople.org/review/python-jupyter-notebook/python-notebook-4.4.1-1.fc25.src.rpm
Links give 404.
(In reply to Zbigniew Jędrzejewski-Szmek from comment #12) > Links give 404. Sorry. It should work now.
(In reply to Thomas Spura from comment #11) > > If the above is true but the notebook module is to be imported form other > > packages, then keep the package split, but just include the executable in > > the Python 3 subpackage. > > > > Guidelines: > > > > If the executables provide the same functionality independent of whether > > they are run on top of Python 2 or Python 3, then only the Python 3 version > > of the executable should be packaged. Transitioning from python2 to python3 > > is left to individual package maintainers except for packages in Fedora's > > critical path. For these, we want to port to python3 versions in the same > > Fedora release if possible. > > I removed the executable from the python2-notebook. Thanks. In that case, I think the mv + ln section in %install is not necessary and providing only the unversioned executables is enough. More importantly, running %py2_install after %py3_install is overwriting the executables with the py2 version. $ LANG=C.utf-8 rpm -qlvp python3-notebook-4.4.1-1.fc26.noarch.rpm | grep bin -rwxr-xr-x 1 root root 101 Feb 14 01:01 /usr/bin/jupyter-nbextension lrwxrwxrwx 1 root root 23 Feb 14 01:01 /usr/bin/jupyter-nbextension-3 -> jupyter-nbextension-3.6 -rwxr-xr-x 1 root root 101 Feb 14 01:01 /usr/bin/jupyter-nbextension-3.6 -rwxr-xr-x 1 root root 100 Feb 14 01:01 /usr/bin/jupyter-notebook lrwxrwxrwx 1 root root 20 Feb 14 01:01 /usr/bin/jupyter-notebook-3 -> jupyter-notebook-3.6 -rwxr-xr-x 1 root root 100 Feb 14 01:01 /usr/bin/jupyter-notebook-3.6 -rwxr-xr-x 1 root root 105 Feb 14 01:01 /usr/bin/jupyter-serverextension lrwxrwxrwx 1 root root 27 Feb 14 01:01 /usr/bin/jupyter-serverextension-3 -> jupyter-serverextension-3.6 -rwxr-xr-x 1 root root 105 Feb 14 01:01 /usr/bin/jupyter-serverextension-3.6 $ rpm -qp --requires python3-notebook-4.4.1-1.fc26.noarch.rpm | grep bin /usr/bin/python2 /usr/bin/python3 $ head -n1 usr/bin/jupyter-notebook #!/usr/bin/python2 -s
I'm taking over here as agreed with Thomas, as he lacks time to do it. Spec URL: https://churchyard.fedorapeople.org/SRPMS/python-notebook.spec SRPM URL: https://churchyard.fedorapeople.org/SRPMS/python-notebook-4.4.1-2.fc25.src.rpm * Tue Feb 21 2017 Miro Hrončok <mhroncok> - 4.4.1-2 - Make sure the Python 3 executables are really Python 3 - Build the docs - Try to run tests (not yet ready) - Use python2- where possible Note that there are warnings when building docs: /builddir/build/BUILD/notebook-4.4.1/docs/source/extending/contents.rst:185: WARNING: failed to import ContentsManager.get /builddir/build/BUILD/notebook-4.4.1/docs/source/extending/contents.rst:185: WARNING: failed to import ContentsManager.save /builddir/build/BUILD/notebook-4.4.1/docs/source/extending/contents.rst:185: WARNING: failed to import ContentsManager.delete_file /builddir/build/BUILD/notebook-4.4.1/docs/source/extending/contents.rst:185: WARNING: failed to import ContentsManager.rename_file /builddir/build/BUILD/notebook-4.4.1/docs/source/extending/contents.rst:185: WARNING: failed to import ContentsManager.file_exists /builddir/build/BUILD/notebook-4.4.1/docs/source/extending/contents.rst:185: WARNING: failed to import ContentsManager.dir_exists /builddir/build/BUILD/notebook-4.4.1/docs/source/extending/contents.rst:185: WARNING: failed to import ContentsManager.is_hidden I don't know why yet. Also, I've tried run the tests and so far i'm failing. There's a missing dependency that we'll package soon, but the test suite cannot locate the python and python3 kernels. I'd appreciate help here. The tests are there, commented out.
%description -n python3-%{pypi_name} should also use %_description. I'm not quite convinced about the drop of python2 executables. But they can always be added back, so let's continue on the presumption that python2 and python3 executables are interchangeable. Provides: bundled(jquery) Provides: bundled(jquery-ui) Provides: bundled(jquery-typeahead) Provides: bundled(mathjax) + a bunch of other js stuff. I don't know if it's worthwhile to unbundle those. Maybe mathjax? Some fonts could be unbundled easily: Requires: fontawesome-fonts Requires: fontawesome-fonts-web ln -vfs /usr/share/fonts/fontawesome/fontawesome-webfont.woff %{python3_sitepackages}/notebook/static/components/font-awesome/fonts/fontawesome-webfont.woff etc. loading intersphinx inventory from http://ipython.org/ipython-doc/dev/objects.inv... loading intersphinx inventory from https://nbconvert.readthedocs.io/en/latest/objects.inv... loading intersphinx inventory from https://nbformat.readthedocs.io/en/latest/objects.inv... loading intersphinx inventory from https://jupyter.readthedocs.io/en/latest/objects.inv... → those will fail in koji. It might be worth putting those objects.inv files in sources and installing them into the cache for the build. But that's a minor thing, can be fixed up once the package is in. Looks good otherwise. I'll finish the review when the tornado dep is available.
python-terminado is in QA state. Miro, are you planning an update?
Yes, I am, but I was kept busy with the testable deadline for Fedora Changes. Will look at this sometimes during the week.
I believe that the tests does not see the python2 and python3 kernels, because those kernels first need to get installed with: pythonX -m ipykernel install (Where X is 2 and 3.) This command shall create a directory with kernel.json in it. I believe that python-ipykernel package shall create those directories and install them to /usr/share/jupyter/kernels in order to make them discoverable for our tests here and maybe also for installed python-notebook. Another problem is that the above command will fail with our python-ipykernel with: ImportError: No module named 'IPython.paths' as our ipython is old and does not have the paths submodule yet. I was able to generate the file from a virtualenv and it looks like this: { "argv": [ "/home/churchyard/tmp/venv36/bin/python", "-m", "ipykernel", "-f", "{connection_file}" ], "display_name": "Python 3", "language": "python" } I will try to modify the python-ipykernel package to install similar files for /usr/bin/python2 and /usr/bin/python3 and see if it solves the problem. See https://ipython.readthedocs.io/en/latest/install/kernel_install.html#kernels-for-python-2-and-3
Ok, taht fixes the problem but the tests here are throwing a lots of: ModuleNotFoundError: No module named 'IPython.paths' So i guess we need newer ipython anyway.
Idea: Backport IPython.paths.get_ipython_dir() for now to speed things up.
That brings us to: Traceback (most recent call last): File "/usr/lib64/python3.6/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/usr/lib/python3.6/site-packages/ipykernel/__main__.py", line 2, in <module> from ipykernel import kernelapp as app File "/usr/lib/python3.6/site-packages/ipykernel/kernelapp.py", line 100, in <module> ConnectionFileMixin): TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases That's an ipykernel class inheriting from an ipython class. So as i thought: our ipykernel does not work without newer ipython.
Meanwhile, I looked at the bundling: Spec URL: https://churchyard.fedorapeople.org/SRPMS/python-notebook.spec SRPM URL: https://churchyard.fedorapeople.org/SRPMS/python-notebook-4.4.1-2.fc25.src.rpm Ended up with: Requires: fontawesome-fonts Requires: fontawesome-fonts-web Requires: mathjax >= 2.4 Requires: js-backbone >= 1.2 Requires: js-marked >= 0.3 Requires: js-moment >= 2.8 Requires: js-underscore >= 1.5 # Versions from bower.json Provides: bundled(bootstrap) = 3.3 Provides: bundled(bootstrap-tour) = 0.9.0 Provides: bundled(codemirror) = 5.22.2 Provides: bundled(es6-promise) = 1.0 Provides: bundled(google-caja) = 5669 Provides: bundled(jquery) = 2.0 Provides: bundled(jquery-typeahead) = 2.0.0 Provides: bundled(jquery-ui) = 1.10 Provides: bundled(requirejs) = 2.1 Provides: bundled(text-encoding) = 0.1 Provides: bundled(xterm.js) = 2.1.0
With bz1426799 and bz1430093 the tests pass! Spec URL: https://churchyard.fedorapeople.org/SRPMS/python-notebook.spec SRPM URL: https://churchyard.fedorapeople.org/SRPMS/python-notebook-4.4.1-2.fc25.src.rpm
I have neglected mathjax terribly. Great the packaged version is still OK. + package name is OK (I still think python-jupyter-notebook would be better, like I said in comment #c2, but it's a bike shedding issue) + latest version (5.0.0b2 is tagged, but it seems better to target the stable release) + %check is present and passes + BR/R/P are correct, afaict + modern python packaging template is used + %python_provide is present + builds and installs OK + seems to run OK + various stuff has been unbundled, we can unbundle more later (jquery, etc) + license is acceptable (3-clause BSD) + license is specified correctly rpmlint: python2-notebook.noarch: W: dangling-symlink /usr/lib/python2.7/site-packages/notebook/static/components/MathJax /usr/share/javascript/mathjax python2-notebook.noarch: W: dangling-symlink /usr/lib/python2.7/site-packages/notebook/static/components/backbone /usr/share/javascript/backbone python2-notebook.noarch: W: dangling-symlink /usr/lib/python2.7/site-packages/notebook/static/components/font-awesome/fonts /usr/share/fonts/fontawesome python2-notebook.noarch: W: dangling-symlink /usr/lib/python2.7/site-packages/notebook/static/components/marked/lib /usr/share/javascript/marked python2-notebook.noarch: W: dangling-symlink /usr/lib/python2.7/site-packages/notebook/static/components/moment /usr/share/javascript/moment python2-notebook.noarch: W: dangling-symlink /usr/lib/python2.7/site-packages/notebook/static/components/underscore /usr/share/javascript/underscore python3-notebook.noarch: W: dangling-symlink /usr/lib/python3.6/site-packages/notebook/static/components/MathJax /usr/share/javascript/mathjax python3-notebook.noarch: W: dangling-symlink /usr/lib/python3.6/site-packages/notebook/static/components/backbone /usr/share/javascript/backbone python3-notebook.noarch: W: dangling-symlink /usr/lib/python3.6/site-packages/notebook/static/components/font-awesome/fonts /usr/share/fonts/fontawesome python3-notebook.noarch: W: dangling-symlink /usr/lib/python3.6/site-packages/notebook/static/components/marked/lib /usr/share/javascript/marked python3-notebook.noarch: W: dangling-symlink /usr/lib/python3.6/site-packages/notebook/static/components/moment /usr/share/javascript/moment python3-notebook.noarch: W: dangling-symlink /usr/lib/python3.6/site-packages/notebook/static/components/underscore /usr/share/javascript/underscore Bogus, those symlinks all point to unbundled deps. python3-notebook.noarch: W: no-manual-page-for-binary jupyter-nbextension python3-notebook.noarch: W: no-manual-page-for-binary jupyter-notebook python3-notebook.noarch: W: no-manual-page-for-binary jupyter-serverextension Yeah, would be nice to add those, at least with some pointers to html docs... python-notebook-doc.noarch: W: summary-not-capitalized C notebook documentation "notebook" is the name, so it's OK. 3 packages and 0 specfiles checked; 0 errors, 16 warnings. Package is APPROVED. Two nitpicks: there's a blank line at start of %description for python2-notebook subpackage. The %description for python3-notebook should use %_description. OK, let's get this pushed out and iron out any integration issues in rawhide/F26. I this is more likely to work than trying to get everything perfect in bugzilla attachments.
(In reply to Zbigniew Jędrzejewski-Szmek from comment #25) > I have neglected mathjax terribly. Great the packaged version is still OK. Still needs some smoke-testing. > + package name is OK (I still think python-jupyter-notebook would be better, > like I said in comment #c2, but it's a bike shedding issue) Let's provide that as well maybe? > Two nitpicks: there's a blank line at start of %description for > python2-notebook subpackage. > The %description for python3-notebook should use %_description. Will change. Thank you. Now we need to wait for the other 2 BZs. Not to self: Will need to provide and obsolete python*-ipython-notebook.
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/rpms/python-notebook
python-notebook-4.4.1-2.fc26 ipython-5.3.0-2.fc26 python-ipykernel-4.5.2-6.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-0e5cf9525f
ipython-5.3.0-3.fc26, python-ipykernel-4.5.2-6.fc26, python-notebook-4.4.1-2.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-0e5cf9525f
ipython-5.3.0-4.fc26 python-ipykernel-4.5.2-6.fc26 python-notebook-4.4.1-3.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-0e5cf9525f
ipython-5.3.0-4.fc26, python-ipykernel-4.5.2-6.fc26, python-notebook-4.4.1-3.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-0e5cf9525f
ipython-5.3.0-4.fc26, python-ipykernel-4.5.2-6.fc26, python-notebook-4.4.1-3.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.