commit c0a1a4b19b9925a7cd3d06e74244371e21264e501ff88c9f3eb1c366be651e0c Author: Todd R Date: Tue Nov 12 16:43:17 2019 +0000 Accepting request 747806 from home:TheBlackCat:branches:devel:languages:python:jupyter Update to 4.6.1 Rename python-jupyter_core to python-jupyter-core to match upstream rename and to comply with python package naming rules. OBS-URL: https://build.opensuse.org/request/show/747806 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-jupyter-core?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/jupyter-core.pdf b/jupyter-core.pdf new file mode 100644 index 0000000..1be3a56 --- /dev/null +++ b/jupyter-core.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:794bd4636ba899f042b0832e6fb9d3a382fa0ce65d2f7c70292280e4e1c88ff1 +size 110835 diff --git a/jupyter-core.zip b/jupyter-core.zip new file mode 100644 index 0000000..9f5ca59 --- /dev/null +++ b/jupyter-core.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9bdf5b6c22020b95f4ccc957db09c4496a9f2370527b50fb807293ba2ea2d032 +size 9882726 diff --git a/jupyter_core-4.6.1.tar.gz b/jupyter_core-4.6.1.tar.gz new file mode 100644 index 0000000..0da83d9 --- /dev/null +++ b/jupyter_core-4.6.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a183e0ec2e8f6adddf62b0a3fc6a2237e3e0056d381e536d3e7c7ecc3067e244 +size 66693 diff --git a/python-jupyter-core-doc.changes b/python-jupyter-core-doc.changes new file mode 100644 index 0000000..968c861 --- /dev/null +++ b/python-jupyter-core-doc.changes @@ -0,0 +1,187 @@ +------------------------------------------------------------------- +Tue Nov 12 15:54:48 UTC 2019 - Todd R + +- Update to 4.6.1 + * Tolerate execute bit in owner permissions when validating secure writes + * Fix project name typo in copyright +- Update to 4.6.0 + * Unicode characters existing in the user's home directory name are properly + handled + * ``mock`` is now only required for testing on Python 2 + * Deprecation warnings relative to ``_runtime_dir_changed`` are no longer + produced + * The ``scripts`` directory relative to the current python environment is + now appended to the search directory for subcommands + * Some utility functions (``exists()``, ``is_hidden()``, ``secure_write()``) + have been moved from ``jupyter_client`` and ``jupyter_server`` to + ``jupyter_core`` + * Fix error on Windows when setting private permissions +- Rename to python-jupyter-core to match upstream name change + +------------------------------------------------------------------- +Fri Aug 16 14:46:15 UTC 2019 - Todd R + +- Fix self-obseletion + +------------------------------------------------------------------- +Mon Jun 24 20:30:24 UTC 2019 - Todd R + +- Update to version 4.5.0 + * ``jupyter --version`` now tries to show the version number of various other + installed Jupyter packages, not just ``jupyter_core``. + This will hopefully make it clearer that there are various packages with + their own version numbers. + * Allow a :envvar:`JUPYTER_CONFIG_PATH` environment variable to specify a + search path of additional locations for config. + * ``jupyter subcommand`` no longer modifies the :envvar:`PATH` environment + variable when it runs ``jupyter-subcommand``. + * Jupyter's 'runtime' directory no longer uses ``XDG_RUNTIME_DIR``. While + it has some attractive properties, it has led to various problems. + * Fix ``JupyterApp`` to respect the ``raise_config_file_errors`` traitlet. + * Various improvements to the bash completion scripts in this repository. + * The ``setup.py`` script now always uses setuptools, like most other Jupyter + projects. + * The LICENSE file is included in wheels. + +------------------------------------------------------------------- +Thu Apr 25 01:58:55 UTC 2019 - Todd R + +- Split out jupyter components into subpackage. +- Add rpm macros. +- Rename doc package to match jupyter package. + +------------------------------------------------------------------- +Tue Feb 13 19:47:23 UTC 2018 - toddrme2178@gmail.com + +- Update url + +------------------------------------------------------------------- +Wed Nov 22 22:48:47 UTC 2017 - arun@gmx.de + +- require sphinxcontrib-github-alt + +- update to version 4.4.0: + * jupyter troubleshoot gets the list of packages from the Python + environment it's in, by using sys.executable to call pip list + (:ghpull:`104`). + * Added utility function ensure_dir_exists, and switched to using it + over the one from ipython_genutils, which does permissions wrong + (:ghpull:`113`). + * Avoid creating the ~/.ipython directory when checking if it exists + for config migration (:ghpull:`118`). + * Fix mistaken description in zsh completions (:ghpull:`98`). + * Fix subcommand tests on Windows (:ghpull:`103`). + * The README now describes how to work on jupyter_core and build the + docs (:ghpull:`110`). + * Fix a broken link to a release in the docs (:ghpull:`109`). + +------------------------------------------------------------------- +Wed Sep 20 17:53:24 UTC 2017 - toddrme2178@gmail.com + +- Set configuration and data paths to be correct for any + Linux distribution. This is done by using sed to replace + hard-coded values with those provided by rpm. + * Add use_rpms_paths.patch to make the paths easier to replace. + +------------------------------------------------------------------- +Wed Apr 26 16:32:25 UTC 2017 - toddrme2178@gmail.com + +- Implement single-spec version. +- Remove version_specific_dirs.patch. + The Python3 jupyter implementation will be used for directories. + +------------------------------------------------------------------- +Fri Mar 31 13:59:14 UTC 2017 - toddrme2178@gmail.com + +- Add version_specific_dirs.patch + Uses python version-specific directories to avoid conflicts. +- Install the directories used for system-side settings and data so + they are properly owned by this package. + +------------------------------------------------------------------- +Thu Mar 30 19:05:42 UTC 2017 - toddrme2178@gmail.com + +- Update to 4.3.0 + * Add `JUPYTER_NO_CONFIG` environment variable for disabling all + Jupyter configuration. + * More detailed error message when failing to launch subcommands. +- Update to 4.2.1 + * Fix error message on Windows when subcommand not found. + * Correctly display PATH in ``jupyter troubleshoot`` on Windows. +- Update to 4.2.0 + * Make :command:`jupyter` directory top priority in search path + for subcommands, so that :command:`jupyter-subcommand` next to + :command:`jupyter` will always be picked if present. + * Avoid using ``shell=True`` for subcommand dispatch on Windows. +- Update to 4.1.1 + * Include symlink directory and real location on subcommand PATH + when :file:`jupyter` is a symlink. +- Update to 4.1.0 + * Add ``jupyter.py`` module, so that :command:`python -m jupyter` + always works. + * Add prototype ``jupyter troubleshoot`` command for displaying + environment info. + * Ensure directory containing ``jupyter`` executable is included + when dispatching subcommands. + * Unicode fixes for Legacy Python. + +------------------------------------------------------------------- +Wed Feb 17 14:22:56 UTC 2016 - toddrme2178@gmail.com + +- Simplify the tests for whether to build pdf documentation + +------------------------------------------------------------------- +Wed Feb 17 08:53:35 UTC 2016 - toddrme2178@gmail.com + +- Split documentation to speed up building. + This is a dependency of a lot of other packages, and the + dependencies for the documentation are very heavy. So build + the documentation separately to avoid holding up the build + process. + +------------------------------------------------------------------- +Thu Oct 1 11:33:33 UTC 2015 - toddrme2178@gmail.com + +- Build documentation + +------------------------------------------------------------------- +Wed Sep 23 11:20:47 UTC 2015 - toddrme2178@gmail.com + +- update to version 4.0.6: + * fix typo preventing migration when custom.css is missing +- update to version 4.0.5: + * fix subcommands on Windows (yes, again) + * fix migration when custom.js/css are not present + +------------------------------------------------------------------- +Mon Aug 24 10:29:04 UTC 2015 - toddrme2178@gmail.com + +- Update to 4.0.4 + * ensure version is printed to stdout … + * remove file-extension from subcommand list on Windows +- Update requirements + +------------------------------------------------------------------- +Fri Aug 14 07:48:27 UTC 2015 - toddrme2178@gmail.com + +- Update to 4.0.3 + * use raw_input on Python 2 + * Use setuptools entry points when setuptools in use + * Use instances of traits instead of trait classes +- Fix package naming consistency + +------------------------------------------------------------------- +Fri Aug 14 07:03:18 UTC 2015 - toddrme2178@gmail.com + +- Fix update-alternatives usage + +------------------------------------------------------------------- +Thu Aug 13 14:06:32 UTC 2015 - toddrme2178@gmail.com + +- Update dependency names + +------------------------------------------------------------------- +Tue Jul 21 10:49:36 UTC 2015 - jennings@neuro.bzm + +- Initial version + diff --git a/python-jupyter-core-doc.spec b/python-jupyter-core-doc.spec new file mode 100644 index 0000000..dbbb77d --- /dev/null +++ b/python-jupyter-core-doc.spec @@ -0,0 +1,102 @@ +# +# spec file for package python-jupyter-core-doc +# +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%bcond_without tests +Name: python-jupyter-core-doc +Version: 4.6.1 +Release: 0 +Summary: Documentation for the Jupyter base package +License: BSD-3-Clause +Group: Documentation/Other +URL: https://github.com/jupyter/jupyter_core +Source0: https://files.pythonhosted.org/packages/source/j/jupyter_core/jupyter_core-%{version}.tar.gz +Source1: https://buildmedia.readthedocs.org/media/pdf/jupyter-core/latest/jupyter-core.pdf +Source2: https://buildmedia.readthedocs.org/media/htmlzip/jupyter-core/latest/jupyter-core.zip +# PATCH-FIX-OPENSUSE -- use_rpms_paths.patch -- change paths so they are easy to replace at build time +Patch0: use_rpms_paths.patch +BuildRequires: %{python_module jupyter-core} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildRequires: unzip +BuildArch: noarch +%if %{with tests} +# Test requirements +BuildRequires: %{python_module nose} +BuildRequires: %{python_module pytest} +# Python 2.7 test requirements +BuildRequires: python-mock +%endif + +%description +Documentation and help files for the Jupyter base package. + +%package -n jupyter-jupyter-core-doc +Summary: Documentation for the Jupyter base package +Group: Documentation/Other +Provides: python-jupyter-core-doc = %{version} +Obsoletes: python-jupyter-core-doc < %{version} +Provides: jupyter-jupyter_core-doc = %{version} +Obsoletes: jupyter-jupyter_core-doc < %{version} +Provides: %{python_module jupyter-core-doc = %{version}} +Obsoletes: %{python_module jupyter-core-doc < %{version}} + +%description -n jupyter-jupyter-core-doc +Documentation and help files for the Jupyter base package. + +%prep +%setup -q -n jupyter_core-%{version} +%patch0 -p1 +unzip %{SOURCE2} -d docs +mv docs/jupyter-core-* docs/html +rm docs/html/.buildinfo + +echo %{_jupyter_prefix} +echo %{_jupyter_confdir} + +# Set the appropriate paths dynamically +sed -i "s|\"%{_datadir}/jupyter\"|\"%{_datadir}/jupyter\"|" jupyter_core/paths.py +sed -i "s|\"%{_sysconfdir}/jupyter\"|\"%{_sysconfdir}/jupyter\"|" jupyter_core/paths.py +sed -i "s|(sys\.prefix, 'share', 'jupyter')|('%{_datadir}', 'jupyter')|" jupyter_core/paths.py +sed -i "s|(sys\.prefix, 'etc', 'jupyter')|('%{_sysconfdir}', 'jupyter')|" jupyter_core/paths.py + +%build +# Not needed + +%install +mkdir -p %{buildroot}%{_docdir}/jupyter-jupyter-core/ + +cp %{SOURCE1} %{buildroot}%{_docdir}/jupyter-jupyter-core/ +cp -r docs/html %{buildroot}%{_docdir}/jupyter-jupyter-core/ + +%fdupes %{buildroot}%{_docdir}/jupyter-jupyter-core/ + +%if %{with tests} +%check +# test_migrate requires files not found in the package +pushd jupyter_core/tests +rm test_migrate.py +%pytest +popd +%endif + +%files -n jupyter-jupyter-core-doc +%license COPYING.md +%{_docdir}/jupyter-jupyter-core/ + +%changelog diff --git a/python-jupyter-core.changes b/python-jupyter-core.changes new file mode 100644 index 0000000..968c861 --- /dev/null +++ b/python-jupyter-core.changes @@ -0,0 +1,187 @@ +------------------------------------------------------------------- +Tue Nov 12 15:54:48 UTC 2019 - Todd R + +- Update to 4.6.1 + * Tolerate execute bit in owner permissions when validating secure writes + * Fix project name typo in copyright +- Update to 4.6.0 + * Unicode characters existing in the user's home directory name are properly + handled + * ``mock`` is now only required for testing on Python 2 + * Deprecation warnings relative to ``_runtime_dir_changed`` are no longer + produced + * The ``scripts`` directory relative to the current python environment is + now appended to the search directory for subcommands + * Some utility functions (``exists()``, ``is_hidden()``, ``secure_write()``) + have been moved from ``jupyter_client`` and ``jupyter_server`` to + ``jupyter_core`` + * Fix error on Windows when setting private permissions +- Rename to python-jupyter-core to match upstream name change + +------------------------------------------------------------------- +Fri Aug 16 14:46:15 UTC 2019 - Todd R + +- Fix self-obseletion + +------------------------------------------------------------------- +Mon Jun 24 20:30:24 UTC 2019 - Todd R + +- Update to version 4.5.0 + * ``jupyter --version`` now tries to show the version number of various other + installed Jupyter packages, not just ``jupyter_core``. + This will hopefully make it clearer that there are various packages with + their own version numbers. + * Allow a :envvar:`JUPYTER_CONFIG_PATH` environment variable to specify a + search path of additional locations for config. + * ``jupyter subcommand`` no longer modifies the :envvar:`PATH` environment + variable when it runs ``jupyter-subcommand``. + * Jupyter's 'runtime' directory no longer uses ``XDG_RUNTIME_DIR``. While + it has some attractive properties, it has led to various problems. + * Fix ``JupyterApp`` to respect the ``raise_config_file_errors`` traitlet. + * Various improvements to the bash completion scripts in this repository. + * The ``setup.py`` script now always uses setuptools, like most other Jupyter + projects. + * The LICENSE file is included in wheels. + +------------------------------------------------------------------- +Thu Apr 25 01:58:55 UTC 2019 - Todd R + +- Split out jupyter components into subpackage. +- Add rpm macros. +- Rename doc package to match jupyter package. + +------------------------------------------------------------------- +Tue Feb 13 19:47:23 UTC 2018 - toddrme2178@gmail.com + +- Update url + +------------------------------------------------------------------- +Wed Nov 22 22:48:47 UTC 2017 - arun@gmx.de + +- require sphinxcontrib-github-alt + +- update to version 4.4.0: + * jupyter troubleshoot gets the list of packages from the Python + environment it's in, by using sys.executable to call pip list + (:ghpull:`104`). + * Added utility function ensure_dir_exists, and switched to using it + over the one from ipython_genutils, which does permissions wrong + (:ghpull:`113`). + * Avoid creating the ~/.ipython directory when checking if it exists + for config migration (:ghpull:`118`). + * Fix mistaken description in zsh completions (:ghpull:`98`). + * Fix subcommand tests on Windows (:ghpull:`103`). + * The README now describes how to work on jupyter_core and build the + docs (:ghpull:`110`). + * Fix a broken link to a release in the docs (:ghpull:`109`). + +------------------------------------------------------------------- +Wed Sep 20 17:53:24 UTC 2017 - toddrme2178@gmail.com + +- Set configuration and data paths to be correct for any + Linux distribution. This is done by using sed to replace + hard-coded values with those provided by rpm. + * Add use_rpms_paths.patch to make the paths easier to replace. + +------------------------------------------------------------------- +Wed Apr 26 16:32:25 UTC 2017 - toddrme2178@gmail.com + +- Implement single-spec version. +- Remove version_specific_dirs.patch. + The Python3 jupyter implementation will be used for directories. + +------------------------------------------------------------------- +Fri Mar 31 13:59:14 UTC 2017 - toddrme2178@gmail.com + +- Add version_specific_dirs.patch + Uses python version-specific directories to avoid conflicts. +- Install the directories used for system-side settings and data so + they are properly owned by this package. + +------------------------------------------------------------------- +Thu Mar 30 19:05:42 UTC 2017 - toddrme2178@gmail.com + +- Update to 4.3.0 + * Add `JUPYTER_NO_CONFIG` environment variable for disabling all + Jupyter configuration. + * More detailed error message when failing to launch subcommands. +- Update to 4.2.1 + * Fix error message on Windows when subcommand not found. + * Correctly display PATH in ``jupyter troubleshoot`` on Windows. +- Update to 4.2.0 + * Make :command:`jupyter` directory top priority in search path + for subcommands, so that :command:`jupyter-subcommand` next to + :command:`jupyter` will always be picked if present. + * Avoid using ``shell=True`` for subcommand dispatch on Windows. +- Update to 4.1.1 + * Include symlink directory and real location on subcommand PATH + when :file:`jupyter` is a symlink. +- Update to 4.1.0 + * Add ``jupyter.py`` module, so that :command:`python -m jupyter` + always works. + * Add prototype ``jupyter troubleshoot`` command for displaying + environment info. + * Ensure directory containing ``jupyter`` executable is included + when dispatching subcommands. + * Unicode fixes for Legacy Python. + +------------------------------------------------------------------- +Wed Feb 17 14:22:56 UTC 2016 - toddrme2178@gmail.com + +- Simplify the tests for whether to build pdf documentation + +------------------------------------------------------------------- +Wed Feb 17 08:53:35 UTC 2016 - toddrme2178@gmail.com + +- Split documentation to speed up building. + This is a dependency of a lot of other packages, and the + dependencies for the documentation are very heavy. So build + the documentation separately to avoid holding up the build + process. + +------------------------------------------------------------------- +Thu Oct 1 11:33:33 UTC 2015 - toddrme2178@gmail.com + +- Build documentation + +------------------------------------------------------------------- +Wed Sep 23 11:20:47 UTC 2015 - toddrme2178@gmail.com + +- update to version 4.0.6: + * fix typo preventing migration when custom.css is missing +- update to version 4.0.5: + * fix subcommands on Windows (yes, again) + * fix migration when custom.js/css are not present + +------------------------------------------------------------------- +Mon Aug 24 10:29:04 UTC 2015 - toddrme2178@gmail.com + +- Update to 4.0.4 + * ensure version is printed to stdout … + * remove file-extension from subcommand list on Windows +- Update requirements + +------------------------------------------------------------------- +Fri Aug 14 07:48:27 UTC 2015 - toddrme2178@gmail.com + +- Update to 4.0.3 + * use raw_input on Python 2 + * Use setuptools entry points when setuptools in use + * Use instances of traits instead of trait classes +- Fix package naming consistency + +------------------------------------------------------------------- +Fri Aug 14 07:03:18 UTC 2015 - toddrme2178@gmail.com + +- Fix update-alternatives usage + +------------------------------------------------------------------- +Thu Aug 13 14:06:32 UTC 2015 - toddrme2178@gmail.com + +- Update dependency names + +------------------------------------------------------------------- +Tue Jul 21 10:49:36 UTC 2015 - jennings@neuro.bzm + +- Initial version + diff --git a/python-jupyter-core.spec b/python-jupyter-core.spec new file mode 100644 index 0000000..f056048 --- /dev/null +++ b/python-jupyter-core.spec @@ -0,0 +1,116 @@ +# +# spec file for package python-jupyter-core +# +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%define oldpython python +Name: python-jupyter-core +Version: 4.6.1 +Release: 0 +Summary: Base package on which Jupyter projects rely +License: BSD-3-Clause +Group: Development/Languages/Python +URL: https://github.com/jupyter/jupyter_core +Source0: https://files.pythonhosted.org/packages/source/j/jupyter_core/jupyter_core-%{version}.tar.gz +# PATCH-FIX-OPENSUSE -- use_rpms_paths.patch -- change paths so they are easy to replace at build time +Patch0: use_rpms_paths.patch +BuildRequires: %{python_module ipython_genutils} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module traitlets} +BuildRequires: fdupes +BuildRequires: jupyter-jupyter_core-filesystem +BuildRequires: python-rpm-macros +Requires: jupyter-jupyter_core = %{version} +Requires: python-ipython_genutils +Requires: python-traitlets +Recommends: python-ipython +Provides: python-jupyter_core = %{version} +Obsoletes: python-jupyter_core < %{version} +%ifpython2 +Provides: %{oldpython}-jupyter_core = %{version} +Obsoletes: %{oldpython}-jupyter_core < %{version} +%endif +BuildArch: noarch +%python_subpackages + +%description +Core common functionality of Jupyter projects. + +This package contains base application classes and configuration inherited by +other projects. It doesn't do much on its own. + +There is no reason to install this package on its own. It will be pulled in +as a dependency by packages that require it. + +This package provides the python interface. + +%package -n jupyter-jupyter-core +Summary: Base package on which Jupyter projects rely +Group: Development/Languages/Python +Requires: python3-jupyter_core = %{version} +Requires: jupyter-notebook-filesystem +Provides: jupyter-jupyter_core = %{version} +Obsoletes: jupyter-jupyter_core < %{version} + +%description -n jupyter-jupyter-core +Core common functionality of Jupyter projects. + +This package contains base application classes and configuration inherited by +other projects. It doesn't do much on its own. + +There is no reason to install this package on its own. It will be pulled in +as a dependency by packages that require it. + +This package provides the jupyter components. + +%prep +%setup -q -n jupyter_core-%{version} +%patch0 -p1 +# Set the appropriate paths dynamically +sed -i "s|\"%{_datadir}/jupyter\"|\"%{_datadir}/jupyter\"|" jupyter_core/paths.py +sed -i "s|\"%{_sysconfdir}/jupyter\"|\"%{_sysconfdir}/jupyter\"|" jupyter_core/paths.py +sed -i "s|(sys\.prefix, 'share', 'jupyter')|('%{_datadir}', 'jupyter')|" jupyter_core/paths.py +sed -i "s|(sys\.prefix, 'etc', 'jupyter')|('%{_sysconfdir}', 'jupyter')|" jupyter_core/paths.py + +%build +%python_build + +%install +%python_install + +%{python_expand chmod a+x %{buildroot}%{$python_sitelib}/jupyter_core/troubleshoot.py +sed -i "s|^#!%{_bindir}/env python$|#!%{__$python}|" %{buildroot}%{$python_sitelib}/jupyter_core/troubleshoot.py +$python -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/jupyter_core/ +$python -O -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/jupyter_core/ +%fdupes %{buildroot}%{$python_sitelib} +} + +%files %{python_files} +%license COPYING.md +%{python_sitelib}/jupyter.py* +%pycache_only %{python_sitelib}/__pycache__/jupyter.*.py* +%{python_sitelib}/jupyter_core/ +%{python_sitelib}/jupyter_core-%{version}-*.egg-info + +%files -n jupyter-jupyter-core +%license COPYING.md +%doc CONTRIBUTING.md README.md +%{_bindir}/jupyter +%{_bindir}/jupyter-migrate +%{_bindir}/jupyter-troubleshoot + +%changelog diff --git a/use_rpms_paths.patch b/use_rpms_paths.patch new file mode 100644 index 0000000..2a9e989 --- /dev/null +++ b/use_rpms_paths.patch @@ -0,0 +1,35 @@ +From: toddrme2178@gmail.com +Date: 2017-09-20 +Subject: Use rpm paths + +Use single-line paths. These should be replaced with the appropriate +system paths in the .spec file. + +--- + +--- a/jupyter_core/paths.py ++++ b/jupyter_core/paths.py +@@ -117,10 +117,7 @@ + else: # PROGRAMDATA is not defined by default on XP. + SYSTEM_JUPYTER_PATH = [os.path.join(sys.prefix, 'share', 'jupyter')] + else: +- SYSTEM_JUPYTER_PATH = [ +- "/usr/local/share/jupyter", +- "/usr/share/jupyter", +- ] ++ SYSTEM_JUPYTER_PATH = ["/usr/share/jupyter"] + + ENV_JUPYTER_PATH = [os.path.join(sys.prefix, 'share', 'jupyter')] + +@@ -169,10 +166,7 @@ + else: # PROGRAMDATA is not defined by default on XP. + SYSTEM_CONFIG_PATH = [] + else: +- SYSTEM_CONFIG_PATH = [ +- "/usr/local/etc/jupyter", +- "/etc/jupyter", +- ] ++ SYSTEM_CONFIG_PATH = ["/etc/jupyter"] + + ENV_CONFIG_PATH = [os.path.join(sys.prefix, 'etc', 'jupyter')] +