Rename python3 packages to python and update to latest. Round 2
This commit is contained in:
@@ -2,68 +2,70 @@
|
||||
|
||||
_realname=ipython
|
||||
pkgbase=mingw-w64-python3-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
|
||||
provides=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
||||
conflicts=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
||||
replaces=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
||||
pkgver=7.9.0
|
||||
pkgrel=1
|
||||
pkgdesc="An enhanced Interactive Python shell (mingw-w64)"
|
||||
arch=('any')
|
||||
url="https://ipython.org/"
|
||||
license=('BSD')
|
||||
# Mote: prompt_toolkit 2.0 is required for this series. There
|
||||
# is some breakage between prompt_toolkit 1.0 and 2.0.
|
||||
# Note: prompt_toolkit 2.0 is required for this series.
|
||||
# There is some breakage between prompt_toolkit 1.0 and 2.0.
|
||||
depends=('winpty'
|
||||
"${MINGW_PACKAGE_PREFIX}-sqlite3"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-jedi"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-decorator"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-pickleshare"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-simplegeneric"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-traitlets"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-prompt_toolkit>=2.0"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-pygments"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-simplegeneric"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-backcall"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-pexpect"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-colorama"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-win_unicode_console")
|
||||
"${MINGW_PACKAGE_PREFIX}-python-jedi"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-decorator"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-pickleshare"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-simplegeneric"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-traitlets"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-prompt_toolkit>=2.0"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-pygments"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-backcall"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-pexpect"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-colorama"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-win_unicode_console")
|
||||
# new optional thing: ipyparallel
|
||||
optdepends=("${MINGW_PACKAGE_PREFIX}-python3-nose: for IPython's test suite"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-qtconsole: for ipython qtconsole"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-ipython-ipyparallel: for IPython.parallel")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-python3-setuptools")
|
||||
checkdepends=("${MINGW_PACKAGE_PREFIX}-python3-requests"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-testpath"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-pygments"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-jupyter-nbformat"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-ipykernel"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-numpy")
|
||||
optdepends=("${MINGW_PACKAGE_PREFIX}-python-nose: for IPython's test suite"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-qtconsole: for ipython qtconsole"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-ipython-ipyparallel: for IPython.parallel")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools")
|
||||
checkdepends=("${MINGW_PACKAGE_PREFIX}-python-requests"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-testpath"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-pygments"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-jupyter-nbformat"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-ipykernel"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-numpy")
|
||||
install=${_realname}3-${CARCH}.install
|
||||
source=("${_realname}-${pkgver}.tar.gz::https://github.com/ipython/ipython/archive/${pkgver}.tar.gz")
|
||||
sha256sums=('bfb1237d1556c9a09ac2914e41bc3561dde12a643e5921eadc920324a1630b7f')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}"
|
||||
rm -rf python3-build-${CARCH} | true
|
||||
cp -r "${_realname}-${pkgver}" "python3-build-${CARCH}"
|
||||
rm -rf python-build-${CARCH} | true
|
||||
cp -r "${_realname}-${pkgver}" "python-build-${CARCH}"
|
||||
}
|
||||
|
||||
build() {
|
||||
msg "Python 3 build for ${CARCH}"
|
||||
cd "${srcdir}/python3-build-${CARCH}"
|
||||
${MINGW_PREFIX}/bin/python3 setup.py build
|
||||
msg "Python build for ${CARCH}"
|
||||
cd "${srcdir}/python-build-${CARCH}"
|
||||
${MINGW_PREFIX}/bin/python setup.py build
|
||||
}
|
||||
|
||||
check() {
|
||||
msg "Python 3 test for ${CARCH}"
|
||||
cd "${srcdir}/python3-build-${CARCH}"
|
||||
${MINGW_PREFIX}/bin/python3 -m test || warning "Tests fail"
|
||||
msg "Python test for ${CARCH}"
|
||||
cd "${srcdir}/python-build-${CARCH}"
|
||||
${MINGW_PREFIX}/bin/python -m test || warning "Tests fail"
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/python3-build-${CARCH}"
|
||||
cd "${srcdir}/python-build-${CARCH}"
|
||||
# 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/python3 setup.py install \
|
||||
${MINGW_PREFIX}/bin/python setup.py install \
|
||||
--prefix=${MINGW_PREFIX} --root=${pkgdir} --optimize=1 --skip-build
|
||||
|
||||
find "${pkgdir}/" -name "*.pyc" -delete
|
||||
@@ -77,15 +79,14 @@ package() {
|
||||
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 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
|
||||
|
||||
install -Dm644 docs/source/about/license_and_copyright.rst "${pkgdir}${MINGW_PREFIX}/share/licenses/ipython/LICENSE"
|
||||
|
||||
install -Dm644 docs/source/about/license_and_copyright.rst "${pkgdir}${MINGW_PREFIX}/share/licenses/python-ipython/LICENSE"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user