Files
MINGW-packages/mingw-w64-python3-ipython/PKGBUILD
J. Peter Mugaas f50892c3fd mingw-w64-ipython updates and dependencies (#4353)
ipython2-python - 5.3.0 - run ipython with winpty in python-script, ix shebang in pythong so it's tied to user's setup, add jedi and pexpect as dependency
python3-ipython - 6.5.0 - tun ipython with winpty in python-script, fix shebang in pythong so it's tied to user's setup, add jedi and pexpect as dependency
python-pexpect - 4.6.0 - new package required for ipython and probably other stuff
python-jedi - 0.12.1 - new package - required for ipython\
python-paros - 0.3.1 - new package - equired for jedi
2018-09-03 07:22:13 +03:00

75 lines
3.1 KiB
Bash

# Maintainer: Kyle Kauffman <kyle.j.kauffman@gmail.com>
_realname=ipython
pkgbase=mingw-w64-python3-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
pkgver=6.5.0
pkgrel=1
pkgdesc="An enhanced Interactive Python shell (mingw-w64)"
arch=('any')
url="https://ipython.org/"
license=('BSD')
# Mote: prompt_toolkit 2.0 does NOT work with this because
# that API breakage with the 1.x series and the code was not adjusted
depends=('winpty'
"${MINGW_PACKAGE_PREFIX}-sqlite3"
"${MINGW_PACKAGE_PREFIX}-python3-traitlets"
"${MINGW_PACKAGE_PREFIX}-python3-simplegeneric"
"${MINGW_PACKAGE_PREFIX}-python3-pickleshare"
"${MINGW_PACKAGE_PREFIX}-python3-prompt_toolkit<2.0"
"${MINGW_PACKAGE_PREFIX}-python3-win_unicode_console"
"${MINGW_PACKAGE_PREFIX}-python3-backcall"
"${MINGW_PACKAGE_PREFIX}-python3-colorama"
"${MINGW_PACKAGE_PREFIX}-python3-jedi")
optdepends=("${MINGW_PACKAGE_PREFIX}-python3-nose: for IPython's test suite"
"${MINGW_PACKAGE_PREFIX}-python3-pyqt4: for ipython qtconsole"
"${MINGW_PACKAGE_PREFIX}-python3-sip: for ipython qtconsole"
"${MINGW_PACKAGE_PREFIX}-python3-pygments: for ipython qtconsole"
"${MINGW_PACKAGE_PREFIX}-python3-jinja: for ipython notebook"
# "${MINGW_PACKAGE_PREFIX}-haskell-pandoc: ipython notebook conversion"
"${MINGW_PACKAGE_PREFIX}-python3-pyzmq: ipython notebook and ipython qtconcole")
# "${MINGW_PACKAGE_PREFIX}-python3-tornado: for ipython notebook"
makedepends=("${MINGW_PACKAGE_PREFIX}-python3-setuptools")
install=${_realname}3-${CARCH}.install
source=("${_realname}-${pkgver}.tar.gz::https://github.com/ipython/ipython/archive/${pkgver}.tar.gz")
sha256sums=('cea3be089de34171b375d54053f729e97b1f8e1e7626035cbd00e82ebf0c6044')
all_build() {
cd "${srcdir}/${_realname}-${pkgver}"
# see https://github.com/ipython/ipython/issues/2057
#export LC_ALL=en_US.UTF-8
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
${MINGW_PREFIX}/bin/${1} setup.py install \
--prefix=${MINGW_PREFIX} --root=${pkgdir} --optimize=1
find "${pkgdir}/" -name "*.pyc" -delete
find "${pkgdir}/" -type d -empty -delete
# setuptools doesnt see mingw-w64-python's readline
find "${pkgdir}/" -name 'requires.txt' -delete
local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX})
for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*.cmd; do
sed -e "s|${PREFIX_WIN}/bin/||g" -i ${_f}
done
# For the command to work on the bash prompt, you must use
# winpty so include that in the Shebang before the python command.
# I don't like this but what I like really doesn't matter.
for _f in iptest iptest3 ipython ipython3; do
sed -e "s|/usr/bin/env |${MINGW_PREFIX}/|g" \
-e "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" \
-e "s|#!|#!winpty |" -i "${pkgdir}${MINGW_PREFIX}/bin/${_f}"
done
}
package() {
local interpreter=python3
all_build ${interpreter}
install -Dm644 docs/source/about/license_and_copyright.rst "${pkgdir}${MINGW_PREFIX}/share/licenses/ipython/LICENSE"
}