51 lines
1.5 KiB
Bash
51 lines
1.5 KiB
Bash
# Maintainer: Some One <some.one@some.email.com>
|
|
#This value is here because some python package names have capital letters
|
|
#while there is a strong preference for lowercase letters in ArchLinux and
|
|
#MSYS packages.
|
|
|
|
_realname=editor
|
|
pkgbase=mingw-w64-python-${_realname}
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
|
pkgver=1.0.4
|
|
pkgrel=3
|
|
pkgdesc="Programmatically open an editor, capture the result (mingw-w64)"
|
|
arch=('any')
|
|
url='https://github.com/fmoo/python-editor'
|
|
license=('Apache')
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python3")
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-python3-setuptools")
|
|
options=('staticlibs' 'strip' '!debug')
|
|
source=(${_realname}-${pkgver}.tar.gz::https://github.com/fmoo/python-editor/archive/${pkgver}.tar.gz)
|
|
sha256sums=('61a4758919668b8ffe5eb389a86a4c2e8c2f789c02b9c6aee0ddf3c4ebfe3fd3')
|
|
|
|
prepare() {
|
|
cd "${srcdir}/python-${_realname}-${pkgver}"
|
|
|
|
sed 's|python|python3|' -i editor.py
|
|
# Set version for setuptools_scm
|
|
export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
|
|
}
|
|
|
|
|
|
build() {
|
|
cd "${srcdir}/python-${_realname}-${pkgver}"
|
|
|
|
${MINGW_PREFIX}/bin/python3 setup.py build
|
|
}
|
|
|
|
check() {
|
|
cd "${srcdir}/python-${_realname}-${pkgver}"
|
|
|
|
${MINGW_PREFIX}/bin/python3 setup.py check
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}/python-${_realname}-${pkgver}"
|
|
|
|
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
|
|
${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} \
|
|
--root="${pkgdir}" --optimize=1 --skip-build
|
|
|
|
install -Dm644 README.md "${pkgdir}${MINGW_PREFIX}/share/doc/python3-${_realname}/README.md"
|
|
}
|