python-ipython: Build different versions for python 2 and 3
This commit is contained in:
63
mingw-w64-python3-ipython/PKGBUILD
Normal file
63
mingw-w64-python3-ipython/PKGBUILD
Normal file
@@ -0,0 +1,63 @@
|
||||
# Maintainer: Kyle Kauffman <kyle.j.kauffman@gmail.com>
|
||||
|
||||
_realname=ipython
|
||||
pkgbase=mingw-w64-python3-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
||||
pkgver=6.1.0
|
||||
pkgrel=1
|
||||
pkgdesc="An enhanced Interactive Python shell (mingw-w64)"
|
||||
arch=('any')
|
||||
url="http://ipython.org"
|
||||
license=('BSD')
|
||||
#install=ipython3-${CARCH}.install
|
||||
depends=("${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-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"
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-python3-setuptools")
|
||||
source=("${_realname}-${pkgver}.tar.gz::https://github.com/ipython/ipython/archive/${pkgver}.tar.gz")
|
||||
sha256sums=('c570a80a29100664a79429d3863389fa5f53102292b3a7789d93416a2d7681cf')
|
||||
|
||||
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() {
|
||||
local interpreter=python3
|
||||
|
||||
all_build ${interpreter}
|
||||
|
||||
install -Dm644 docs/source/about/license_and_copyright.rst "${pkgdir}${MINGW_PREFIX}/share/licenses/ipython/LICENSE"
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user