diff options
author | CyrilWaechter | 2021-05-24 11:46:01 +0200 |
---|---|---|
committer | CyrilWaechter | 2021-05-24 11:46:01 +0200 |
commit | 53a9fac627bfd14fda1a3ded0bc39edaeab84cdb (patch) | |
tree | 70dd1f110b19c7b533bf1adc266549b4a358f765 | |
download | aur-53a9fac627bfd14fda1a3ded0bc39edaeab84cdb.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | PKGBUILD | 49 |
2 files changed, 70 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..6f787de038ed --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,21 @@ +pkgbase = python-specklepy-git + pkgdesc = This is the start of the Python client for Speckle 2.0. It is currently quite nebulous and may be trashed and rebuilt at any moment! It is compatible with Python 3.6+. + pkgver = 2.1.0.r8.g46437e7 + pkgrel = 1 + url = https://github.com/specklesystems/speckle-py + arch = x86_64 + arch = i686 + license = Apache + depends = python + depends = python-pydantic + depends = python-gql + depends = python-aiohttp + depends = python-appdirs + depends = python-requests + depends = python-websockets + provides = python-specklepy + source = git+https://github.com/specklesystems/speckle-py.git + md5sums = SKIP + +pkgname = python-specklepy-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..4285e024777e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,49 @@ +# Maintainer: Cyril Waechter <cyril[at]biminsight[dot]ch> +pkgname=(python-specklepy-git) +pkgver=2.1.0.r8.g46437e7 +pkgrel=1 +pkgdesc="This is the start of the Python client for Speckle 2.0. It is currently quite nebulous and may be trashed and rebuilt at any moment! It is compatible with Python 3.6+." +arch=('x86_64' 'i686') +url="https://github.com/specklesystems/speckle-py" +license=('Apache') +depends=('python' 'python-pydantic' 'python-gql' 'python-aiohttp' 'python-appdirs' 'python-requests' 'python-websockets') +optdepends=() +makedepends=() +provides=('python-specklepy') +conflicts=() +replaces=() +backup=() +source=("git+https://github.com/specklesystems/speckle-py.git") +_python_ver=$(python --version | grep -Po 'Python \K[0-9]\..') + +prepare() { + cd "${srcdir}/speckle-py" +} + +pkgver() { + cd speckle-py + + if GITTAG="$(git describe --abbrev=0 --tags 2>/dev/null)"; then + echo "$(sed -e "s/^${pkgname%%-git}//" -e 's/^[-_/a-zA-Z]\+//' -e 's/[-_+]/./g' <<< ${GITTAG}).r$(git rev-list --count ${GITTAG}..).g$(git log -1 --format="%h")" + else + echo "0.r$(git rev-list --count master).g$(git log -1 --format="%h")" + fi +} + +build() { + cd "${srcdir}/speckle-py" +} + +package() { + # Install license file + cd "${srcdir}/speckle-py" + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + + # Install python modules + mkdir -p "${pkgdir}/usr/lib/python${_python_ver}/site-packages/" + cd "${pkgdir}/usr/lib/python${_python_ver}/site-packages/" + cp -rf "${srcdir}/speckle-py/specklepy" "./" + python -O -m compileall "./" +} + +md5sums=('SKIP') |