- Add stdlib-typing_extensions.patch which removes dependency on
typing_extensions package (gh#bokeh/bokeh#11307). OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-bokeh?expand=0&rev=42
This commit is contained in:
parent
c14fb370de
commit
d60d662a44
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri May 28 16:02:43 UTC 2021 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
- Add stdlib-typing_extensions.patch which removes dependency on
|
||||||
|
typing_extensions package (gh#bokeh/bokeh#11307).
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Feb 27 11:27:05 UTC 2021 - Michael Ströder <michael@stroeder.com>
|
Sat Feb 27 11:27:05 UTC 2021 - Michael Ströder <michael@stroeder.com>
|
||||||
|
|
||||||
|
@ -28,6 +28,9 @@ Summary: Statistical interactive HTML plots for Python
|
|||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
URL: https://github.com/bokeh/bokeh/
|
URL: https://github.com/bokeh/bokeh/
|
||||||
Source: https://files.pythonhosted.org/packages/source/b/bokeh/bokeh-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/b/bokeh/bokeh-%{version}.tar.gz
|
||||||
|
# PATCH-FEATURE-UPSTREAM stdlib-typing_extensions.patch gh#bokeh/bokeh#11307 mcepl@suse.com
|
||||||
|
# Removes dependency on the external package typing_extensions
|
||||||
|
Patch0: stdlib-typing_extensions.patch
|
||||||
BuildRequires: %{python_module Jinja2 >= 2.7}
|
BuildRequires: %{python_module Jinja2 >= 2.7}
|
||||||
BuildRequires: %{python_module Pillow >= 7.1.0}
|
BuildRequires: %{python_module Pillow >= 7.1.0}
|
||||||
BuildRequires: %{python_module PyYAML >= 3.10}
|
BuildRequires: %{python_module PyYAML >= 3.10}
|
||||||
@ -36,7 +39,6 @@ BuildRequires: %{python_module numpy >= 1.11.3}
|
|||||||
BuildRequires: %{python_module packaging >= 16.8}
|
BuildRequires: %{python_module packaging >= 16.8}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: %{python_module tornado >= 5.1}
|
BuildRequires: %{python_module tornado >= 5.1}
|
||||||
BuildRequires: %{python_module typing_extensions >= 3.7.4}
|
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
# SECTION test requirements
|
# SECTION test requirements
|
||||||
@ -58,9 +60,8 @@ Requires: python-numpy >= 1.11.3
|
|||||||
Requires: python-packaging >= 16.8
|
Requires: python-packaging >= 16.8
|
||||||
Requires: python-python-dateutil >= 2.1
|
Requires: python-python-dateutil >= 2.1
|
||||||
Requires: python-tornado >= 5.1
|
Requires: python-tornado >= 5.1
|
||||||
Requires: python-typing_extensions >= 3.7.4
|
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(postun): update-alternatives
|
Requires(postun):update-alternatives
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
@ -71,7 +72,7 @@ graphics in the style of D3.js, and favors delivering this capability
|
|||||||
with interactivity over large or streaming datasets.
|
with interactivity over large or streaming datasets.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n bokeh-%{version}
|
%autosetup -p1 -n bokeh-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
@ -90,7 +91,7 @@ with interactivity over large or streaming datasets.
|
|||||||
|
|
||||||
%if %{with tests}
|
%if %{with tests}
|
||||||
%check
|
%check
|
||||||
# Running the test suite (with datafiles from the GitHub archive) fails
|
# Running the test suite (with datafiles from the GitHub archive) fails
|
||||||
# due to missing server/client setups, chromedriver, selenium etc.
|
# due to missing server/client setups, chromedriver, selenium etc.
|
||||||
%pytest --no-js
|
%pytest --no-js
|
||||||
%endif
|
%endif
|
||||||
|
109
stdlib-typing_extensions.patch
Normal file
109
stdlib-typing_extensions.patch
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
---
|
||||||
|
bokeh/io/webdriver.py | 3 +--
|
||||||
|
bokeh/models/tools.py | 11 +++++------
|
||||||
|
bokeh/plotting/_tools.py | 4 +---
|
||||||
|
bokeh/util/browser.py | 5 +----
|
||||||
|
setup.py | 1 -
|
||||||
|
5 files changed, 8 insertions(+), 16 deletions(-)
|
||||||
|
|
||||||
|
--- a/bokeh/io/webdriver.py
|
||||||
|
+++ b/bokeh/io/webdriver.py
|
||||||
|
@@ -28,12 +28,11 @@ import atexit
|
||||||
|
import os
|
||||||
|
from os.path import devnull, dirname, isfile, join
|
||||||
|
from shutil import which
|
||||||
|
-from typing import List, Optional
|
||||||
|
+from typing import List, Literal, Optional
|
||||||
|
|
||||||
|
# External imports
|
||||||
|
from selenium import webdriver
|
||||||
|
from selenium.webdriver.remote.webdriver import WebDriver
|
||||||
|
-from typing_extensions import Literal
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
|
# Globals and constants
|
||||||
|
--- a/bokeh/models/tools.py
|
||||||
|
+++ b/bokeh/models/tools.py
|
||||||
|
@@ -40,7 +40,6 @@ log = logging.getLogger(__name__)
|
||||||
|
# Standard library imports
|
||||||
|
import difflib
|
||||||
|
import typing as tp
|
||||||
|
-from typing_extensions import Literal
|
||||||
|
|
||||||
|
# Bokeh imports
|
||||||
|
from ..core.enums import (
|
||||||
|
@@ -287,25 +286,25 @@ class Toolbar(ToolbarBase):
|
||||||
|
|
||||||
|
'''
|
||||||
|
|
||||||
|
- active_drag: tp.Union[Literal["auto"], Drag, None] = Either(Null, Auto, Instance(Drag), default="auto", help="""
|
||||||
|
+ active_drag: tp.Union[tp.Literal["auto"], Drag, None] = Either(Null, Auto, Instance(Drag), default="auto", help="""
|
||||||
|
Specify a drag tool to be active when the plot is displayed.
|
||||||
|
""")
|
||||||
|
|
||||||
|
- active_inspect: tp.Union[Literal["auto"], InspectTool, tp.Sequence[InspectTool], None] = \
|
||||||
|
+ active_inspect: tp.Union[tp.Literal["auto"], InspectTool, tp.Sequence[InspectTool], None] = \
|
||||||
|
Either(Null, Auto, Instance(InspectTool), Seq(Instance(InspectTool)), default="auto", help="""
|
||||||
|
Specify an inspection tool or sequence of inspection tools to be active when
|
||||||
|
the plot is displayed.
|
||||||
|
""")
|
||||||
|
|
||||||
|
- active_scroll: tp.Union[Literal["auto"], Scroll, None] = Either(Null, Auto, Instance(Scroll), default="auto", help="""
|
||||||
|
+ active_scroll: tp.Union[tp.Literal["auto"], Scroll, None] = Either(Null, Auto, Instance(Scroll), default="auto", help="""
|
||||||
|
Specify a scroll/pinch tool to be active when the plot is displayed.
|
||||||
|
""")
|
||||||
|
|
||||||
|
- active_tap: tp.Union[Literal["auto"], Tap, None] = Either(Null, Auto, Instance(Tap), default="auto", help="""
|
||||||
|
+ active_tap: tp.Union[tp.Literal["auto"], Tap, None] = Either(Null, Auto, Instance(Tap), default="auto", help="""
|
||||||
|
Specify a tap/click tool to be active when the plot is displayed.
|
||||||
|
""")
|
||||||
|
|
||||||
|
- active_multi: tp.Union[Literal["auto"], GestureTool, None] = Nullable(Instance(GestureTool), help="""
|
||||||
|
+ active_multi: tp.Union[tp.Literal["auto"], GestureTool, None] = Nullable(Instance(GestureTool), help="""
|
||||||
|
Specify an active multi-gesture tool, for instance an edit tool or a range
|
||||||
|
tool.
|
||||||
|
|
||||||
|
--- a/bokeh/plotting/_tools.py
|
||||||
|
+++ b/bokeh/plotting/_tools.py
|
||||||
|
@@ -24,6 +24,7 @@ from typing import (
|
||||||
|
Dict,
|
||||||
|
Iterator,
|
||||||
|
List,
|
||||||
|
+ Literal,
|
||||||
|
NamedTuple,
|
||||||
|
Optional,
|
||||||
|
Sequence,
|
||||||
|
@@ -32,9 +33,6 @@ from typing import (
|
||||||
|
cast,
|
||||||
|
)
|
||||||
|
|
||||||
|
-# External imports
|
||||||
|
-from typing_extensions import Literal
|
||||||
|
-
|
||||||
|
# Bokeh imports
|
||||||
|
from ..models import HoverTool, Plot, Tool, Toolbar
|
||||||
|
from ..models.tools import Drag, InspectTool, Scroll, Tap
|
||||||
|
--- a/bokeh/util/browser.py
|
||||||
|
+++ b/bokeh/util/browser.py
|
||||||
|
@@ -21,10 +21,7 @@ log = logging.getLogger(__name__)
|
||||||
|
# Standard library imports
|
||||||
|
import webbrowser
|
||||||
|
from os.path import abspath
|
||||||
|
-from typing import Optional, cast
|
||||||
|
-
|
||||||
|
-# External imports
|
||||||
|
-from typing_extensions import Literal, Protocol
|
||||||
|
+from typing import Literal, Optional, Protocol, cast
|
||||||
|
|
||||||
|
# Bokeh imports
|
||||||
|
from ..settings import settings
|
||||||
|
--- a/setup.py
|
||||||
|
+++ b/setup.py
|
||||||
|
@@ -92,7 +92,6 @@ REQUIRES = [
|
||||||
|
'pillow >=7.1.0',
|
||||||
|
'packaging >=16.8',
|
||||||
|
'tornado >=5.1',
|
||||||
|
- 'typing_extensions >=3.7.4',
|
||||||
|
]
|
||||||
|
|
||||||
|
# if this is just conda-build skimming information, skip all this actual work
|
Loading…
Reference in New Issue
Block a user