107 lines
3.6 KiB
Bash
107 lines
3.6 KiB
Bash
# Maintainer: Kyle Kauffman <kyle.j.kauffman@gmail.com>
|
|
|
|
_realname=ipython
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-python2-$_realname" "${MINGW_PACKAGE_PREFIX}-python3-$_realname")
|
|
pkgver=2.3.1
|
|
pkgrel=1
|
|
pkgdesc="An enhanced Interactive Python shell."
|
|
arch=('any')
|
|
url="http://ipython.org"
|
|
license=('BSD')
|
|
makedepends=(
|
|
"${MINGW_PACKAGE_PREFIX}-sqlite3"
|
|
"${MINGW_PACKAGE_PREFIX}-python2-setuptools"
|
|
"${MINGW_PACKAGE_PREFIX}-python3-setuptools"
|
|
)
|
|
|
|
source=("https://pypi.python.org/packages/source/i/ipython/$_realname-$pkgver.tar.gz")
|
|
md5sums=('2b7085525dac11190bfb45bb8ec8dcbf')
|
|
|
|
prepare() {
|
|
cd "$srcdir"
|
|
patch -p0 < ../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/${interpreter} 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
|
|
}
|
|
|
|
package_python3-ipython() {
|
|
interpreter=python3
|
|
depends=("${MINGW_PACKAGE_PREFIX}-sqlite3"
|
|
"${MINGW_PACKAGE_PREFIX}-python3-setuptools")
|
|
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
|
|
|
|
install -Dm644 docs/source/about/license_and_copyright.rst "$pkgdir${MINGW_PREFIX}/share/licenses/ipython/LICENSE"
|
|
|
|
}
|
|
|
|
package_python2-ipython() {
|
|
interpreter=python2
|
|
depends=("${MINGW_PACKAGE_PREFIX}-sqlite3"
|
|
"${MINGW_PACKAGE_PREFIX}-python2-setuptools")
|
|
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
|
|
|
|
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
|
|
}
|