AUR (en) - ptpython
potatoe commented on 2020-02-01 16:39
yodaembedding commented on 2020-01-19 09:58
My personal workaround:
ROOT="$HOME/.cache/custom_pkgs"
mkdir -p "$ROOT"
cd "$ROOT"
git clone https://github.com/jonathanslenders/ptpython
cd ptpython
virtualenv env --system-site-packages
source env/bin/activate
python setup.py install
Now I create a script in SCRIPT_PATH, which is accessible from my PATH:
SCRIPT_PATH=~/.local/bin/ptpython
echo "#!/bin/bash
source '$ROOT/ptpython/env/bin/activate'
python -m ptpython" > "$SCRIPT_PATH"
chmod +x "$SCRIPT_PATH"
potatoe commented on 2019-12-07 17:13
lrustand commented on 2019-12-02 15:51
I get an error when starting ptpython "The 'prompt_toolkit<2.1.0,>=2.0.8' distribution was not found and is required by ptpython". The current version of python-prompt_toolkit in community is 3.0.2-1. Could you update the version requirement so it works with the current version of prompt toolkit?
pepper_chico commented on 2018-12-01 00:44
@wbthomason, right thanks!, it was a matter of patching my old ~/.ptpython/config.py, changing input_processor to key_processor.
wbthomason commented on 2018-11-30 21:23
@pepper_chico: You probably need to modify your ptpython config; that module doesn't exist with prompt_toolkit-2 (I'm unfortunately not sure what the replacement is). When you use the ptpython setup wizard, it imports that module in your config to set up vi mode.
pepper_chico commented on 2018-11-30 15:55
I get "No module named 'prompt_toolkit.key_binding.input_processor'" when starting. Can't use it vi mode.
kseistrup commented on 2018-11-20 11:34
There is now
community/python2-prompt_toolkit 2.0.7-1
Could you please change dependency of
python2-prompt_toolkit-2>=2.0.6
?
wbthomason commented on 2018-11-15 03:35
@bartus: Good idea. For now, I just modified the PKGBUILD for ipython and ipython2 and jupyter_console to work with prompt_toolkit v2 instead.
bartus commented on 2018-11-14 16:05
@wbthomason: Just poke the maintainers of community repo to update ipython 6.5->7.1 ;) which uses prompt_toolkit v2.*
Can't flag-notify this, but it looks like ptpython 3.0.0 was just released January 29th: https://pypi.org/project/ptpython/3.0.0/ -- It seems to build fine with just an update of the new download URL and hash!
It looks like support for python2 has been dropped, so the PKGBUILD can be simplified a bit. I suppose if anyone still wants a package for python2 you could clone this current version as a separate ptpython2 AUR package that's left pegged to 2.0.5 (or 2.0.6 if you want working ipython support) and then update this to be python 3 only.