[arch-commits] Commit in python-olefile/trunk (PKGBUILD)
Levente Polyak
anthraxx at archlinux.org
Sun Feb 18 21:06:07 UTC 2018
Date: Sunday, February 18, 2018 @ 21:06:07
Author: anthraxx
Revision: 296252
upgpkg: python-olefile 0.45.1-1
Modified:
python-olefile/trunk/PKGBUILD
----------+
PKGBUILD | 41 ++++++++++++++++++++++++++++++-----------
1 file changed, 30 insertions(+), 11 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2018-02-18 20:51:08 UTC (rev 296251)
+++ PKGBUILD 2018-02-18 21:06:07 UTC (rev 296252)
@@ -3,7 +3,7 @@
pkgbase=python-olefile
pkgname=('python-olefile' 'python2-olefile')
_pyname=olefile
-pkgver=0.44
+pkgver=0.45.1
pkgrel=1
pkgdesc='Python library to parse, read and write Microsoft OLE2 files (formerly OleFileIO_PL)'
url='http://www.decalage.info/olefile'
@@ -10,21 +10,40 @@
arch=('any')
license=('BSD')
makedepends=('python' 'python2')
-source=(https://github.com/decalage2/olefile/releases/download/v$pkgver/$_pyname-$pkgver.tar.gz)
-sha512sums=('92b6ad1bced5b2c8e5332a01e5a2e59527ec2303046d0babd665b0f02fe56966574eff56619de168c50f1ea40df2e61ce589ee61b634222146d049b129514c65')
+checkdepends=('python-pytest' 'python2-pytest')
+source=(${_pyname}-${pkgver}.tar.gz::https://github.com/decalage2/olefile/archive/v${pkgver}.tar.gz)
+sha512sums=('72d40056cac1d9566aa8e32b7b5484f61958a689130e71fa86bc0b9fed98f27a8cf34b824971357d42ec3dfd2d5bfa86d0f212727ff91d8daa3967969ff576e9')
prepare() {
- cp -ra ${_pyname}-${pkgver}{,py2}
+ cp -ra ${_pyname}-${pkgver}{,-py2}
}
+build() {
+ (cd ${_pyname}-${pkgver}
+ python setup.py build
+ )
+ (cd ${_pyname}-${pkgver}-py2
+ python2 setup.py build
+ )
+}
+
+check() {
+ (cd ${_pyname}-${pkgver}
+ py.test
+ )
+ (cd ${_pyname}-${pkgver}-py2
+ py.test2
+ )
+}
+
package_python-olefile() {
depends=('python')
replaces=('python3-olefileio')
conflicts=('python3-olefileio')
cd ${_pyname}-${pkgver}
- python setup.py install -O1 --root="${pkgdir}" --prefix=/usr
- install -Dm 644 ${_pyname}/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
- install -Dm 644 README.md doc/* -t "${pkgdir}/usr/share/doc/${pkgname}/README"
+ python setup.py install -O1 --root="${pkgdir}" --prefix=/usr --skip-build
+ install -Dm 644 LICENSE.txt -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -Dm 644 README.md doc/*.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
}
@@ -32,10 +51,10 @@
depends=('python2')
replaces=('python2-olefileio')
conflicts=('python2-olefileio')
- cd ${_pyname}-${pkgver}py2
- python2 setup.py install -O1 --root="${pkgdir}" --prefix=/usr
- install -Dm 644 ${_pyname}/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
- install -Dm 644 README.md doc/* -t "${pkgdir}/usr/share/doc/${pkgname}/README"
+ cd ${_pyname}-${pkgver}-py2
+ python2 setup.py install -O1 --root="${pkgdir}" --prefix=/usr --skip-build
+ install -Dm 644 LICENSE.txt -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -Dm 644 README.md doc/*.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
}
# vim: ts=2 sw=2 et:
More information about the arch-commits
mailing list