From d52187c50b2ddf5372d8000ddc908ecc2bc062515b3cc44af32d3e9f80dc1a95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 24 Mar 2020 09:45:13 +0000 Subject: [PATCH] Accepting request 787713 from home:pgajdos:python - version update to 3.0.1 - Fix backwards-compatibility of the `run_config` function. (used by django-extensions). - Fix input mode in status bar for block selection. - Upgrade to prompt_toolkit 3.0. - Requires at least Python 3.6. - Uses XDG base directory specification. - Added dictionary completer (off by default). - Added fuzzy completion (off by default). - Highlight keywords in completion dropdown menu. - Enable universal wheels. - Fixed embedding repl as asyncio coroutine. - Fixed patching stdout in embedded repl. - Fixed ResourceWarning in setup.py. OBS-URL: https://build.opensuse.org/request/show/787713 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ptpython?expand=0&rev=13 --- ptpython-2.0.4.tar.gz | 3 -- ptpython-3.0.1.tar.gz | 3 ++ python-ptpython.changes | 18 ++++++++++++ python-ptpython.spec | 64 +++++++++++++++++++++++++---------------- 4 files changed, 60 insertions(+), 28 deletions(-) delete mode 100644 ptpython-2.0.4.tar.gz create mode 100644 ptpython-3.0.1.tar.gz diff --git a/ptpython-2.0.4.tar.gz b/ptpython-2.0.4.tar.gz deleted file mode 100644 index d131129..0000000 --- a/ptpython-2.0.4.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ebe9d68ea7532ec8ab306d4bdc7ec393701cd9bbd6eff0aa3067c821f99264d4 -size 43284 diff --git a/ptpython-3.0.1.tar.gz b/ptpython-3.0.1.tar.gz new file mode 100644 index 0000000..d75ea56 --- /dev/null +++ b/ptpython-3.0.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a69cce0aa04f0075e2e65287a0ee2f3a928c0591b301ce22aa2e498af1ebcb4b +size 397521 diff --git a/python-ptpython.changes b/python-ptpython.changes index 60c89fd..4c460d0 100644 --- a/python-ptpython.changes +++ b/python-ptpython.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Tue Mar 24 07:39:09 UTC 2020 - pgajdos@suse.com + +- version update to 3.0.1 + - Fix backwards-compatibility of the `run_config` function. (used by + django-extensions). + - Fix input mode in status bar for block selection. + - Upgrade to prompt_toolkit 3.0. + - Requires at least Python 3.6. + - Uses XDG base directory specification. + - Added dictionary completer (off by default). + - Added fuzzy completion (off by default). + - Highlight keywords in completion dropdown menu. + - Enable universal wheels. + - Fixed embedding repl as asyncio coroutine. + - Fixed patching stdout in embedded repl. + - Fixed ResourceWarning in setup.py. + ------------------------------------------------------------------- Mon Jun 3 17:04:50 UTC 2019 - Todd R diff --git a/python-ptpython.spec b/python-ptpython.spec index 0000cc9..2e96cf3 100644 --- a/python-ptpython.spec +++ b/python-ptpython.spec @@ -1,7 +1,7 @@ # # spec file for package python-ptpython # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,44 +17,45 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%define skip_python2 1 Name: python-ptpython -Version: 2.0.4 +Version: 3.0.1 Release: 0 Summary: Python REPL build on top of prompt_toolkit License: ISC Group: Development/Languages/Python -Url: https://github.com/jonathanslenders/ptpython +URL: https://github.com/jonathanslenders/ptpython Source: https://files.pythonhosted.org/packages/source/p/ptpython/ptpython-%{version}.tar.gz BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros -# SECTION test requirements -BuildRequires: %{python_module Pygments} -BuildRequires: %{python_module docopt} -BuildRequires: %{python_module jedi >= 0.9.0} -BuildRequires: %{python_module prompt_toolkit >= 2.0.6} -# /SECTION Requires: python-Pygments +Requires: python-appdirs Requires: python-docopt Requires: python-jedi >= 0.9.0 -Requires: python-prompt_toolkit >= 2.0.6 -%ifpython3 -Recommends: python3-ptpython-ptipython -%endif +Requires: python-prompt_toolkit >= 3.0.0 BuildArch: noarch - +# SECTION test requirements +BuildRequires: %{python_module Pygments} +BuildRequires: %{python_module appdirs} +BuildRequires: %{python_module docopt} +BuildRequires: %{python_module ipython} +BuildRequires: %{python_module jedi >= 0.9.0} +BuildRequires: %{python_module prompt_toolkit >= 3.0.0} +# /SECTION +Recommends: python-ptpython-ptipython %python_subpackages %description Ptpython is an advanced Python REPL. -%package -n python3-ptpython-ptipython +%package ptipython Summary: Python REPL build on top of prompt_toolkit - IPython support Group: Development/Languages/Python -Requires: python3-ipython -Requires: python3-ptpython +Requires: python-ipython +Requires: python-ptpython -%description -n python3-ptpython-ptipython +%description ptipython Ptpython is an advanced Python REPL. This package provides IPython support to Ptpython. @@ -69,20 +70,33 @@ sed -i -e '/^#!\//, 1d' ptpython/entry_points/run_*.py %install %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} +rm %{buildroot}%{_bindir}/pt{,i}python?* +%python_clone -a %{buildroot}%{_bindir}/ptpython +%python_clone -a %{buildroot}%{_bindir}/ptipython -rm %{buildroot}%{_bindir}/ptpython -rm %{buildroot}%{_bindir}/ptipython -rm %{buildroot}%{_bindir}/ptipython2* +%post +%python_install_alternative ptpython + +%post ptipython +%python_install_alternative ptipython + +%postun +%python_uninstall_alternative ptpython + +%postun ptipython +%python_uninstall_alternative ptipython + +%check +# no upstream tests under tests/ %files %{python_files} %doc CHANGELOG README.rst %license LICENSE -%python2_only %{_bindir}/ptpython2* -%python3_only %{_bindir}/ptpython3* %{python_sitelib}/* +%python_alternative %{_bindir}/ptpython -%files -n python3-ptpython-ptipython +%files %{python_files ptipython} %license LICENSE -%{_bindir}/ptipython3* +%python_alternative %{_bindir}/ptipython %changelog