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
This commit is contained in:
J. Peter Mugaas
2018-09-03 00:22:13 -04:00
committed by Алексей
parent aed18dfe28
commit f50892c3fd
11 changed files with 467 additions and 20 deletions

View File

@@ -0,0 +1,118 @@
# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>
_realname=jedi
pkgbase=mingw-w64-python-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
pkgver=0.12.1
pkgrel=1
pkgdesc="Awesome autocompletion for python (mingw-w64)"
arch=('any')
url='https://github.com/davidhalter/jedi'
license=('MIT')
makedepends=("${MINGW_PACKAGE_PREFIX}-python2"
"${MINGW_PACKAGE_PREFIX}-python3"
"${MINGW_PACKAGE_PREFIX}-python3-parso"
"${MINGW_PACKAGE_PREFIX}-python2-parso"
"${MINGW_PACKAGE_PREFIX}-python3-setuptools"
"${MINGW_PACKAGE_PREFIX}-python2-setuptools")
checkdepends=("${MINGW_PACKAGE_PREFIX}-python3-pytest"
"${MINGW_PACKAGE_PREFIX}-python2-pytest")
options=('staticlibs' 'strip' '!debug')
source=("${_realname}-$pkgver.tar.gz"::"https://github.com/davidhalter/jedi/archive/v$pkgver.tar.gz")
sha256sums=('06adf7f28e25cb6bf5f2bce19307199833bd9bedae7dd61e3e8c5fc7a74eb647')
# Helper macros to help make tasks easier #
apply_patch_with_msg() {
for _patch in "$@"
do
msg2 "Applying $_patch"
patch -Nbp1 -i "${srcdir}/$_patch"
done
}
del_file_exists() {
for _fname in "$@"
do
if [ -f $_fname ]; then
rm -rf $_fname
fi
done
}
# =========================================== #
prepare() {
cd "${srcdir}"
# pushd "${_realname}-${pkgver}"
# apply_patch_with_msg 0001-A-really-important-fix.patch \
# 0002-A-less-important-fix.patch
# popd
for builddir in python{2,3}-build-${CARCH}; do
rm -rf ${builddir} | true
cp -r "${_realname}-${pkgver}" "${builddir}"
done
# Set version for setuptools_scm
export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
}
# Note that build() is sometimes skipped because it's done in
# the packages setup.py install for simplicity if you can do so.
# but sometimes, you want to do a check before install which would
# also trigger the build.
build() {
for pver in {2,3}; do
msg "Python ${pver} build for ${CARCH}"
cd "${srcdir}/python${pver}-build-${CARCH}"
${MINGW_PREFIX}/bin/python${pver} setup.py build
done
}
check() {
# msg "Python 2 test for ${CARCH}"
# cd "${srcdir}/python2-build-${CARCH}"
# ${MINGW_PREFIX}/bin/pytest2 test || warning 'Ignoring test_pyc failure'
msg "Python 3 test for ${CARCH}"
cd "${srcdir}/python3-build-${CARCH}"
${MINGW_PREFIX}/bin/pytest test || warning 'Ignoring test_pyc failure'
}
package_python3-jedi() {
depends=("${MINGW_PACKAGE_PREFIX}-python3"
"${MINGW_PACKAGE_PREFIX}-python3-parso" )
cd "${srcdir}/python3-build-${CARCH}"
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} \
--root="${pkgdir}" --optimize=1 --skip-build
install -Dm644 LICENSE.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE.txt"
}
package_python2-jedi() {
depends=("${MINGW_PACKAGE_PREFIX}-python2"
"${MINGW_PACKAGE_PREFIX}-python2-parso")
cd "${srcdir}/python2-build-${CARCH}"
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} \
--root="${pkgdir}" --optimize=1 --skip-build
install -Dm644 LICENSE.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE.txt"
}
package_mingw-w64-i686-python2-jedi() {
package_python2-jedi
}
package_mingw-w64-i686-python3-jedi() {
package_python3-jedi
}
package_mingw-w64-x86_64-python2-jedi() {
package_python2-jedi
}
package_mingw-w64-x86_64-python3-jedi() {
package_python3-jedi
}

View File

@@ -0,0 +1,113 @@
# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>
_realname=parso
pkgbase=mingw-w64-python-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
pkgver=0.3.1
pkgrel=1
pkgdesc="Python parser that supports error recovery and round-trip parsing for different Python versions (mingw-w64)"
arch=('any')
url='https://www.parso.org/'
license=('MIT')
makedepends=("${MINGW_PACKAGE_PREFIX}-python3"
"${MINGW_PACKAGE_PREFIX}-python2"
"${MINGW_PACKAGE_PREFIX}-python3-setuptools"
"${MINGW_PACKAGE_PREFIX}-python2-setuptools")
checkdepends=("${MINGW_PACKAGE_PREFIX}-python3-pytest"
"${MINGW_PACKAGE_PREFIX}-python2-pytest")
options=('staticlibs' 'strip' '!debug')
source=("${_realname}-$pkgver.tar.gz"::"https://github.com/davidhalter/parso/archive/v$pkgver.tar.gz")
sha256sums=('123485ea6b5b8b782535fd97d65ab647b98e34329bdf88f66d81d80f25784098')
# Helper macros to help make tasks easier #
apply_patch_with_msg() {
for _patch in "$@"
do
msg2 "Applying $_patch"
patch -Nbp1 -i "${srcdir}/$_patch"
done
}
del_file_exists() {
for _fname in "$@"
do
if [ -f $_fname ]; then
rm -rf $_fname
fi
done
}
# =========================================== #
prepare() {
cd "${srcdir}"
# pushd "${_realname}-${pkgver}"
# apply_patch_with_msg 0001-A-really-important-fix.patch \
# 0002-A-less-important-fix.patch
# popd
for builddir in python{2,3}-build-${CARCH}; do
rm -rf ${builddir} | true
cp -r "${_realname}-${pkgver}" "${builddir}"
done
# Set version for setuptools_scm
export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
}
# Note that build() is sometimes skipped because it's done in
# the packages setup.py install for simplicity if you can do so.
# but sometimes, you want to do a check before install which would
# also trigger the build.
build() {
for pver in {2,3}; do
msg "Python ${pver} build for ${CARCH}"
cd "${srcdir}/python${pver}-build-${CARCH}"
${MINGW_PREFIX}/bin/python${pver} setup.py build
done
}
check() {
msg "Python 2 test for ${CARCH}"
cd "${srcdir}/python2-build-${CARCH}"
${MINGW_PREFIX}/bin/pytest2 test
msg "Python 3 test for ${CARCH}"
cd "${srcdir}/python3-build-${CARCH}"
${MINGW_PREFIX}/bin/pytest test
}
package_python3-parso() {
depends=("${MINGW_PACKAGE_PREFIX}-python3")
cd "${srcdir}/python3-build-${CARCH}"
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} \
--root="${pkgdir}" --optimize=1 --skip-build
install -Dm644 LICENSE.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE"
}
package_python2-parso() {
depends=("${MINGW_PACKAGE_PREFIX}-python2")
cd "${srcdir}/python2-build-${CARCH}"
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} \
--root="${pkgdir}" --optimize=1 --skip-build
install -Dm644 LICENSE.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE"
}
package_mingw-w64-i686-python2-parso() {
package_python2-parso
}
package_mingw-w64-i686-python3-parso() {
package_python3-parso
}
package_mingw-w64-x86_64-python2-parso() {
package_python2-parso
}
package_mingw-w64-x86_64-python3-parso() {
package_python3-parso
}

View File

@@ -0,0 +1,115 @@
# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>
_realname=pexpect
pkgbase=mingw-w64-python-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
pkgver=4.6.0
pkgrel=1
pkgdesc="For controlling and automating applications (mingw-w64)"
arch=('any')
url='https://pexpect.readthedocs.org/en/stable/'
license=('MIT')
makedepends=("${MINGW_PACKAGE_PREFIX}-python2"
"${MINGW_PACKAGE_PREFIX}-python3"
"${MINGW_PACKAGE_PREFIX}-python3-ptyprocess"
"${MINGW_PACKAGE_PREFIX}-python2-ptyprocess"
"${MINGW_PACKAGE_PREFIX}-python3-setuptools"
"${MINGW_PACKAGE_PREFIX}-python2-setuptools")
options=('staticlibs' 'strip' '!debug')
source=("git+https://github.com/pexpect/pexpect#tag=${pkgver%%.0}")
sha256sums=('SKIP')
# Helper macros to help make tasks easier #
apply_patch_with_msg() {
for _patch in "$@"
do
msg2 "Applying $_patch"
patch -Nbp1 -i "${srcdir}/$_patch"
done
}
del_file_exists() {
for _fname in "$@"
do
if [ -f $_fname ]; then
rm -rf $_fname
fi
done
}
# =========================================== #
prepare() {
cd "${srcdir}"
for builddir in python{2,3}-build-${CARCH}; do
rm -rf ${builddir} | true
cp -r "${_realname}" "${builddir}"
done
sed -i 's,env python,env python2,' python2-build-${CARCH}/pexpect/FSM.py
# drop a python3 specific module
# see: https://github.com/pexpect/pexpect/issues/220
echo 'exclude pexpect/async.py' >> python2-build-${CARCH}/MANIFEST.in
sed -i 's,env python,env python3,' python3-build-${CARCH}/pexpect/FSM.py
# Set version for setuptools_scm
export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
}
# Note that build() is sometimes skipped because it's done in
# the packages setup.py install for simplicity if you can do so.
# but sometimes, you want to do a check before install which would
# also trigger the build.
build() {
for pver in {2,3}; do
msg "Python ${pver} build for ${CARCH}"
cd "${srcdir}/python${pver}-build-${CARCH}"
${MINGW_PREFIX}/bin/python${pver} setup.py build
done
}
check() {
for pver in {2,3}; do
msg "Python ${pver} test for ${CARCH}"
cd "${srcdir}/python${pver}-build-${CARCH}"
${MINGW_PREFIX}/bin/python${pver} setup.py check
done
}
package_python3-pexpect() {
depends=("${MINGW_PACKAGE_PREFIX}-python3"
"${MINGW_PACKAGE_PREFIX}-python3-ptyprocess")
cd "${srcdir}/python3-build-${CARCH}"
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} \
--root="${pkgdir}" --optimize=1 --skip-build
install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE"
}
package_python2-pexpect() {
depends=("${MINGW_PACKAGE_PREFIX}-python2"
"${MINGW_PACKAGE_PREFIX}-python2-ptyprocess"
)
cd "${srcdir}/python2-build-${CARCH}"
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} \
--root="${pkgdir}" --optimize=1 --skip-build
install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE"
}
package_mingw-w64-i686-python2-pexpect() {
package_python2-pexpect
}
package_mingw-w64-i686-python3-pexpect() {
package_python3-pexpect
}
package_mingw-w64-x86_64-python2-pexpect() {
package_python2-pexpect
}
package_mingw-w64-x86_64-python3-pexpect() {
package_python3-pexpect
}

View File

@@ -4,25 +4,27 @@ _realname=ipython
pkgbase=mingw-w64-python2-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}")
pkgver=5.3.0
pkgrel=6
pkgrel=7
pkgdesc="An enhanced Interactive Python shell (mingw-w64)"
arch=('any')
url="https://ipython.org/"
license=('BSD')
#install=ipython2-${CARCH}.install
depends=("${MINGW_PACKAGE_PREFIX}-sqlite3"
install=${_realname}2-${CARCH}.install
depends=('winpty'
"${MINGW_PACKAGE_PREFIX}-sqlite3"
"${MINGW_PACKAGE_PREFIX}-python2-traitlets"
"${MINGW_PACKAGE_PREFIX}-python2-simplegeneric"
"${MINGW_PACKAGE_PREFIX}-python2-pickleshare"
"${MINGW_PACKAGE_PREFIX}-python2-prompt_toolkit"
"${MINGW_PACKAGE_PREFIX}-python2-jedi"
"${MINGW_PACKAGE_PREFIX}-python2-win_unicode_console")
optdepends=("${MINGW_PACKAGE_PREFIX}-python2-nose: for IPython's test suite"
"${MINGW_PACKAGE_PREFIX}-python2-pyqt4: for ipython qtconsole"
"${MINGW_PACKAGE_PREFIX}-python2-sip: for ipython qtconsole"
"${MINGW_PACKAGE_PREFIX}-python2-pygments: for ipython qtconsole"
"${MINGW_PACKAGE_PREFIX}-python2-jinja: for ipython notebook")
"${MINGW_PACKAGE_PREFIX}-python2-jinja: for ipython notebook"
# "${MINGW_PACKAGE_PREFIX}-haskell-pandoc: ipython notebook conversion"
# "${MINGW_PACKAGE_PREFIX}-python2-pyzmq: ipython notebook and ipython qtconcole"
"${MINGW_PACKAGE_PREFIX}-python2-pyzmq: ipython notebook and ipython qtconcole")
# "${MINGW_PACKAGE_PREFIX}-python2-tornado: for ipython notebook"
makedepends=("${MINGW_PACKAGE_PREFIX}-python2-setuptools")
source=("${_realname}-${pkgver}.tar.gz::https://github.com/ipython/ipython/archive/${pkgver}.tar.gz"
@@ -55,8 +57,14 @@ all_build() {
for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*.cmd; do
sed -e "s|${PREFIX_WIN}/bin/||g" -i ${_f}
done
for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*; do
sed -e "s|${PREFIX_WIN}/bin/|/usr/bin/env |g" -i ${_f}
# 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 iptest2 ipython ipython2; 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
}

View File

@@ -0,0 +1,14 @@
post_install() {
cd mingw32
local _prefix=$(pwd -W)
cd -
local _it
for _it in iptest2 ipython2; do
sed -e "s|/mingw32|${_prefix}|g" \
-i mingw32/bin/${_it}
done
}
post_upgrade() {
post_install
}

View File

@@ -0,0 +1,14 @@
post_install() {
cd mingw64
local _prefix=$(pwd -W)
cd -
local _it
for _it in iptest2 ipython2; do
sed -e "s|/mingw64|${_prefix}|g" \
-i mingw64/bin/${_it}
done
}
post_upgrade() {
post_install
}

View File

@@ -0,0 +1,14 @@
post_install() {
cd mingw32
local _prefix=$(pwd -W)
cd -
local _it
for _it in iptest iptest3 ipython ipython3; do
sed -e "s|/mingw32|${_prefix}|g" \
-i mingw32/bin/${_it}
done
}
post_upgrade() {
post_install
}

View File

@@ -0,0 +1,14 @@
post_install() {
cd mingw64
local _prefix=$(pwd -W)
cd -
local _it
for _it in iptest iptest3 ipython ipython3; do
sed -e "s|/mingw64|${_prefix}|g" \
-i mingw64/bin/${_it}
done
}
post_upgrade() {
post_install
}

View File

@@ -3,32 +3,36 @@
_realname=ipython
pkgbase=mingw-w64-python3-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
pkgver=6.4.0
pkgrel=2
pkgver=6.5.0
pkgrel=1
pkgdesc="An enhanced Interactive Python shell (mingw-w64)"
arch=('any')
url="https://ipython.org/"
license=('BSD')
#install=ipython3-${CARCH}.install
depends=("${MINGW_PACKAGE_PREFIX}-sqlite3"
# 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"
"${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-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}-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-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=('ca9e3a938d8e42fc7d9fb741470142dc08d9b44efe6e82864f1e6f8cd6a49c2b')
sha256sums=('cea3be089de34171b375d54053f729e97b1f8e1e7626035cbd00e82ebf0c6044')
all_build() {
cd "${srcdir}/${_realname}-${pkgver}"
@@ -46,12 +50,17 @@ all_build() {
find "${pkgdir}/" -name 'requires.txt' -delete
local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX})
# fix python command in files
for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*.cmd; do
sed -e "s|${PREFIX_WIN}/bin/||g" -i ${_f}
sed -e "s|${PREFIX_WIN}/bin/||g" -i ${_f}
done
for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*; do
sed -e "s|${PREFIX_WIN}/bin/|/usr/bin/env |g" -i ${_f}
# 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
}

View File

@@ -0,0 +1,14 @@
post_install() {
cd mingw32
local _prefix=$(pwd -W)
cd -
local _it
for _it in iptest iptest3 ipython ipython3; do
sed -e "s|/mingw32|${_prefix}|g" \
-i mingw32/bin/${_it}
done
}
post_upgrade() {
post_install
}

View File

@@ -0,0 +1,14 @@
post_install() {
cd mingw64
local _prefix=$(pwd -W)
cd -
local _it
for _it in iptest iptest3 ipython ipython3; do
sed -e "s|/mingw64|${_prefix}|g" \
-i mingw64/bin/${_it}
done
}
post_upgrade() {
post_install
}