Blob Blame History Raw
Name: ptpython
Version: 0.41
Release: 8%{?dist}
Summary: Python REPL build on top of prompt_toolkit
License: BSD
URL: https://github.com/jonathanslenders/ptpython
Source0: https://files.pythonhosted.org/packages/source/p/ptpython/ptpython-%{version}.tar.gz
Patch0: create-minor-version-entry-point.patch
# https://github.com/jonathanslenders/ptpython/pull/250
Patch1: switch-from-asyncio-async-to-asyncio-ensure_future.patch
BuildArch: noarch


%description
Ptpython is an advanced Python REPL built on top of the prompt_toolkit library.
It features syntax highlighting, multiline editing (the up arrow works),
autocompletion, mouse support, support for color schemes, support for bracketed
paste, both Vi and Emacs key bindings, support for double width (Chinese)
characters, and many other things.


%package -n ptpython2
Summary: %{summary}
BuildRequires: python2-devel
BuildRequires: python%{?fedora:2}-setuptools
Requires: python%{?fedora:2}-docopt
Requires: python2-jedi >= 0.9.0
Requires: python2-prompt_toolkit >= 1.0.14
Requires: python%{?fedora:2}-pygments
%{?fedora:Suggests: python2-ipython-console}
Provides: ptpython = %{version}-%{release}
Provides: python2-ptpython = %{version}-%{release}
%{?python_provide:%python_provide python2-ptpython}


%description -n ptpython2
Ptpython is an advanced Python REPL built on top of the prompt_toolkit library.
It features syntax highlighting, multiline editing (the up arrow works),
autocompletion, mouse support, support for color schemes, support for bracketed
paste, both Vi and Emacs key bindings, support for double width (Chinese)
characters, and many other things.


%if 0%{?fedora}
%package -n ptpython3
Summary: %{summary}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
Requires: python3-docopt
Requires: python3-jedi >= 0.9.0
Requires: python3-prompt_toolkit >= 1.0.14
Requires: python3-pygments
Suggests: python3-ipython-console
Provides: python3-ptpython = %{version}-%{release}
%{?python_provide:%python_provide python3-ptpython}


%description -n ptpython3
Ptpython is an advanced Python REPL built on top of the prompt_toolkit library.
It features syntax highlighting, multiline editing (the up arrow works),
autocompletion, mouse support, support for color schemes, support for bracketed
paste, both Vi and Emacs key bindings, support for double width (Chinese)
characters, and many other things.
%endif


%prep
%autosetup -p1

find -name \*.py | xargs sed -i -e '1 {/^#!\//d}'


%build
%py2_build
%{?fedora:%py3_build}


%install
%{?fedora:%py3_install}
%py2_install


%files -n ptpython2
%license LICENSE
%doc CHANGELOG README.rst
%{python2_sitelib}/ptpython*
%{_bindir}/ptpython
%{_bindir}/ptpython2
%{_bindir}/ptpython%{python2_version}
%{_bindir}/ptipython
%{_bindir}/ptipython2
%{_bindir}/ptipython%{python2_version}


%if 0%{?fedora}
%files -n ptpython3
%license LICENSE
%doc CHANGELOG README.rst
%{python3_sitelib}/ptpython*
%{_bindir}/ptpython3
%{_bindir}/ptpython%{python3_version}
%{_bindir}/ptipython3
%{_bindir}/ptipython%{python3_version}
%endif


%changelog
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.41-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Tue Jun 19 2018 Carl George <carl@george.computer> - 0.41-7
- Add patch1 to fix Python 3.7 build (upstream #250)

* Tue Jun 19 2018 Miro HronĨok <mhroncok@redhat.com> - 0.41-6
- Rebuilt for Python 3.7

* Wed Feb 21 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.41-5
- Update Python 2 dependency declarations to new packaging standards
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.41-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Tue Nov 28 2017 Carl George <carl@george.computer> - 0.41-3
- Re-rebuild for F27

* Mon Sep 25 2017 Carl George <carl@george.computer> - 0.41-2
- Require python2-jedi

* Thu Jul 27 2017 Carl George <carl@george.computer> - 0.41-1
- Latest upstream

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.39-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Tue May 02 2017 Carl George <carl.george@rackspace.com> - 0.39-1
- Latest upstream
- Add patch0 to undo https://github.com/jonathanslenders/ptpython/commit/16e4e31

* Sat Mar 18 2017 Carl George <carl.george@rackspace.com> - 0.36-1
- Initial package.