blob: 5d27bb81c8954e8127f1c48104264428b78736b6 (
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
57
58
59
60
61
|
# Maintainer: Neurognostic <neurognostic@astranetics.com>
_pipname=curl_cffi
pkgname=python-${_pipname//_/-}
pkgver=0.10.0
pkgrel=1
pkgdesc='Python FFI binding for curl-impersonate'
arch=(x86_64)
url='https://github.com/lexiforest/curl_cffi'
license=(MIT)
depends=(
libcurl-impersonate-chrome
python
python-certifi
python-cffi
python-eventlet
python-gevent
python-typing_extensions
)
optdepends=('python-orjson: for speed and memory optimized JSON parsing')
makedepends=(
gcc13
python-build
python-installer
python-setuptools
python-wheel
python-python-multipart
unzip
)
source=(
$pkgname-$pkgver.tar.gz::$url/releases/download/v$pkgver/$_pipname-$pkgver.tar.gz
use-system-libs.patch
)
sha256sums=(
'3e37b35268ca58492f54ed020ae4b50c33ee0debad4145db9f746f04ed466eb0'
'2adbc4bfcca05d1c0a41a2e2ed7a9b33353164b05ac8e50b42d3a26662c8e11a'
)
prepare() {
patch -d $_pipname-$pkgver -p1 -i ../use-system-libs.patch
cd $_pipname-$pkgver
make preprocess
}
build() {
cd $_pipname-$pkgver
# TODO: remove gcc13 from makedepends when upstream gets resolved
# https://github.com/lexiforest/curl_cffi/issues/473
export CC=gcc-13 CXX=g++-13
python -m build --wheel --no-isolation
}
package() {
cd $_pipname-$pkgver
python -m installer --destdir="$pkgdir" dist/*.whl
# Symlink license file
local site_packages=$(python -c 'import site;print(site.getsitepackages()[0])')
install -d "$pkgdir/usr/share/licenses/$pkgname"
ln -s "$site_packages/$_pipname-$pkgver.dist-info/LICENSE" \
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
|