summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO30
-rw-r--r--PKGBUILD56
2 files changed, 57 insertions, 29 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f92151eff98..e182b422c03 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,20 +1,30 @@
pkgbase = fairseq
- pkgdesc = sequence modeling toolkit
- pkgver = 0.10.2
+ pkgdesc = Sequence modeling toolkit
+ pkgver = 0.12.2
pkgrel = 1
- url = https://github.com/pytorch/fairseq
- arch = i686
+ url = https://github.com/facebookresearch/fairseq
arch = x86_64
license = MIT
- depends = cuda
- depends = nccl
- depends = python-antlr4
+ makedepends = cython
+ makedepends = python-build
+ makedepends = python-installer
+ makedepends = python-setuptools
+ makedepends = python-wheel
+ depends = python>=3.6
depends = python-bitarray
- depends = python-hydra
+ depends = python-cffi
+ depends = python-hydra-core
+ depends = python-numpy
depends = python-omegaconf
depends = python-pytorch
+ depends = python-regex
+ depends = python-sacrebleu
+ depends = python-tqdm
+ depends = python-torchaudio
+ optdepends = cuda: Model training
+ optdepends = nccl: Model training
optdepends = python-apex: Faster training
- source = https://github.com/pytorch/fairseq/archive/refs/tags/v0.10.2.tar.gz
- sha256sums = 4328a7cb5fe6aea874817a863eb7f1ace91d621bc504345e6d022ce64e065da0
+ source = fairseq-0.12.2.tar.gz::https://github.com/facebookresearch/fairseq/archive/v0.12.2.tar.gz
+ sha256sums = b5bb076f8b0d5b06a897b11627da278816752b2202650c34becd8f4240f86961
pkgname = fairseq
diff --git a/PKGBUILD b/PKGBUILD
index 2334ea0d25e..180f536bacc 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,29 +1,47 @@
-# Maintainer: Filip Graliński <filipg@amu.edu.pl>
+# Maintainer: Luis Martinez <luis dot martinez at disroot dot org>
+# Contributor: Filip Graliński <filipg@amu.edu.pl>
pkgname=fairseq
-pkgver=0.10.2
+pkgver=0.12.2
pkgrel=1
-pkgdesc="sequence modeling toolkit"
-arch=('i686' 'x86_64')
-url="https://github.com/pytorch/fairseq"
+pkgdesc="Sequence modeling toolkit"
+arch=('x86_64')
+url="https://github.com/facebookresearch/fairseq"
license=('MIT')
-depends=('cuda'
- 'nccl'
- 'python-antlr4'
- 'python-bitarray'
- 'python-hydra'
- 'python-omegaconf'
- 'python-pytorch')
-optdepends=('python-apex: Faster training')
-source=("https://github.com/pytorch/$pkgname/archive/refs/tags/v${pkgver}.tar.gz")
-sha256sums=('4328a7cb5fe6aea874817a863eb7f1ace91d621bc504345e6d022ce64e065da0')
+depends=(
+ 'python>=3.6'
+ 'python-bitarray'
+ 'python-cffi'
+ 'python-hydra-core'
+ 'python-numpy'
+ 'python-omegaconf'
+ 'python-pytorch'
+ 'python-regex'
+ 'python-sacrebleu'
+ 'python-tqdm'
+ 'python-torchaudio')
+optdepends=(
+ 'cuda: Model training'
+ 'nccl: Model training'
+ 'python-apex: Faster training')
+makedepends=(
+ 'cython'
+ 'python-build'
+ 'python-installer'
+ 'python-setuptools'
+ 'python-wheel')
+source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
+sha256sums=('b5bb076f8b0d5b06a897b11627da278816752b2202650c34becd8f4240f86961')
build() {
- cd $pkgname-$pkgver
- python setup.py build
+ cd "$pkgname-$pkgver"
+ python -m build --wheel --no-isolation
}
package() {
- cd $pkgname-$pkgver
- python setup.py install --root="$pkgdir" --optimize=1
+ cd "$pkgname-$pkgver"
+ PYTHONHASHSEED=0 python -m installer --destdir="$pkgdir" dist/*.whl
+ local _site="$(python -c 'import site; print(site.getsitepackages()[0])')"
+ install -d "$pkgdir/usr/share/licenses/$pkgname/"
+ ln -s "$_site/$pkgname-$pkgver.dist-info/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/"
}