update to standard based install
This commit is contained in:
4
.SRCINFO
4
.SRCINFO
@@ -6,9 +6,9 @@ pkgbase = python-manga-ocr
|
|||||||
arch = x86_64
|
arch = x86_64
|
||||||
license = Apache-2.0
|
license = Apache-2.0
|
||||||
checkdepends = python-pytest
|
checkdepends = python-pytest
|
||||||
makedepends = python-pip
|
makedepends = python-build
|
||||||
|
makedepends = python-installer
|
||||||
makedepends = python-installer
|
makedepends = python-installer
|
||||||
makedepends = python-wheel
|
|
||||||
depends = python>=3.6
|
depends = python>=3.6
|
||||||
depends = python-fire
|
depends = python-fire
|
||||||
depends = python-fugashi
|
depends = python-fugashi
|
||||||
|
|||||||
52
PKGBUILD
52
PKGBUILD
@@ -7,52 +7,52 @@ pkgdesc="A tool for extracting text from manga images using OCR"
|
|||||||
arch=('x86_64')
|
arch=('x86_64')
|
||||||
url="https://github.com/kha-white/manga-ocr"
|
url="https://github.com/kha-white/manga-ocr"
|
||||||
license=('Apache-2.0')
|
license=('Apache-2.0')
|
||||||
makedepends=('python-pip' 'python-installer' 'python-wheel')
|
makedepends=('python-build' 'python-installer' 'python-installer')
|
||||||
depends=(
|
depends=(
|
||||||
'python>=3.6'
|
'python>=3.6'
|
||||||
'python-fire'
|
'python-fire'
|
||||||
'python-fugashi'
|
'python-fugashi'
|
||||||
'python-jaconv'
|
'python-jaconv'
|
||||||
'python-loguru'
|
'python-loguru'
|
||||||
'python-numpy'
|
'python-numpy'
|
||||||
'python-pillow>=10.0.0'
|
'python-pillow>=10.0.0'
|
||||||
'python-pyperclip'
|
'python-pyperclip'
|
||||||
'python-pytorch>=1.0'
|
'python-pytorch>=1.0'
|
||||||
'python-transformers>=4.25.0'
|
'python-transformers>=4.25.0'
|
||||||
'python-unidic-lite'
|
'python-unidic-lite'
|
||||||
)
|
)
|
||||||
optdepends=(
|
optdepends=(
|
||||||
'python-pytorch: GPU acceleration'
|
'python-pytorch: GPU acceleration'
|
||||||
'wl-clipboard: Read images from the clipboard in the command-line mode on Wayland'
|
'wl-clipboard: Read images from the clipboard in the command-line mode on Wayland'
|
||||||
'xclip: Read images from the clipbaord in the command-line mode on X11'
|
'xclip: Read images from the clipbaord in the command-line mode on X11'
|
||||||
)
|
)
|
||||||
checkdepends=('python-pytest')
|
checkdepends=('python-pytest')
|
||||||
|
|
||||||
conflicts=('manga-ocr-git')
|
conflicts=('manga-ocr-git')
|
||||||
|
|
||||||
source=(
|
source=(
|
||||||
"https://github.com/kha-white/manga_ocr/archive/refs/tags/v${pkgver}.tar.gz"
|
"https://github.com/kha-white/manga_ocr/archive/refs/tags/v${pkgver}.tar.gz"
|
||||||
"skip-example-run-on-boot.patch"
|
"skip-example-run-on-boot.patch"
|
||||||
)
|
)
|
||||||
sha256sums=('f7d73bbf482cbefb6f91ff3c628a3131d6c7dc863612539fe5d03a4b7d640643'
|
sha256sums=('f7d73bbf482cbefb6f91ff3c628a3131d6c7dc863612539fe5d03a4b7d640643'
|
||||||
'd287a2fbfa71d9753cdfd921ce67bd7bf1fcf1e36dd08fc00c8d142305d4da88')
|
'd287a2fbfa71d9753cdfd921ce67bd7bf1fcf1e36dd08fc00c8d142305d4da88')
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
cd "${_pkgname//_/-}-$pkgver"
|
cd "${_pkgname//_/-}-$pkgver"
|
||||||
patch --forward --strip=0 --input=../skip-example-run-on-boot.patch
|
patch --forward --strip=0 --input=../skip-example-run-on-boot.patch
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd "${_pkgname//_/-}-$pkgver"
|
cd "${_pkgname//_/-}-$pkgver"
|
||||||
python -m pip wheel . --no-deps --wheel-dir dist
|
python -m build --wheel --no-isolation
|
||||||
}
|
}
|
||||||
|
|
||||||
check() {
|
check() {
|
||||||
cd "${_pkgname//_/-}-$pkgver"
|
cd "${_pkgname//_/-}-$pkgver"
|
||||||
pytest -o addopts=""
|
pytest -o addopts=""
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
cd "${_pkgname//_/-}-$pkgver"
|
cd "${_pkgname//_/-}-$pkgver"
|
||||||
python -m pip install --no-deps --root="$pkgdir" --prefix=/usr --ignore-installed .
|
python -m installer --destdir="$pkgdir" dist/*.whl
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user