This allows us to include a version and we already use PURL for other things, so might as well remove the pypi special case. Normalize the names, since that is required for PURLs.
41 lines
1.1 KiB
Bash
41 lines
1.1 KiB
Bash
# Maintainer: Christoph Reiter <reiter.christoph@gmail.com>
|
|
|
|
_pyname=markdown
|
|
pkgname=python-markdown
|
|
pkgver=3.7
|
|
pkgrel=1
|
|
pkgdesc="Python implementation of John Gruber's Markdown"
|
|
arch=('any')
|
|
url='https://python-markdown.github.io/'
|
|
license=('spdx:BSD-3-Clause')
|
|
depends=('python')
|
|
makedepends=('python-build' 'python-installer' 'python-setuptools')
|
|
optdepends=('python-yaml: parse Python in YAML metadata')
|
|
checkdepends=('python-yaml')
|
|
msys2_repository_url="https://github.com/Python-Markdown/markdown"
|
|
msys2_references=(
|
|
'purl: pkg:pypi/markdown'
|
|
)
|
|
source=("${_pyname}-$pkgver.tar.gz"::"https://pypi.org/packages/source/${_pyname::1}/${_pyname}/${_pyname}-${pkgver}.tar.gz")
|
|
sha256sums=('2ae2471477cfd02dbbf038d5d9bc226d40def84b4fe2986e49b59b6b472bbed2')
|
|
|
|
build() {
|
|
cd "${_pyname}-$pkgver"
|
|
|
|
python -m build --wheel --no-isolation
|
|
}
|
|
|
|
check() {
|
|
cd "${_pyname}-$pkgver"
|
|
|
|
python -m unittest discover tests
|
|
}
|
|
|
|
package() {
|
|
cd "${_pyname}-$pkgver"
|
|
|
|
python -m installer --destdir="$pkgdir" dist/*.whl
|
|
|
|
install -Dm644 LICENSE.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md"
|
|
}
|