blob: 512a720c570fa2fc81a4f05987b808da8167d101 (
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
62
63
64
65
66
67
68
69
70
71
72
|
# Maintainer: Astro Benzene <universebenzene at sina dot com>
pkgbase=mkdocstrings-crystal
_pyname=("${pkgbase//-/_}")
#pkgname=("${pkgbase}" "${pkgbase}-doc")
#_pkgsuff=${pkgbase#mkdocstrings-}
pkgname=("${pkgbase}")
pkgver=0.3.7
pkgrel=1
pkgdesc="Crystal language doc generator for mkdocstrings"
arch=('any')
url="https://mkdocstrings.github.io/crystal"
license=('MIT')
makedepends=('python-hatchling'
# 'python-platformdirs'
'python-build'
'python-installer')
# 'mkdocstrings-python'
# 'mkdocs-material-pymdownx-extras'
# 'mkdocs-section-index'
# 'python-markdown-callouts'
checkdepends=('python-pytest-golden'
'mkdocstrings'
'python-markdown-callouts') # markupsafe required by jinja, mkdocstrings
# 'python-cached-property'
# mkdocstrings, markdown-callouts
#source=("https://github.com/mkdocstrings/crystal/archive/refs/tags/v${pkgver}.tar.gz")
source=("https://files.pythonhosted.org/packages/source/${_pyname:0:1}/${_pyname}/${_pyname}-${pkgver}.tar.gz")
md5sums=('9af0b7588f05e220f82b0b37ff1942ad')
build() {
cd ${srcdir}/${_pyname}-${pkgver}
# cd "${_pkgsuff}-${pkgver}"
python -m build --wheel --no-isolation
# msg "Building Docs"
# mkdocs build
}
check() {
cd ${srcdir}/${_pyname}-${pkgver}
# cd "${_pkgsuff}-${pkgver}"
mkdir -p dist/lib
bsdtar -xpf dist/${pkgbase/-/_}-${pkgver}-py3-none-any.whl -C dist/lib
PYTHONPATH="dist/lib" pytest || warning "Tests failed" # -vv -l -ra --color=yes -o console_output_style=count
}
package_mkdocstrings-crystal() {
depends=('python>=3.8'
'python-jinja>=2.11.2'
'python-markdown-callouts>=0.1.0'
'python-markupsafe>=1.1.1'
'mkdocs-autorefs>=0.3.1'
'mkdocstrings>=0.19.0')
cd ${srcdir}/${_pyname}-${pkgver}
# cd "${_pkgsuff}-${pkgver}"
install -D -m644 LICENSE.md -t "${pkgdir}/usr/share/licenses/${pkgname}"
install -D -m644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
python -m installer --destdir="${pkgdir}" dist/*.whl
}
#package_mkdocstrings-crystal-doc() {
# pkgdesc="Documentation for mkdocstrings-crystal"
## cd ${srcdir}/${_pyname}-${pkgver}
# cd "${pkgsuff}-${pkgver}"
#
# install -D -m644 LICENSE.md -t "${pkgdir}/usr/share/licenses/${pkgname}"
# install -d -m755 "${pkgdir}/usr/share/doc/${pkgbase}"
# cp -a site "${pkgdir}/usr/share/doc/${pkgbase}"
#}
|