summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD36
2 files changed, 50 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..6433af055d5
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,14 @@
+pkgbase = python2-coverage
+ pkgdesc = A tool for measuring code coverage of Python programs (Python 2)
+ pkgver = 5.5
+ pkgrel = 3
+ url = https://coverage.readthedocs.io/en/5.5/
+ arch = x86_64
+ license = Apache
+ makedepends = python2-setuptools
+ depends = python2
+ optdepends = python2-toml: For pyproject.toml support
+ source = python2-coverage-5.5.tar.gz::https://github.com/nedbat/coveragepy/archive/refs/tags/5.5.tar.gz
+ sha256sums = fa441d7136aba2f08e0ceca2d7646005e7564c536cd628bb0cb0342e0b482562
+
+pkgname = python2-coverage
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..aac780bc29b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,36 @@
+# Maintainer: Danilo J. S. Bellini <danilo dot bellini at gmail dot com>
+# Contributor: Felix Yan <felixonmars@archlinux.org>
+# Contributor: Clément Démoulins <clement@archivel.fr>
+# Contributor: Fazlul Shahriar <fshahriar@gmail.com>
+pkgname=python2-coverage
+_name="${pkgname#python2-}py"
+pkgver=5.5
+pkgrel=3
+pkgdesc='A tool for measuring code coverage of Python programs (Python 2)'
+arch=('x86_64')
+url="https://coverage.readthedocs.io/en/$pkgver/"
+license=('Apache')
+depends=('python2')
+makedepends=('python2-setuptools')
+optdepends=('python2-toml: For pyproject.toml support')
+_github='https://github.com/nedbat/coveragepy'
+source=("$pkgname-$pkgver.tar.gz::$_github/archive/refs/tags/$pkgver.tar.gz")
+sha256sums=('fa441d7136aba2f08e0ceca2d7646005e7564c536cd628bb0cb0342e0b482562')
+
+prepare() {
+ cd "$srcdir/$_name-$pkgver"
+
+ # Tell setup.py not to create the "coverage" script
+ sed -i '/coverage = coverage.cmdline:main/d' setup.py
+}
+
+build() {
+ cd "$srcdir/$_name-$pkgver"
+ python2 setup.py build
+}
+
+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"
+}