Created
November 23, 2020 11:49
-
-
Save naetherm/9a0f4097eab939c17758621e79f3d021 to your computer and use it in GitHub Desktop.
PKGBUILD::torchtext
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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