[arch-commits] Commit in python-ipykernel/trunk (PKGBUILD)
Eli Schwartz
eschwartz at archlinux.org
Fri Aug 10 17:19:45 UTC 2018
Date: Friday, August 10, 2018 @ 17:19:45
Author: eschwartz
Revision: 370917
upgpkg: python-ipykernel 4.8.2-1
upstream releases obviate FS#59535
add tests
move python2 fixes into prepare
Modified:
python-ipykernel/trunk/PKGBUILD
----------+
PKGBUILD | 48 +++++++++++++++++++++++++++++++-----------------
1 file changed, 31 insertions(+), 17 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2018-08-10 15:27:12 UTC (rev 370916)
+++ PKGBUILD 2018-08-10 17:19:45 UTC (rev 370917)
@@ -3,16 +3,16 @@
pkgbase=python-ipykernel
pkgname=(python-ipykernel python2-ipykernel)
-pkgver=4.6.1
-pkgrel=2
+pkgver=4.8.2
+pkgrel=1
pkgdesc="The ipython kernel for Jupyter"
arch=('any')
-url="https://pypi.python.org/pypi/ipykernel"
+url="https://pypi.org/project/ipykernel/"
license=('BSD')
-depends=('python-traitlets' 'python-tornado' 'ipython' 'python-jupyter_client')
-makedepends=('python-setuptools' 'python2-setuptools' 'ipython2' 'python2-jupyter_client')
+makedepends=('python-setuptools' 'python2-setuptools' ipython 'ipython2' 'python2-jupyter_client' 'python-jupyter_client')
+checkdepends=('python-pytest' 'python2-pytest' 'python-mock' 'python2-mock' 'python-nose' 'python2-nose')
source=("$pkgbase-$pkgver.tgz::https://github.com/ipython/ipykernel/archive/$pkgver.tar.gz")
-md5sums=('7fdff19d6d687a993052dc6a31a78560')
+md5sums=('075d093da8018089ccb56852389f8032')
# dep cycle with python-jupyter_client
@@ -19,26 +19,40 @@
prepare() {
cd "$srcdir"
cp -r ipykernel-$pkgver python2-ipykernel-$pkgver
+
+ # https://github.com/ipython/ipykernel/issues/332
+ sed -i "s/executable='python'/executable='python2'/" python2-ipykernel-$pkgver/setup.py
}
+build() {
+ cd "$srcdir/ipykernel-$pkgver"
+ python3 setup.py build
+
+ cd "$srcdir/python2-ipykernel-$pkgver"
+ python2 setup.py build
+
+}
+
+check() {
+ cd "$srcdir/ipykernel-$pkgver"
+ python -m pytest
+
+ cd "$srcdir/python2-ipykernel-$pkgver"
+ python2 -m pytest
+}
+
package_python-ipykernel() {
+ depends=('python-traitlets' 'python-tornado' 'ipython' 'python-jupyter_client')
cd "$srcdir/ipykernel-$pkgver"
- python3 setup.py install --prefix=/usr --root="$pkgdir" --optimize=0
- cd "$srcdir"
- install -Dm644 "ipykernel-$pkgver/COPYING.md" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ python3 setup.py install --root="$pkgdir" --optimize=1
+ install -Dm644 COPYING.md "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
package_python2-ipykernel() {
depends=('python2-traitlets' 'python2-tornado' 'ipython2' 'python2-jupyter_client')
-
cd "$srcdir/python2-ipykernel-$pkgver"
- python2 setup.py install --prefix=/usr --root="$pkgdir" --optimize=0
- cd "$srcdir"
- install -d "$pkgdir/usr/share/jupyter/kernels/python2"
- echo '{"display_name": "Python 2", "language": "python2", "argv": ["python2", "-m", "ipykernel", "-f", "{connection_file}"],"codemirror_mode": {"version": 2, "name": "ipython2"}}' > "$pkgdir/usr/share/jupyter/kernels/python2/kernel.json"
-
- install -Dm644 "ipykernel-$pkgver/COPYING.md" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ python2 setup.py install --root="$pkgdir" --optimize=1
+ install -Dm644 COPYING.md "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
-
More information about the arch-commits
mailing list