[arch-commits] Commit in python2-meliae/trunk (PKGBUILD)
Filipe Laíns
ffy00 at archlinux.org
Mon Mar 18 22:21:13 UTC 2019
Date: Monday, March 18, 2019 @ 22:21:12
Author: ffy00
Revision: 442507
upgpkg: python-meliae 0.4.0-2
Modified:
python2-meliae/trunk/PKGBUILD
----------+
PKGBUILD | 46 +++++++++++++++++++++++++++++++++++-----------
1 file changed, 35 insertions(+), 11 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2019-03-18 22:02:56 UTC (rev 442506)
+++ PKGBUILD 2019-03-18 22:21:12 UTC (rev 442507)
@@ -1,27 +1,51 @@
# Maintaiiner: Filipe Laíns (FFY00) <lains at archlinux.org>
-pkgname=python2-meliae
-_pkgname=${pkgname#python2-}
+pkgbase=python-meliae
+_pkgname=${pkgbase#python-}
+pkgname=(python-$_pkgname python2-$_pkgname)
pkgver=0.4.0
-pkgrel=1
-pkgdesc="Python Memory Usage Analyzer"
-url="https://github.com/isaacl/meliae"
+pkgrel=2
+pkgdesc='Python Memory Usage Analyzer'
+url='https://github.com/isaacl/meliae'
arch=('x86_64')
license=('GPL')
-depends=('python2')
-makedepends=('python2-setuptools' 'cython2')
-source=("$url/archive/meliae-$pkgver.tar.gz")
-sha512sums=('1d88ecf082f4dabf2fd86f41453a97de976c68d7d9230046a39e16ed1b30b60c8c9245ecb3b1a187a80eabadbd5c1db2b2eede84f56da1c0b46237465e4f0a1d')
+makedepends=('python-setuptools' 'python2-setuptools' 'cython' 'cython2')
+source=("$url/archive/meliae-$pkgver.tar.gz"
+ 'fix-python3.patch::https://github.com/thehesiod/meliae/commit/993164289dd57c8670341ca0a1cc5b52e74bc21c.patch')
+sha512sums=('1d88ecf082f4dabf2fd86f41453a97de976c68d7d9230046a39e16ed1b30b60c8c9245ecb3b1a187a80eabadbd5c1db2b2eede84f56da1c0b46237465e4f0a1d'
+ '2310363ed702659a0b9f305808c66a693938ec192deabbd6aace6a5e85ceeec21102339c302395bdc9e21e59f6cd611ead8dd57f145d48a48df25950874b3697')
-build() {
+prepare() {
cd $_pkgname-$_pkgname-$pkgver
+ sed -i '/gitignore/d' ../fix-python3.patch
+ patch -p1 < ../fix-python3.patch
+ cp -a "$srcdir"/$_pkgname-$_pkgname-$pkgver{,-py2}
+}
+
+build() {
+ echo "Building python-$_pkgname $pkgver"
+ cd "$srcdir"/$_pkgname-$_pkgname-$pkgver
+ python setup.py build
+
+ echo "Building python2-$_pkgname $pkgver"
+ cd "$srcdir"/$_pkgname-$_pkgname-$pkgver-py2
python2 setup.py build
}
-package() {
+package_python-meliae() {
+ depends=('python')
cd $_pkgname-$_pkgname-$pkgver
+ python setup.py install --root="$pkgdir" --optimize=1 --skip-build
+}
+
+package_python2-meliae() {
+ depends=('python2')
+ cd $_pkgname-$_pkgname-$pkgver-py2
+
python2 setup.py install --root="$pkgdir" --optimize=1 --skip-build
+
+ mv "$pkgdir"/usr/bin/strip_duplicates.py "$pkgdir"/usr/bin/strip_duplicates2.py
}
More information about the arch-commits
mailing list