From 5704d025fc2ea1521a09c5cd7a8fff0a7448984a6989cfe513876c59118fd65c Mon Sep 17 00:00:00 2001 From: Todd R Date: Tue, 12 Sep 2017 13:39:38 +0000 Subject: [PATCH] Accepting request 523723 from home:TheBlackCat:branches:devel:languages:python singlespec version of python3-bpython OBS-URL: https://build.opensuse.org/request/show/523723 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-bpython?expand=0&rev=1 --- .gitattributes | 23 ++++++ .gitignore | 1 + bpython-0.16.tar.gz | 3 + python-bpython.changes | 4 + python-bpython.spec | 171 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 202 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 bpython-0.16.tar.gz create mode 100644 python-bpython.changes create mode 100644 python-bpython.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/bpython-0.16.tar.gz b/bpython-0.16.tar.gz new file mode 100644 index 0000000..8e762bd --- /dev/null +++ b/bpython-0.16.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:faf3ddf602bd8ad7f133011778966333b9dcefbc3100df27a200b648906f655f +size 201898 diff --git a/python-bpython.changes b/python-bpython.changes new file mode 100644 index 0000000..49a7f44 --- /dev/null +++ b/python-bpython.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Thu Sep 7 22:41:01 UTC 2017 - toddrme2178@gmail.com + +- initial version diff --git a/python-bpython.spec b/python-bpython.spec new file mode 100644 index 0000000..c1da3f6 --- /dev/null +++ b/python-bpython.spec @@ -0,0 +1,171 @@ +# +# spec file for package python-bpython +# +# Copyright (c) 2017 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.16 +Release: 0 +License: MIT +Summary: Fancy Interface to the Python Interpreter +Url: http://www.bpython-interpreter.org/ +Group: Development/Languages/Python +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: python-curtsies >= 0.1.18 +Requires: python-greenlet +Requires: python-pygments +Requires: python-requests +Requires: python-six >= 1.5 +Requires: %{name}-common = %{version} +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 + +%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