summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD38
1 files changed, 23 insertions, 15 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 7c830fb6ceeb..fc79f5e9f1c9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,32 +1,40 @@
-# Maintainer: Rich Li <rich at dranek com>
+# Maintainer: Guillaume Horel <guillaume.horel@gmail.com>
+# Contributor: Rich Li <rich at dranek com>
# Contributor: lestb <tkhdlstfl dot l plus aur at gmail dot com>
# Contributor: Sebastien Binet <binet@lblbox>
pkgname=python-lineprofiler
-pkgver=2.1
-pkgrel=2
+_pkgname=line_profiler
+pkgver=4.1.2
+pkgrel=1
pkgdesc="Line-by-line profiler"
url="https://pypi.python.org/pypi/line_profiler"
-arch=('i686' 'x86_64')
+arch=('x86_64')
license=('BSD')
-depends=('python-setuptools' 'ipython')
-makedepends=('cython')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/rkern/line_profiler/archive/$pkgver.tar.gz")
-sha256sums=('5625157e76e1f70c237c7df07389b48028aa1b94ec630aaa5f094d5755bcaa76')
+depends=(ipython python)
+makedepends=(cython python-build python-installer python-setuptools python-wheel)
+checkdepends=('python-pytest' 'python-pytest-cov' 'python-ubelt')
+optdepends=(python-rich)
+source=("$_pkgname-$pkgver.tar.gz::https://github.com/pyutils/line_profiler/archive/v$pkgver.tar.gz")
+
+sha256sums=('a1f3458c1dd1bf4b2d1d2657b78225f4e4e9046a1841f18cf528f01ebd3d5f43')
build() {
- cd "${srcdir}/line_profiler-${pkgver}"
- python setup.py build
+ cd "$_pkgname-$pkgver"
+ python -m build --wheel --no-isolation
}
check() {
- cd "${srcdir}/line_profiler-${pkgver}"
- py_ver=$(python -c 'import sys; print("{0.major}.{0.minor}".format(sys.version_info))')
- PYTHONPATH="./build/lib.linux-${CARCH}-${py_ver}" python -m unittest discover -v tests
+ local _site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
+ cd "$_pkgname-${pkgver}"
+ python -m installer --destdir=test_dir dist/*.whl
+ export PYTHONPATH="${srcdir}/$_pkgname-${pkgver}/test_dir/$_site_packages"
+ export PATH="${srcdir}/$_pkgname-${pkgver}/test_dir/usr/bin:$PATH"
+ ./run_tests.py
}
package() {
- cd "${srcdir}/line_profiler-${pkgver}"
- python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1
+ cd "line_profiler-${pkgver}"
+ python -m installer --destdir="$pkgdir" dist/*.whl
install -d "${pkgdir}/usr/share/licenses/${pkgname}"
install -m644 LICENSE{,_Python}.txt "${pkgdir}/usr/share/licenses/${pkgname}"