- Fix failing tests:
- typing_extensions.patch (post Python 3.8 we don't need
typing_extensions package at all)
- syntaxerror_failing_test.patch (This is actually fixed in the
post-0.22.1 development, but waiting on it.)
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-bpython?expand=0&rev=20
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%define skip_python2 1
|
||||
%bcond_with test
|
||||
%bcond_without test
|
||||
Name: python-bpython
|
||||
Version: 0.22.1
|
||||
Release: 0
|
||||
@@ -26,9 +26,17 @@ Summary: Fancy Interface to the Python Interpreter
|
||||
License: MIT
|
||||
URL: https://www.bpython-interpreter.org/
|
||||
Source: https://files.pythonhosted.org/packages/source/b/bpython/bpython-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM typing_extensions.patch gh#bpython/bpython#940 mcepl@suse.com
|
||||
# We actually don't need typing_extensions (all objects are in 3.8+)
|
||||
Patch0: typing_extensions.patch
|
||||
# PATCH-FIX-UPSTREAM syntaxerror_failing_test.patch gh#bpython/bpython#952 mcepl@suse.com
|
||||
# This is actually fixed in the post-0.22.1 development, but waiting on it.
|
||||
Patch1: syntaxerror_failing_test.patch
|
||||
BuildRequires: %{python_module Babel}
|
||||
BuildRequires: %{python_module Sphinx}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: hicolor-icon-theme
|
||||
BuildRequires: python-rpm-macros
|
||||
@@ -54,10 +62,10 @@ BuildArch: noarch
|
||||
BuildRequires: %{python_module curtsies >= 0.3.5}
|
||||
BuildRequires: %{python_module greenlet}
|
||||
BuildRequires: %{python_module pygments}
|
||||
BuildRequires: %{python_module pyxdg}
|
||||
BuildRequires: %{python_module requests}
|
||||
BuildRequires: %{python_module six >= 1.5}
|
||||
BuildRequires: %{python_module wcwidth}
|
||||
BuildRequires: python-mock
|
||||
%endif
|
||||
%ifpython2
|
||||
Provides: bpython = %{version}
|
||||
@@ -90,14 +98,14 @@ Provides: %{python_module bpython-doc = %{version}}
|
||||
Documentation and help files for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q -n bpython-%{version}
|
||||
%autosetup -p1 -n bpython-%{version}
|
||||
|
||||
%build
|
||||
%python_build
|
||||
%pyproject_wheel
|
||||
%python_exec setup.py build_sphinx && rm build/sphinx/html/.buildinfo # HTML documentation
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%pyproject_install
|
||||
|
||||
install -m 644 build/man/bpython.1 %{buildroot}%{_mandir}/man1/bpython.1
|
||||
install -m 644 build/man/bpython-config.5 %{buildroot}%{_mandir}/man5/bpython-config.5
|
||||
@@ -134,7 +142,7 @@ rm %{buildroot}%{_datadir}/applications/org.bpython-interpreter.bpython.desktop
|
||||
|
||||
%if %{with test}
|
||||
%check
|
||||
%python_exec setup.py test
|
||||
%pyunittest discover -v
|
||||
%endif
|
||||
|
||||
%post
|
||||
@@ -150,8 +158,8 @@ rm %{buildroot}%{_datadir}/applications/org.bpython-interpreter.bpython.desktop
|
||||
%{python_sitelib}/bpython/*
|
||||
%dir %{python_sitelib}/bpdb
|
||||
%{python_sitelib}/bpdb/*
|
||||
%dir %{python_sitelib}/bpython-%{version}-py*.egg-info
|
||||
%{python_sitelib}/bpython-%{version}-py*.egg-info/*
|
||||
%dir %{python_sitelib}/bpython-%{version}-*-info
|
||||
%{python_sitelib}/bpython-%{version}-*-info/*
|
||||
%python_alternative %{_bindir}/bpython
|
||||
%python_alternative %{_bindir}/bpython-curses
|
||||
%python_alternative %{_bindir}/bpython-urwid
|
||||
|
||||
Reference in New Issue
Block a user