summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorXiretza2020-02-28 18:44:17 +0100
committerXiretza2020-02-28 18:44:17 +0100
commitb0f224015850c55adee0547f4c62e3dd0f01a7d2 (patch)
treee9b156041af373f4e7408d2cc656c3f11b92fd56
parentf77cb983c9873798909bf232475dae5298adaab1 (diff)
downloadaur-b0f224015850c55adee0547f4c62e3dd0f01a7d2.tar.gz
Enable tests
-rw-r--r--.SRCINFO3
-rw-r--r--PKGBUILD25
2 files changed, 18 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 00e80bf81d9b..046e5dbb8ff5 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = python-mypy_protobuf-git
pkgdesc = Generate mypy stub files from protobuf specs
pkgver = v1.13.r32.gf2a078b
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/dropbox/mypy-protobuf
arch = any
license = Apache
@@ -9,6 +9,7 @@ pkgbase = python-mypy_protobuf-git
makedepends = git
depends = python-setuptools
depends = python-protobuf
+ depends = python-six
source = git+https://github.com/dropbox/mypy-protobuf
sha256sums = SKIP
diff --git a/PKGBUILD b/PKGBUILD
index 0a5e42b0b5de..18475db272ab 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,20 +3,20 @@
pkgname=python-mypy_protobuf-git
_name=mypy-protobuf
pkgver=v1.13.r32.gf2a078b
-pkgrel=1
+pkgrel=2
pkgdesc="Generate mypy stub files from protobuf specs"
arch=(any)
url="https://github.com/dropbox/mypy-protobuf"
license=('Apache')
-depends=('python-setuptools' 'python-protobuf')
+depends=('python-setuptools' 'python-protobuf' 'python-six')
makedepends=('git')
checkdepends=('python-pytest')
source=("git+https://github.com/dropbox/mypy-protobuf")
sha256sums=('SKIP')
pkgver() {
- cd "$_name"
- git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+ cd "$_name"
+ git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
@@ -24,11 +24,18 @@ build() {
python setup.py build
}
-#check() {
-# cd "$_name"
-# protoc --python_out=. --mypy_out=. --proto_path=proto/ $(find proto/test -name "*.proto")
-# pytest
-#}
+check() {
+ cd "$_name"
+
+ # `protoc --mypy_out` requires `protoc-gen-mypy` to be on PATH, but this script is only created
+ # during `setup.py install`. Fake it by just linking it to the main python file.
+ mkdir temp
+ ln -s ../python/mypy_protobuf.py temp/protoc-gen-mypy
+ chmod +x temp/protoc-gen-mypy
+
+ PATH="$PATH:temp" protoc --python_out=. --mypy_out=. --proto_path=proto/ $(find proto/test -name "*.proto")
+ pytest
+}
package() {
cd "$_name/python"