53 lines
1.7 KiB
Bash
53 lines
1.7 KiB
Bash
# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>
|
|
|
|
_realname=markdown-math
|
|
pkgbase=mingw-w64-python-${_realname}
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
|
|
provides=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
|
conflicts=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
|
replaces=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
|
pkgver=0.8
|
|
pkgrel=4
|
|
pkgdesc="Math extension for Python-Markdown (mingw-w64)"
|
|
arch=('any')
|
|
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
|
|
msys2_references=(
|
|
'pypi: python-markdown-math'
|
|
)
|
|
url='https://github.com/mitya57/python-markdown-math'
|
|
license=('BSD')
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python"
|
|
"${MINGW_PACKAGE_PREFIX}-python-markdown")
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools")
|
|
options=('staticlibs' 'strip' '!debug')
|
|
source=("https://files.pythonhosted.org/packages/source/p/python-${_realname}/python-${_realname}-${pkgver}.tar.gz")
|
|
sha256sums=('8564212af679fc18d53f38681f16080fcd3d186073f23825c7ce86fadd3e3635')
|
|
|
|
prepare() {
|
|
rm -rf "python-build-${CARCH}" | true
|
|
cp -r "python-${_realname}-${pkgver}" "python-build-${CARCH}"
|
|
|
|
# Set version for setuptools_scm
|
|
export SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver}
|
|
}
|
|
|
|
build() {
|
|
cd "${srcdir}/python-build-${CARCH}"
|
|
${MINGW_PREFIX}/bin/python setup.py build
|
|
}
|
|
|
|
check() {
|
|
cd "${srcdir}/python-build-${CARCH}"
|
|
${MINGW_PREFIX}/bin/python setup.py test
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}/python-build-${CARCH}"
|
|
|
|
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
|
|
${MINGW_PREFIX}/bin/python setup.py install --prefix=${MINGW_PREFIX} \
|
|
--root="${pkgdir}" --optimize=1 --skip-build
|
|
|
|
install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE"
|
|
}
|