blob: e7a4c39367172ee629762c7b1d65f67f24ea0fdc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
# Maintainer: Agil Mammadov <mammadovagil@tutamail.com>
# Contributor: Zhang Hua
pkgbase=python-nodejs-wheel
pkgname=(python-nodejs-wheel python-nodejs-wheel-binaries)
pkgver=24.16.0
pkgrel=1
pkgdesc="Unoffical Node.js wheels"
arch=("x86_64")
url="https://pypi.org/project/nodejs-wheel/"
license=("MIT")
depends=(python python-typing_extensions)
options=(!lto)
makedepends=(
python-installer python-build python-scikit-build-core python-setuptools-scm python-wheel
python-hatchling python-hatch-vcs python-pip)
source=(
"$pkgbase-$pkgver.tar.gz::https://github.com/njzjz/nodejs-wheel/archive/refs/tags/v$pkgver.tar.gz"
)
sha256sums=('c0fb80acf209d5a1e9312a6d8892be6467de6f11e23f74cda5e416f4c41468e2')
# prepare() {
# cd "$srcdir/nodejs-wheel-$pkgver"
# sed -i 's/BUILD_COMMAND make -j.*/BUILD_COMMAND make -j8/' CMakeLists.txt
# }
build() {
cd "$srcdir/nodejs-wheel-$pkgver"
python -m build --wheel --no-isolation
cd cmd
sed -i "s/source = \"vcs\"/source = \"vcs\"\nfallback-version = \"$pkgver\"/" \
pyproject.toml
python -m build --wheel --no-isolation
}
package_python-nodejs-wheel-binaries() {
depends+=(python-typing_extensions)
cd "$srcdir/nodejs-wheel-$pkgver"
python -m pip install --root="$pkgdir" --prefix=/usr --no-deps --no-build-isolation dist/*.whl
rm -rf "$pkgdir"/usr/lib/python*/site-packages/*.dist-info/direct_url.json
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
package_python-nodejs-wheel() {
depends+=(python-nodejs-wheel-binaries)
pkgdesc+=" (CLI tools)"
conflicts=(nodejs npm)
provides=(nodejs=$pkgver npm)
cd "$srcdir/nodejs-wheel-$pkgver/cmd"
python -m pip install --root="$pkgdir" --prefix=/usr --no-deps --no-build-isolation dist/*.whl
rm -rf "$pkgdir"/usr/lib/python*/site-packages/*.dist-info/direct_url.json
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
|