Date: Saturday, August 7, 2021 @ 06:01:10
Author: yan12125
Revision: 994637
archrelease: copy trunk to community-any
Added:
python-nbval/repos/community-any/PKGBUILD
(from rev 994636, python-nbval/trunk/PKGBUILD)
Deleted:
python-nbval/repos/community-any/PKGBUILD
----------+
PKGBUILD | 93 ++++++++++++++++++++++++++++++++++++++-----------------------
1 file changed, 58 insertions(+), 35 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2021-08-07 06:00:58 UTC (rev 994636)
+++ PKGBUILD 2021-08-07 06:01:10 UTC (rev 994637)
@@ -1,35 +0,0 @@
-# Maintainer: Felix Yan <[email protected]>
-
-pkgname=python-nbval
-pkgver=0.9.6
-pkgrel=1
-pkgdesc="A py.test plugin to validate Jupyter notebooks"
-url="https://github.com/computationalmodelling/nbval"
-license=('BSD')
-arch=('any')
-depends=('python-pytest' 'python-jupyter_client' 'jupyter-nbformat'
'python-ipykernel'
- 'python-coverage')
-makedepends=('python-setuptools')
-checkdepends=('python-doit' 'python-matplotlib' 'python-pytest-cov'
'python-sympy')
-source=("https://github.com/computationalmodelling/nbval/archive/$pkgver/$pkgname-$pkgver.tar.gz")
-sha512sums=('ce2122ab490b52537696b2a8e97fd3b604c547af93fccf7d83d82b9180d8bb50b57d002f4e16eb605acabab5b31e961fea97bf2d46bf45b9cd1f8b7fca028df2')
-
-build() {
- cd nbval-$pkgver
- python setup.py build
-}
-
-check() {
- cd nbval-$pkgver
- python setup.py egg_info
- # size difference: tests/sample_notebook.ipynb::Cell 9
- # unknown: "tests/latex-example.ipynb::Cell 1",
"tests/test_unit_tests_in_notebooks.py::test_print[/build/python-nbval/src/nbval-0.9.6/tests/ipynb-test-samples/test-latex-pass-correctouput.ipynb]"
- PYTHONPATH="$PWD" doit test || echo "Tests failed"
-}
-
-package() {
- cd nbval-$pkgver
- python setup.py install --root="$pkgdir" --optimize=1
-
- install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
-}
Copied: python-nbval/repos/community-any/PKGBUILD (from rev 994636,
python-nbval/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2021-08-07 06:01:10 UTC (rev 994637)
@@ -0,0 +1,58 @@
+# Maintainer: Felix Yan <[email protected]>
+# Maintainer: Chih-Hsuan Yen <[email protected]>
+
+pkgname=python-nbval
+pkgver=0.9.6
+pkgrel=2
+pkgdesc="A py.test plugin to validate Jupyter notebooks"
+url="https://github.com/computationalmodelling/nbval"
+license=('BSD')
+arch=('any')
+# python-six can be removed from dependencies in the next version
+# https://github.com/computationalmodelling/nbval/pull/162
+depends=('python-pytest' 'python-six' 'python-jupyter_client'
'jupyter-nbformat' 'python-ipykernel'
+ 'python-coverage')
+makedepends=('python-setuptools')
+checkdepends=('python-doit' 'python-matplotlib' 'python-pytest-cov'
'python-sympy')
+source=("https://github.com/computationalmodelling/nbval/archive/$pkgver/$pkgname-$pkgver.tar.gz")
+sha512sums=('ce2122ab490b52537696b2a8e97fd3b604c547af93fccf7d83d82b9180d8bb50b57d002f4e16eb605acabab5b31e961fea97bf2d46bf45b9cd1f8b7fca028df2')
+
+build() {
+ cd nbval-$pkgver
+ python setup.py build
+}
+
+check() {
+ cd nbval-$pkgver
+ python setup.py egg_info
+
+ # XXX: workarounds for issues in dependencies...
+ # 1. ipython uses a function deprecated in matplotlib 3.4 [1]
+ # This will be unneeded once the next version of IPython is out [2].
+ # Note that matplotlib.MatplotlibDeprecationWarning is inherited from
UserWarning
+ # instead of DeprecationWarning [3] until its upcoming version [4].
+ export PYTHONWARNINGS="ignore::UserWarning"
+ # 2. ipython uses a different default figure size for inline matplotlib
plots since 7.23
+ # This is due to the switch to matplotlib-inline in ipython 7.23 [5].
ipykernel
+ # has a similar change since 6.0.0 [6], while community/python-ipykernel
is out-dated.
+ # As nbval uses ipykernel to run notebooks [7], running nbval on Arch
generates figures
+ # with the old default size. Fortunately, matplotlib allows overriding
the default
+ # backend, as inspired by [6].
+ export MPLBACKEND=module://matplotlib_inline.backend_inline
+ # [1] https://github.com/computationalmodelling/nbval/issues/167
+ # [2] https://github.com/ipython/ipython/pull/12889
+ # [3]
https://github.com/matplotlib/matplotlib/blob/v3.4.2/lib/matplotlib/_api/deprecation.py#L19
+ # [4] https://github.com/matplotlib/matplotlib/pull/20046
+ # [5] https://github.com/ipython/ipython/pull/12817
+ # [6] https://github.com/ipython/ipykernel/pull/591
+ # [7]
https://github.com/computationalmodelling/nbval/blob/0.9.6/nbval/kernel.py
+
+ PYTHONPATH="$PWD" doit test
+}
+
+package() {
+ cd nbval-$pkgver
+ python setup.py install --root="$pkgdir" --optimize=1
+
+ install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
+}