summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 03923b7a625f4e39add1ce9cfd9b19295fc813fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# 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
_pkgname=line_profiler
pkgver=3.5.1
pkgrel=1
pkgdesc="Line-by-line profiler"
url="https://pypi.python.org/pypi/line_profiler"
arch=('x86_64')
license=('BSD')
depends=('python-setuptools' 'ipython')
makedepends=('cython')
checkdepends=('python-pytest' 'python-ubelt')
source=("$_pkgname-$pkgver.tar.gz::https://github.com/pyutils/line_profiler/archive/v$pkgver.tar.gz"
    "cython.patch")

sha256sums=('bc9ad7e88112e882b16e3698040c7f9449fe72e4f15f957d2bd5e486484ff75e'
            '3acc85c3eebe59d94edfa1624e68d06d3f4fad342d5380606f69c566d93c8131')

prepare() {
  cd "$_pkgname-$pkgver"
  patch -p1 -i ../cython.patch
}

build() {
  cd "$_pkgname-$pkgver"
  python setup.py build
}

check() {
  cd "$_pkgname-${pkgver}"
  python setup.py build_ext --inplace
  PYTHONPATH=. pytest tests
}

package() {
  cd "line_profiler-${pkgver}"
  python setup.py install --skip-build --prefix=/usr --root="${pkgdir}" --optimize=1

  install -d "${pkgdir}/usr/share/licenses/${pkgname}"
  install -m644 LICENSE{,_Python}.txt "${pkgdir}/usr/share/licenses/${pkgname}"
}