Skip to content

Instantly share code, notes, and snippets.

@naetherm
Created November 23, 2020 11:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save naetherm/9a0f4097eab939c17758621e79f3d021 to your computer and use it in GitHub Desktop.
Save naetherm/9a0f4097eab939c17758621e79f3d021 to your computer and use it in GitHub Desktop.
PKGBUILD::torchtext
# Maintainer: John Trengrove <john@retrofilter.com>
# Contributor: Jean Lucas <jean@4ray.co>
_pkgname=torchtext
pkgname=python-torchtext
pkgver=0.8.0
pkgrel=1
pkgdesc='Data loaders and abstractions for text and NLP'
arch=(any)
url='https://github.com/pytorch/text'
license=(BSD)
depends=(python python-pytorch python-tqdm python-requests git)
makedepends=(python-setuptools)
source=(
"git+https://github.com/pytorch/text.git"
"git+https://github.com/google/sentencepiece.git"
"git+https://github.com/google/re2.git"
"git+https://github.com/google/double-conversion.git"
)
sha512sums=(
'SKIP'
'SKIP'
'SKIP'
'SKIP'
)
prepare() {
cd "${srcdir}/text"
git submodule init
git config submodule.sentencepiece.url $srcdir/text-${pkgver}${rcver}/third_party/
git config submodule.re2.url $srcdir/text-${pkgver}${rcver}/third_party/
git config submodule.double-conversion.url $srcdir/text-${pkgver}${rcver}/third_party/
git submodule update
}
package() {
cd text
python setup.py install --root=${pkgdir} --optimize=1
install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment