summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 15c2bc13210d07fc912333e34d20eb3838a8d3e1 (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
# Maintainer: AlphaJack <alphajack at tuta dot io>

pkgname="python-shillelagh"
_pkgname="${pkgname/python-/}"
pkgver=1.2.14
pkgrel=2
pkgdesc="Making it easy to query APIs via SQL"
url="https://github.com/betodealmeida/shillelagh/"
license=("MIT")
arch=("any")
depends=("python"
         "python-apsw"
         "python-dateutil"
         "python-requests"
         "python-requests-cache"
         "python-sqlalchemy"
         "python-greenlet"
         "python-typing_extensions"
        )
makedepends=("python-build"
             "python-installer"
             "python-wheel"
             "python-setuptools"
             "python-setuptools-scm"
             "python-pyscaffold")
options=("!strip")
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/${_pkgname}/${_pkgname/-/_}-${pkgver}.tar.gz")
b2sums=('d89ddf8af58eca5d89488b8005a8f444db83c93f0b0f413507f25883c1abeffa7cefb6b1f132548c0ce68a6acc5babcec98efb9342c075b4b02fcc95d78c2a6c')

prepare(){
 cd "${_pkgname/-/_}-$pkgver"
 sed -i "setup.cfg" \
     -e "s|author-email|author_email|" \
     -e "s|long-description-content-type|long_description_content_type|" \
     -e "s|long-description|long_description|" \
     -e "s|project-urls|project_urls|" \
     -e "s|setup_requires = pyscaffold.*||"
     
 sed -i "pyproject.toml" \
     -e "s|requires =.*|requires = ['setuptools']|"
}

build(){
 cd "${_pkgname/-/_}-$pkgver"
 python -m build --wheel --no-isolation
}

package(){
 cd "${_pkgname/-/_}-$pkgver"
 python -m installer --destdir="$pkgdir" dist/*.whl
}