python-ipython: Build different versions for python 2 and 3
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
--- ipython-2.3.1/IPython/utils/rlineimpl.py.orig 2014-11-12 18:08:55.000000000 -0500
|
||||
+++ ipython-2.3.1/IPython/utils/rlineimpl.py 2015-01-19 22:45:58.690179800 -0500
|
||||
@@ -27,13 +27,6 @@
|
||||
have_readline = True
|
||||
break
|
||||
|
||||
-if have_readline and (sys.platform == 'win32' or sys.platform == 'cli'):
|
||||
- try:
|
||||
- _outputfile=_rl.GetOutputFile()
|
||||
- except AttributeError:
|
||||
- warnings.warn("Failed GetOutputFile")
|
||||
- have_readline = False
|
||||
-
|
||||
# Test to see if libedit is being used instead of GNU readline.
|
||||
# Thanks to Boyd Waters for the original patch.
|
||||
uses_libedit = False
|
||||
|
||||
@@ -1,131 +0,0 @@
|
||||
# Maintainer: Kyle Kauffman <kyle.j.kauffman@gmail.com>
|
||||
|
||||
_realname=ipython
|
||||
pkgbase=mingw-w64-python-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
||||
pkgver=5.3.0
|
||||
pkgrel=1
|
||||
pkgdesc="An enhanced Interactive Python shell (mingw-w64)"
|
||||
arch=('any')
|
||||
url="http://ipython.org"
|
||||
license=('BSD')
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-sqlite3"
|
||||
"${MINGW_PACKAGE_PREFIX}-python2-setuptools"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-setuptools")
|
||||
|
||||
source=("${_realname}-${pkgver}.tar.gz::https://github.com/ipython/ipython/archive/$pkgver.tar.gz"
|
||||
0001-unimplemented-readline-calls.patch)
|
||||
sha256sums=('8c6e0be8d11b85641eb6e738975e4c91a03db08702f39c45c4ff42c6e43b8754'
|
||||
'cd6dac2442a2477c28096d87cdb7f38ef46b9d3341920d9e88396288a81bfbe2')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
patch -p1 -i ${srcdir}/0001-unimplemented-readline-calls.patch
|
||||
}
|
||||
|
||||
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})
|
||||
# fix python command in files
|
||||
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}
|
||||
done
|
||||
}
|
||||
|
||||
package_python3-ipython() {
|
||||
local interpreter=python3
|
||||
#install=ipython3-${CARCH}.install
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-sqlite3"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-setuptools"
|
||||
"${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-win_unicode_console")
|
||||
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"
|
||||
|
||||
all_build ${interpreter}
|
||||
|
||||
install -Dm644 docs/source/about/license_and_copyright.rst "${pkgdir}${MINGW_PREFIX}/share/licenses/ipython/LICENSE"
|
||||
|
||||
}
|
||||
|
||||
package_python2-ipython() {
|
||||
local interpreter=python2
|
||||
#install=ipython2-${CARCH}.install
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-sqlite3"
|
||||
"${MINGW_PACKAGE_PREFIX}-python2-setuptools"
|
||||
"${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-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}-haskell-pandoc: ipython notebook conversion"
|
||||
# "${MINGW_PACKAGE_PREFIX}-python2-pyzmq: ipython notebook and ipython qtconcole"
|
||||
# "${MINGW_PACKAGE_PREFIX}-python2-tornado: for ipython notebook"
|
||||
|
||||
all_build ${interpreter}
|
||||
for file_script in iptest ipython; do
|
||||
rm ${pkgdir}${MINGW_PREFIX}/bin/${file_script}{,.cmd}
|
||||
done
|
||||
|
||||
install -Dm644 docs/source/about/license_and_copyright.rst "${pkgdir}${MINGW_PREFIX}/share/licenses/ipython2/LICENSE"
|
||||
|
||||
# Fix bin collisions
|
||||
find "${pkgdir}${MINGW_PREFIX}/bin/" -type f -regex '.*[^2].exe$' -delete
|
||||
find "${pkgdir}${MINGW_PREFIX}/bin/" -type f -regex '.*[^2]-script.py$' -delete
|
||||
find "${pkgdir}${MINGW_PREFIX}/bin/" -type f -regex '.*[^2].exe.manifest$' -delete
|
||||
|
||||
# Fix manpage collisions
|
||||
cd "${pkgdir}${MINGW_PREFIX}/share/man/man1/"
|
||||
for i in *; do
|
||||
mv ${i} ${i/%.1/2.1}
|
||||
done
|
||||
|
||||
}
|
||||
|
||||
package_mingw-w64-i686-python2-ipython() {
|
||||
package_python2-ipython
|
||||
}
|
||||
|
||||
package_mingw-w64-i686-python3-ipython() {
|
||||
package_python3-ipython
|
||||
}
|
||||
|
||||
package_mingw-w64-x86_64-python2-ipython() {
|
||||
package_python2-ipython
|
||||
}
|
||||
|
||||
package_mingw-w64-x86_64-python3-ipython() {
|
||||
package_python3-ipython
|
||||
}
|
||||
|
||||
# vim:set ts=2 sw=2 et:
|
||||
Reference in New Issue
Block a user