forked from pool/python-bpython
- Update to version 0.17:
* New features:
- gh#bpython/bpython#641: Implement Ctrl+O.
- Add default_autoreload config option.
* Fixes:
- Fix deprecation warnings.
- Do not call signal outside of main thread.
- Fix option-backspace behavior.
- gh#bpython/bpython#648: Fix paste helper.
- gh#bpython/bpython#653: Handle docstrings more carefully.
- gh#bpython/bpython#654: Do not modify history file during
tests.
- gh#bpython/bpython#658: Fix newline handling.
- gh#bpython/bpython#670: Fix handlign of ANSI escape codes.
- gh#bpython/bpython#687: Fix encoding of jedi completions.
OBS-URL: https://build.opensuse.org/request/show/601611
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-bpython?expand=0&rev=3
173 lines
6.4 KiB
RPMSpec
173 lines
6.4 KiB
RPMSpec
#
|
|
# spec file for package python-bpython
|
|
#
|
|
# Copyright (c) 2018 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 http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
%bcond_with test
|
|
Name: python-bpython
|
|
Version: 0.17
|
|
Release: 0
|
|
Summary: Fancy Interface to the Python Interpreter
|
|
License: MIT
|
|
Group: Development/Languages/Python
|
|
Url: http://www.bpython-interpreter.org/
|
|
Source: https://files.pythonhosted.org/packages/source/b/bpython/bpython-%{version}.tar.gz
|
|
BuildRequires: %{python_module Babel}
|
|
BuildRequires: %{python_module Sphinx}
|
|
BuildRequires: %{python_module devel}
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: fdupes
|
|
BuildRequires: hicolor-icon-theme
|
|
BuildRequires: python-rpm-macros
|
|
BuildRequires: update-desktop-files
|
|
%if %{with test}
|
|
BuildRequires: %{python_module curtsies >= 0.1.18}
|
|
BuildRequires: %{python_module greenlet}
|
|
BuildRequires: %{python_module pygments}
|
|
BuildRequires: %{python_module requests}
|
|
BuildRequires: %{python_module six >= 1.5}
|
|
BuildRequires: %{python_module wcwidth}
|
|
BuildRequires: python-mock
|
|
%endif
|
|
Requires: %{name}-common = %{version}
|
|
Requires: python-curtsies >= 0.1.18
|
|
Requires: python-greenlet
|
|
Requires: python-pygments
|
|
Requires: python-requests
|
|
Requires: python-six >= 1.5
|
|
Recommends: python-pyOpenSSL
|
|
Recommends: python-pyasn1
|
|
Recommends: python-ndg-httpsclient
|
|
Recommends: python-jedi
|
|
Recommends: python-urwid
|
|
Recommends: python-watchdog
|
|
Recommends: python-wcwidth
|
|
%ifpython2
|
|
Provides: bpython = %{version}
|
|
Obsoletes: bpython <= %{version}
|
|
%endif
|
|
BuildArch: noarch
|
|
Requires(post): update-alternatives
|
|
Requires(postun): update-alternatives
|
|
|
|
%python_subpackages
|
|
|
|
%description
|
|
Bpython is an enhanced Python interactive interpreter that uses curses
|
|
and provides the following main features: in-line syntax highlighting;
|
|
readline-like autocompletion with suggestions displayed as you type; expected
|
|
argument specification for functions; a handy pastebin function to quickly
|
|
submit your code and return a URL. Its goal is to bring together a few handy
|
|
ideas to enhance the standard interpreter without getting carried away.
|
|
|
|
%package -n %{name}-common
|
|
Provides: %{python_module bpython-common = %{version}}
|
|
Summary: Fancy Interface to the Python Interpreter - common files
|
|
Group: Development/Languages/Python
|
|
|
|
%description -n %{name}-common
|
|
This package contains files shared between the various versions of
|
|
Bpython. You don't need to install this directly, packages that
|
|
require it will pull it in automatically.
|
|
|
|
%package -n %{name}-doc
|
|
Summary: Documentation for %{name}
|
|
Group: Documentation/HTML
|
|
Provides: %{python_module bpython-doc = %{version}}
|
|
|
|
%description -n %{name}-doc
|
|
Documentation and help files for %{name}.
|
|
|
|
%prep
|
|
%setup -q -n bpython-%{version}
|
|
|
|
%build
|
|
%python_build
|
|
%python_exec setup.py build_sphinx && rm build/sphinx/html/.buildinfo # HTML documentation
|
|
|
|
%install
|
|
%python_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
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/bpython
|
|
%python_clone -a %{buildroot}%{_bindir}/bpython-curses
|
|
%python_clone -a %{buildroot}%{_bindir}/bpython-urwid
|
|
%python_clone -a %{buildroot}%{_bindir}/bpdb
|
|
%python_clone -a %{buildroot}%{_mandir}/man1/bpython.1
|
|
%python_clone -a %{buildroot}%{_mandir}/man5/bpython-config.5
|
|
|
|
install -d %{buildroot}%{_mandir}/man1/
|
|
install -d %{buildroot}%{_mandir}/man5/
|
|
|
|
%{python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
cp %{buildroot}%{_datadir}/appdata/bpython.appdata.xml %{buildroot}%{_datadir}/appdata/bpython-%{$python_bin_suffix}.appdata.xml
|
|
cp %{buildroot}%{_datadir}/applications/bpython.desktop %{buildroot}%{_datadir}/applications/bpython-%{$python_bin_suffix}.desktop
|
|
|
|
sed -i 's|bpython.desktop|bpython-%{$python_bin_suffix}.desktop|' %{buildroot}%{_datadir}/appdata/bpython-%{$python_bin_suffix}.appdata.xml
|
|
sed -i 's|bpython interpreter|bpython %{$python_prefix} interpreter|' %{buildroot}%{_datadir}/appdata/bpython-%{$python_bin_suffix}.appdata.xml
|
|
sed -i 's|Python interpreter|A %{$python_prefix} interpreter|' %{buildroot}%{_datadir}/appdata/bpython-%{$python_bin_suffix}.appdata.xml
|
|
desktop-file-edit --set-name=bpython-%{$python_bin_suffix} \
|
|
--copy-name-to-generic-name \
|
|
--remove-key=Categories \
|
|
--add-category=System --add-category=TerminalEmulator \
|
|
--set-comment="A fancy interface to the %{$python_prefix} interpreter" \
|
|
--set-key=Exec --set-value="%{_bindir}/bpython-%{$python_bin_suffix}" \
|
|
%{buildroot}%{_datadir}/applications/bpython-%{$python_bin_suffix}.desktop
|
|
}
|
|
|
|
rm %{buildroot}%{_datadir}/appdata/bpython.appdata.xml
|
|
rm %{buildroot}%{_datadir}/applications/bpython.desktop
|
|
|
|
%if %{with test}
|
|
%check
|
|
%python_exec setup.py test
|
|
%endif
|
|
|
|
%post
|
|
%{python_install_alternative bpython bpython-curses bpython-urwid bpdb bpython.1%ext_man bpython-config.5%ext_man}
|
|
|
|
%postun
|
|
%python_uninstall_alternative bpython
|
|
|
|
%files %{python_files}
|
|
%defattr(-,root,root,-)
|
|
%doc AUTHORS CHANGELOG LICENSE README.rst
|
|
%{python_sitelib}/*
|
|
%python_alternative %{_bindir}/bpython
|
|
%python_alternative %{_bindir}/bpython-curses
|
|
%python_alternative %{_bindir}/bpython-urwid
|
|
%python_alternative %{_bindir}/bpdb
|
|
%python_alternative %{_mandir}/man1/bpython.1%ext_man
|
|
%python_alternative %{_mandir}/man5/bpython-config.5%ext_man
|
|
%dir %{_datadir}/appdata/
|
|
%{_datadir}/appdata/bpython-%{python_bin_suffix}.appdata.xml
|
|
%{_datadir}/applications/bpython-%{python_bin_suffix}.desktop
|
|
|
|
%files -n %{name}-common
|
|
%defattr(-,root,root,-)
|
|
%doc LICENSE
|
|
%{_datadir}/pixmaps/bpython.png
|
|
|
|
%files -n %{name}-doc
|
|
%defattr(-,root,root)
|
|
%doc build/sphinx/html
|
|
|
|
%changelog
|