diff options
-rw-r--r-- | .SRCINFO | 3 | ||||
-rw-r--r-- | PKGBUILD | 25 |
2 files changed, 18 insertions, 10 deletions
@@ -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 @@ -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" |