| # Maintainer: @naveen521kk on Github, Naveen M K <naveen@syrusdark.website> |
| |
| _pyname=singledispatch |
| _realname=singledispatch |
| pkgbase=mingw-w64-python-${_realname} |
| pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}") |
| pkgver=3.6.2 |
| pkgrel=1 |
| pkgdesc='Backport functools.singledispatch from Python 3.4 to Python 2.6-3.3. (mingw-w64)' |
| arch=('any') |
| mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32') |
| url="https://pypi.org/project/singledispatch/" |
| license=('MIT') |
| depends=( |
| "${MINGW_PACKAGE_PREFIX}-python-six" |
| ) |
| makedepends=( |
| "${MINGW_PACKAGE_PREFIX}-python-setuptools" |
| "${MINGW_PACKAGE_PREFIX}-python-setuptools-scm" |
| ) |
| source=("${_pyname}-${pkgver}.tar.gz::https://pypi.org/packages/source/${_pyname::1}/${_pyname}/${_pyname}-${pkgver}.tar.gz") |
| sha256sums=('d5bb9405a4b8de48e36709238e8b91b4f6f300f81a5132ba2531a9a738eca391') |
| |
| prepare() { |
| cd "$srcdir" |
| rm -rf python-build-${CARCH} | true |
| cp -r "${_pyname//_/-}-$pkgver" "python-build-${CARCH}" |
| export SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver} |
| } |
| |
| build() { |
| msg "Python build for ${CARCH}" |
| cd "${srcdir}/python-build-${CARCH}" |
| ${MINGW_PREFIX}/bin/python setup.py build |
| } |
| |
| 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" |
| } |