summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorDaniel Bermond2022-08-11 18:51:28 -0300
committerDaniel Bermond2022-08-11 18:51:28 -0300
commit732b48712ea376cb2640aea595e6a191e537df0c (patch)
tree34f0e1002338d6e930dc5d7d0ce5c217a164f396 /PKGBUILD
parent4bdc71005560e57a2225a33dfa2b76e8d5605412 (diff)
downloadaur-python-nvd3.tar.gz
Drop python2 support. Update dependencies and build method.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD77
1 files changed, 15 insertions, 62 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 27e357031a20..015dc433aed9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,78 +1,31 @@
-# Maintainer : Daniel Bermond < gmail-com: danielbermond >
+# Maintainer: Daniel Bermond <dbermond@archlinux.org>
-_commit='f9f811ebc5abd625d63da79e936d9015497b5f58'
-
-pkgbase=python-nvd3
-pkgname=('python-nvd3' 'python2-nvd3')
+pkgname=python-nvd3
pkgver=0.15.0
-pkgrel=4
+pkgrel=5
+_commit='f9f811ebc5abd625d63da79e936d9015497b5f58'
pkgdesc='Python wrapper for the NVD3 chart generator'
arch=('any')
url='https://github.com/areski/python-nvd3/'
license=('MIT')
-makedepends=('git' 'python' 'python-setuptools' 'python2' 'python2-setuptools')
+depends=('python-jinja' 'python-slugify')
+optdepends=('ipython: for Jupyter notebook support')
+makedepends=('git' 'python-build' 'python-installer' 'python-setuptools' 'python-wheel')
+checkdepends=('python-nose')
source=("git+https://github.com/areski/python-nvd3.git#commit=${_commit}")
sha256sums=('SKIP')
-prepare() {
- cp -a "$pkgbase" "${pkgbase}-py2"
-}
-
build() {
- printf '%s\n' ' -> Building for Python...'
- cd "$pkgbase"
- python setup.py build
-
- printf '%s\n' ' -> Building for Python2...'
- cd "${srcdir}/${pkgbase}-py2"
- python2 setup.py build
+ cd python-nvd3
+ python -m build --wheel --no-isolation
}
check() {
- cd "$pkgbase"
- python setup.py test
-
- cd "${srcdir}/${pkgbase}-py2"
- python2 setup.py test
-}
-
-package_python-nvd3() {
- depends=(
- # official repositories:
- 'python' 'python-jinja'
- # AUR:
- 'python-slugify'
- )
-
- cd "$pkgbase"
- python setup.py install --root="$pkgdir" --skip-build --optimize='1'
-
- install -D -m644 MIT-LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ cd python-nvd3
+ nosetests
}
-package_python2-nvd3() {
- pkgdesc='Python2 wrapper for the NVD3 chart generator'
- depends=(
- # official repositories:
- 'python2' 'python2-jinja'
- # AUR:
- 'python2-slugify'
- )
-
- cd "${pkgbase}-py2"
- python2 setup.py install --root="$pkgdir" --skip-build --optimize='1'
-
- mv "${pkgdir}/usr/bin/nvd3" "${pkgdir}/usr/bin/nvd3-2"
- local _script _script_list
- _script_list=('__init__.py' 'cumulativeLineChart.py' 'discreteBarChart.py'
- 'lineChart.py' 'linePlusBarChart.py' 'lineWithFocusChart.py'
- 'multiBarChart.py' 'multiBarHorizontalChart.py' 'pieChart.py'
- 'scatterChart.py' 'stackedAreaChart.py' 'translator.py'
- 'NVD3Chart.py')
- for _script in "${_script_list[@]}"
- do
- sed -i '1s/$/2/' "${pkgdir}/usr/lib/python2.7/site-packages/nvd3/${_script}"
- done
-
- install -D -m644 MIT-LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+package() {
+ python -m installer --destdir="$pkgdir" python-nvd3/dist/*.whl
+ install -D -m644 python-nvd3/MIT-LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}