2019-11-12 16:43:17 +00:00
|
|
|
#
|
2021-11-12 21:17:57 +00:00
|
|
|
# spec file
|
2019-11-12 16:43:17 +00:00
|
|
|
#
|
2024-01-21 11:03:05 +00:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2019-11-12 16:43:17 +00:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2021-11-12 18:08:29 +00:00
|
|
|
%if 0%{?suse_version} > 1500
|
2021-10-06 09:14:43 +00:00
|
|
|
%bcond_without libalternatives
|
|
|
|
%else
|
|
|
|
%bcond_with libalternatives
|
|
|
|
%endif
|
|
|
|
|
2020-02-24 17:14:54 +00:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
%if "%{flavor}" == "test"
|
|
|
|
%define psuffix -test
|
|
|
|
%bcond_without test
|
|
|
|
%else
|
|
|
|
%define psuffix %{nil}
|
|
|
|
%bcond_with test
|
|
|
|
%endif
|
2022-12-25 20:40:52 +00:00
|
|
|
|
2020-02-24 17:14:54 +00:00
|
|
|
Name: python-jupyter-core%{psuffix}
|
2024-01-21 11:03:05 +00:00
|
|
|
Version: 5.7.1
|
2019-11-12 16:43:17 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: Base package on which Jupyter projects rely
|
|
|
|
License: BSD-3-Clause
|
|
|
|
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
|
2022-12-25 20:40:52 +00:00
|
|
|
BuildRequires: %{python_module base >= 3.8}
|
2022-08-01 18:07:11 +00:00
|
|
|
BuildRequires: %{python_module hatchling}
|
|
|
|
BuildRequires: %{python_module pip}
|
2019-11-12 16:43:17 +00:00
|
|
|
BuildRequires: fdupes
|
2021-10-06 09:14:43 +00:00
|
|
|
BuildRequires: python-rpm-macros >= 20210929
|
2022-12-25 20:40:52 +00:00
|
|
|
Requires: python-platformdirs >= 2.5
|
|
|
|
Requires: python-traitlets >= 5.3
|
2021-10-06 09:14:43 +00:00
|
|
|
%if %{with libalternatives}
|
|
|
|
BuildRequires: alts
|
|
|
|
Requires: alts
|
|
|
|
%else
|
Accepting request 868748 from home:bnavigator:branches:devel:languages:python:jupyter
- Update to 4.7.1
* Allow creating user to delete secure file
- Changelog for 4.7.0
* Add a new JUPYTER_PREFER_ENV_PATH variable, which can be set
to switch the order of the environment-level path and the
user-level path in the Jupyter path hierarchy (e.g., jupyter
--paths). It is considered set if it is a value that is not
one of 'no', 'n', 'off', 'false', '0', or '0.0' (case
insensitive). If you are running Jupyter in multiple virtual
environments as the same user, you will likely want to set
this environment variable.
* Drop Python 2.x and 3.5 support, as they have reached end of
life.
* jupyter --paths --debug now explains the environment
variables that affect the current path list.
* Add conda environment information in jupyter troubleshoot.
* Update _version.version_info and _version.__version__ to
follow Python conventions.
- merge jupyter package as capability into the primary python
package
- fix replacement of paths:
* fix noop introduced by overeager specfile-cleaner for system
paths, adjust use_rpm_paths.patch
* don't replace ENV_CONFIG_PATH or ENV_JUPYTER_PATH because that
would break virtual environments. See also
gh#jupyter/jupyter_core#208
OBS-URL: https://build.opensuse.org/request/show/868748
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-jupyter-core?expand=0&rev=12
2021-02-03 12:33:57 +00:00
|
|
|
Requires(post): update-alternatives
|
2021-02-25 20:53:14 +00:00
|
|
|
Requires(postun):update-alternatives
|
2021-10-06 09:14:43 +00:00
|
|
|
%endif
|
2019-11-12 16:43:17 +00:00
|
|
|
Recommends: python-ipython
|
Accepting request 868748 from home:bnavigator:branches:devel:languages:python:jupyter
- Update to 4.7.1
* Allow creating user to delete secure file
- Changelog for 4.7.0
* Add a new JUPYTER_PREFER_ENV_PATH variable, which can be set
to switch the order of the environment-level path and the
user-level path in the Jupyter path hierarchy (e.g., jupyter
--paths). It is considered set if it is a value that is not
one of 'no', 'n', 'off', 'false', '0', or '0.0' (case
insensitive). If you are running Jupyter in multiple virtual
environments as the same user, you will likely want to set
this environment variable.
* Drop Python 2.x and 3.5 support, as they have reached end of
life.
* jupyter --paths --debug now explains the environment
variables that affect the current path list.
* Add conda environment information in jupyter troubleshoot.
* Update _version.version_info and _version.__version__ to
follow Python conventions.
- merge jupyter package as capability into the primary python
package
- fix replacement of paths:
* fix noop introduced by overeager specfile-cleaner for system
paths, adjust use_rpm_paths.patch
* don't replace ENV_CONFIG_PATH or ENV_JUPYTER_PATH because that
would break virtual environments. See also
gh#jupyter/jupyter_core#208
OBS-URL: https://build.opensuse.org/request/show/868748
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-jupyter-core?expand=0&rev=12
2021-02-03 12:33:57 +00:00
|
|
|
Provides: python-jupyter_core = %{version}-%{release}
|
|
|
|
Obsoletes: python-jupyter_core < %{version}-%{release}
|
|
|
|
%if "%{python_flavor}" == "python3" || "%{python_provides}" == "python3"
|
|
|
|
Provides: jupyter-jupyter-core = %{version}-%{release}
|
|
|
|
Obsoletes: jupyter-jupyter-core < %{version}-%{release}
|
|
|
|
Provides: jupyter-jupyter_core = %{version}-%{release}
|
|
|
|
Obsoletes: jupyter-jupyter_core < %{version}-%{release}
|
2019-11-12 16:43:17 +00:00
|
|
|
%endif
|
Accepting request 868748 from home:bnavigator:branches:devel:languages:python:jupyter
- Update to 4.7.1
* Allow creating user to delete secure file
- Changelog for 4.7.0
* Add a new JUPYTER_PREFER_ENV_PATH variable, which can be set
to switch the order of the environment-level path and the
user-level path in the Jupyter path hierarchy (e.g., jupyter
--paths). It is considered set if it is a value that is not
one of 'no', 'n', 'off', 'false', '0', or '0.0' (case
insensitive). If you are running Jupyter in multiple virtual
environments as the same user, you will likely want to set
this environment variable.
* Drop Python 2.x and 3.5 support, as they have reached end of
life.
* jupyter --paths --debug now explains the environment
variables that affect the current path list.
* Add conda environment information in jupyter troubleshoot.
* Update _version.version_info and _version.__version__ to
follow Python conventions.
- merge jupyter package as capability into the primary python
package
- fix replacement of paths:
* fix noop introduced by overeager specfile-cleaner for system
paths, adjust use_rpm_paths.patch
* don't replace ENV_CONFIG_PATH or ENV_JUPYTER_PATH because that
would break virtual environments. See also
gh#jupyter/jupyter_core#208
OBS-URL: https://build.opensuse.org/request/show/868748
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-jupyter-core?expand=0&rev=12
2021-02-03 12:33:57 +00:00
|
|
|
BuildArch: noarch
|
2020-02-24 17:14:54 +00:00
|
|
|
%if %{with test}
|
2022-08-01 18:07:11 +00:00
|
|
|
BuildRequires: %{python_module ipykernel}
|
|
|
|
BuildRequires: %{python_module jupyter-core = %{version}}
|
2021-10-17 21:54:00 +00:00
|
|
|
BuildRequires: %{python_module pytest-timeout}
|
2020-02-24 17:14:54 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
2020-03-28 07:39:28 +00:00
|
|
|
%endif
|
2019-11-12 16:43:17 +00:00
|
|
|
%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.
|
|
|
|
|
|
|
|
%prep
|
2021-11-12 21:17:57 +00:00
|
|
|
%autosetup -p1 -n jupyter_core-%{version}
|
Accepting request 868748 from home:bnavigator:branches:devel:languages:python:jupyter
- Update to 4.7.1
* Allow creating user to delete secure file
- Changelog for 4.7.0
* Add a new JUPYTER_PREFER_ENV_PATH variable, which can be set
to switch the order of the environment-level path and the
user-level path in the Jupyter path hierarchy (e.g., jupyter
--paths). It is considered set if it is a value that is not
one of 'no', 'n', 'off', 'false', '0', or '0.0' (case
insensitive). If you are running Jupyter in multiple virtual
environments as the same user, you will likely want to set
this environment variable.
* Drop Python 2.x and 3.5 support, as they have reached end of
life.
* jupyter --paths --debug now explains the environment
variables that affect the current path list.
* Add conda environment information in jupyter troubleshoot.
* Update _version.version_info and _version.__version__ to
follow Python conventions.
- merge jupyter package as capability into the primary python
package
- fix replacement of paths:
* fix noop introduced by overeager specfile-cleaner for system
paths, adjust use_rpm_paths.patch
* don't replace ENV_CONFIG_PATH or ENV_JUPYTER_PATH because that
would break virtual environments. See also
gh#jupyter/jupyter_core#208
OBS-URL: https://build.opensuse.org/request/show/868748
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-jupyter-core?expand=0&rev=12
2021-02-03 12:33:57 +00:00
|
|
|
# Set the appropriate hardcoded paths dynamically
|
2023-10-07 13:35:18 +00:00
|
|
|
sed -i "s|@_datadir_jupyter_@|%{_datadir}/jupyter|" jupyter_core/paths.py
|
|
|
|
sed -i "s|@_distconfdir_jupyter_@|%{_distconfdir}/jupyter|" jupyter_core/paths.py
|
|
|
|
sed -i "/addopts/,/]/ s/--color=yes//" pyproject.toml
|
2019-11-12 16:43:17 +00:00
|
|
|
|
2022-08-01 18:07:11 +00:00
|
|
|
%if !%{with test}
|
2019-11-12 16:43:17 +00:00
|
|
|
%build
|
2022-08-01 18:07:11 +00:00
|
|
|
%pyproject_wheel
|
|
|
|
%endif
|
2019-11-12 16:43:17 +00:00
|
|
|
|
2020-02-24 17:14:54 +00:00
|
|
|
%if !%{with test}
|
2022-08-01 18:07:11 +00:00
|
|
|
%install
|
|
|
|
%pyproject_install
|
Accepting request 868748 from home:bnavigator:branches:devel:languages:python:jupyter
- Update to 4.7.1
* Allow creating user to delete secure file
- Changelog for 4.7.0
* Add a new JUPYTER_PREFER_ENV_PATH variable, which can be set
to switch the order of the environment-level path and the
user-level path in the Jupyter path hierarchy (e.g., jupyter
--paths). It is considered set if it is a value that is not
one of 'no', 'n', 'off', 'false', '0', or '0.0' (case
insensitive). If you are running Jupyter in multiple virtual
environments as the same user, you will likely want to set
this environment variable.
* Drop Python 2.x and 3.5 support, as they have reached end of
life.
* jupyter --paths --debug now explains the environment
variables that affect the current path list.
* Add conda environment information in jupyter troubleshoot.
* Update _version.version_info and _version.__version__ to
follow Python conventions.
- merge jupyter package as capability into the primary python
package
- fix replacement of paths:
* fix noop introduced by overeager specfile-cleaner for system
paths, adjust use_rpm_paths.patch
* don't replace ENV_CONFIG_PATH or ENV_JUPYTER_PATH because that
would break virtual environments. See also
gh#jupyter/jupyter_core#208
OBS-URL: https://build.opensuse.org/request/show/868748
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-jupyter-core?expand=0&rev=12
2021-02-03 12:33:57 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/jupyter
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/jupyter-migrate
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/jupyter-troubleshoot
|
2019-11-12 16:43:17 +00:00
|
|
|
%{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
|
|
|
|
}
|
Accepting request 868748 from home:bnavigator:branches:devel:languages:python:jupyter
- Update to 4.7.1
* Allow creating user to delete secure file
- Changelog for 4.7.0
* Add a new JUPYTER_PREFER_ENV_PATH variable, which can be set
to switch the order of the environment-level path and the
user-level path in the Jupyter path hierarchy (e.g., jupyter
--paths). It is considered set if it is a value that is not
one of 'no', 'n', 'off', 'false', '0', or '0.0' (case
insensitive). If you are running Jupyter in multiple virtual
environments as the same user, you will likely want to set
this environment variable.
* Drop Python 2.x and 3.5 support, as they have reached end of
life.
* jupyter --paths --debug now explains the environment
variables that affect the current path list.
* Add conda environment information in jupyter troubleshoot.
* Update _version.version_info and _version.__version__ to
follow Python conventions.
- merge jupyter package as capability into the primary python
package
- fix replacement of paths:
* fix noop introduced by overeager specfile-cleaner for system
paths, adjust use_rpm_paths.patch
* don't replace ENV_CONFIG_PATH or ENV_JUPYTER_PATH because that
would break virtual environments. See also
gh#jupyter/jupyter_core#208
OBS-URL: https://build.opensuse.org/request/show/868748
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-jupyter-core?expand=0&rev=12
2021-02-03 12:33:57 +00:00
|
|
|
%python_compileall
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2020-02-24 17:14:54 +00:00
|
|
|
%endif
|
2019-11-12 16:43:17 +00:00
|
|
|
|
2020-02-24 17:14:54 +00:00
|
|
|
%if %{with test}
|
|
|
|
%check
|
2022-12-25 20:40:52 +00:00
|
|
|
# does not work outside venvs: gh#jupyter/jupyter_core#208
|
|
|
|
donttest="test_jupyter_path_prefer_env or test_jupyter_config_path_prefer_env"
|
|
|
|
# we changed the xdg path
|
2023-10-15 15:40:56 +00:00
|
|
|
donttest="$donttest or test_config_dir_linux"
|
|
|
|
# async failure
|
2023-10-15 15:40:20 +00:00
|
|
|
donttest="$donttest or test_ensure_async"
|
2022-12-25 20:40:52 +00:00
|
|
|
%pytest -k "not ($donttest)"
|
2020-02-24 17:14:54 +00:00
|
|
|
%endif
|
|
|
|
|
2021-10-06 09:14:43 +00:00
|
|
|
%pre
|
|
|
|
# If libalternatives is used: Removing old update-alternatives entries.
|
|
|
|
%python_libalternatives_reset_alternative jupyter
|
|
|
|
|
Accepting request 868748 from home:bnavigator:branches:devel:languages:python:jupyter
- Update to 4.7.1
* Allow creating user to delete secure file
- Changelog for 4.7.0
* Add a new JUPYTER_PREFER_ENV_PATH variable, which can be set
to switch the order of the environment-level path and the
user-level path in the Jupyter path hierarchy (e.g., jupyter
--paths). It is considered set if it is a value that is not
one of 'no', 'n', 'off', 'false', '0', or '0.0' (case
insensitive). If you are running Jupyter in multiple virtual
environments as the same user, you will likely want to set
this environment variable.
* Drop Python 2.x and 3.5 support, as they have reached end of
life.
* jupyter --paths --debug now explains the environment
variables that affect the current path list.
* Add conda environment information in jupyter troubleshoot.
* Update _version.version_info and _version.__version__ to
follow Python conventions.
- merge jupyter package as capability into the primary python
package
- fix replacement of paths:
* fix noop introduced by overeager specfile-cleaner for system
paths, adjust use_rpm_paths.patch
* don't replace ENV_CONFIG_PATH or ENV_JUPYTER_PATH because that
would break virtual environments. See also
gh#jupyter/jupyter_core#208
OBS-URL: https://build.opensuse.org/request/show/868748
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-jupyter-core?expand=0&rev=12
2021-02-03 12:33:57 +00:00
|
|
|
%post
|
|
|
|
%python_install_alternative jupyter jupyter-migrate jupyter-troubleshoot
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative jupyter
|
|
|
|
|
2020-02-24 17:14:54 +00:00
|
|
|
%if !%{with test}
|
2019-11-12 16:43:17 +00:00
|
|
|
%files %{python_files}
|
2023-03-19 18:19:41 +00:00
|
|
|
%license LICENSE
|
Accepting request 868748 from home:bnavigator:branches:devel:languages:python:jupyter
- Update to 4.7.1
* Allow creating user to delete secure file
- Changelog for 4.7.0
* Add a new JUPYTER_PREFER_ENV_PATH variable, which can be set
to switch the order of the environment-level path and the
user-level path in the Jupyter path hierarchy (e.g., jupyter
--paths). It is considered set if it is a value that is not
one of 'no', 'n', 'off', 'false', '0', or '0.0' (case
insensitive). If you are running Jupyter in multiple virtual
environments as the same user, you will likely want to set
this environment variable.
* Drop Python 2.x and 3.5 support, as they have reached end of
life.
* jupyter --paths --debug now explains the environment
variables that affect the current path list.
* Add conda environment information in jupyter troubleshoot.
* Update _version.version_info and _version.__version__ to
follow Python conventions.
- merge jupyter package as capability into the primary python
package
- fix replacement of paths:
* fix noop introduced by overeager specfile-cleaner for system
paths, adjust use_rpm_paths.patch
* don't replace ENV_CONFIG_PATH or ENV_JUPYTER_PATH because that
would break virtual environments. See also
gh#jupyter/jupyter_core#208
OBS-URL: https://build.opensuse.org/request/show/868748
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-jupyter-core?expand=0&rev=12
2021-02-03 12:33:57 +00:00
|
|
|
%python_alternative %{_bindir}/jupyter
|
|
|
|
%python_alternative %{_bindir}/jupyter-migrate
|
|
|
|
%python_alternative %{_bindir}/jupyter-troubleshoot
|
2019-11-12 16:43:17 +00:00
|
|
|
%{python_sitelib}/jupyter.py*
|
|
|
|
%pycache_only %{python_sitelib}/__pycache__/jupyter.*.py*
|
|
|
|
%{python_sitelib}/jupyter_core/
|
Accepting request 868748 from home:bnavigator:branches:devel:languages:python:jupyter
- Update to 4.7.1
* Allow creating user to delete secure file
- Changelog for 4.7.0
* Add a new JUPYTER_PREFER_ENV_PATH variable, which can be set
to switch the order of the environment-level path and the
user-level path in the Jupyter path hierarchy (e.g., jupyter
--paths). It is considered set if it is a value that is not
one of 'no', 'n', 'off', 'false', '0', or '0.0' (case
insensitive). If you are running Jupyter in multiple virtual
environments as the same user, you will likely want to set
this environment variable.
* Drop Python 2.x and 3.5 support, as they have reached end of
life.
* jupyter --paths --debug now explains the environment
variables that affect the current path list.
* Add conda environment information in jupyter troubleshoot.
* Update _version.version_info and _version.__version__ to
follow Python conventions.
- merge jupyter package as capability into the primary python
package
- fix replacement of paths:
* fix noop introduced by overeager specfile-cleaner for system
paths, adjust use_rpm_paths.patch
* don't replace ENV_CONFIG_PATH or ENV_JUPYTER_PATH because that
would break virtual environments. See also
gh#jupyter/jupyter_core#208
OBS-URL: https://build.opensuse.org/request/show/868748
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-jupyter-core?expand=0&rev=12
2021-02-03 12:33:57 +00:00
|
|
|
%{python_sitelib}/jupyter_core-%{version}*-info
|
2020-02-24 17:14:54 +00:00
|
|
|
%endif
|
2019-11-12 16:43:17 +00:00
|
|
|
|
|
|
|
%changelog
|