Blob Blame History Raw
Name: ptpython
Version: 0.41
Release: 1%{?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
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: python-jedi >= 0.9.0
Requires: python2-prompt_toolkit >= 1.0.14
Requires: python%{?fedora:2}-pygments
%{?fedora:Suggests: python-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
* 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.