summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3b30548cc6e1204100eeefce7845e0b00f3d8ab7 (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
# Maintainer: Danilo J. S. Bellini <danilo dot bellini at gmail dot com>
# Contributor: Felix Yan <felixonmars@archlinux.org>
# Contributor: Morten Linderud <foxboron@archlinux.org>
# Contributor: Lance Chen <cyen0312@gmail.com>
pkgname=python2-wheel
_name=${pkgname#python2-}
pkgver=0.37.1
pkgrel=5
pkgdesc="A built-package format for Python, version for Python 2.7"
arch=(any)
url="https://github.com/pypa/wheel"
license=('MIT')
depends=('python2')
makedepends=('python2-setuptools')
checkdepends=('python2-pytest')
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/$pkgver.tar.gz")
sha256sums=('a82516a039e521100ecdef137f9e44249bf6903f9aff7d368e84ac31d60597f5')

prepare() {
  cd "$srcdir/$_name-$pkgver"
  sed -i 's/_.name/&.lower()/' src/wheel/wheelfile.py

  # Make python2-pytest-cov no longer a requirement
  sed -i /-cov/d setup.cfg
}

build() {
  cd "$srcdir/$_name-$pkgver"
  python2 setup.py build
  python2 setup.py egg_info
}

check() {
  cd "$srcdir/$_name-$pkgver"
  PYTHONPATH="$PWD/src" python2 -m pytest -W ignore::DeprecationWarning
}

package() {
  cd "$srcdir/$_name-$pkgver"
  python2 setup.py install --root="$pkgdir/" --optimize=1 --skip-build
  install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt"
  mv "$pkgdir/usr/bin/wheel" "$pkgdir/usr/bin/wheel2"
}