Files
MINGW-packages/mingw-w64-python-python_ics/PKGBUILD
2024-01-17 21:46:35 +01:00

53 lines
2.0 KiB
Bash

# Maintainer: Alexey Pavlov <alexpux@gmail.com>
_realname=python_ics
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=913.16
pkgrel=1
pkgdesc="Library for interfacing with Intrepid devices in Python. (mingw-w64)"
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
url='https://github.com/intrepidcs/python_ics/'
msys2_references=(
'pypi: python-ics'
)
license=('spdx:MIT')
depends=("${MINGW_PACKAGE_PREFIX}-python"
"${MINGW_PACKAGE_PREFIX}-gcc-libs")
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
"${MINGW_PACKAGE_PREFIX}-python-installer"
"${MINGW_PACKAGE_PREFIX}-python-setuptools"
"${MINGW_PACKAGE_PREFIX}-python-wheel"
"${MINGW_PACKAGE_PREFIX}-clang")
_ice_commit=8297cfe21439525b1ccf6ffac9e7527f75d1b4f5
source=("https://github.com/intrepidcs/python_ics/archive/v${pkgver}/${_realname}-${pkgver}.tar.gz"
"https://github.com/ic3man5/ice/archive/${_ice_commit}/ice-${_ice_commit}.tar.gz")
sha256sums=('39614ecbfb82f54e13225c5c3b5ce24a26cda55365d54429d383e11d407b9cff'
'3492a4d4f2dc5b9e691254ffa22924106d9377677d11aaec7aa6104b73c67cea')
prepare() {
cd ${_realname}-${pkgver}
rm -rf src/ice && cp -r "${srcdir}"/ice-${_ice_commit} src/ice
cd "${srcdir}"
cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}"
}
build() {
cd "${srcdir}/python-build-${MSYSTEM}"
${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation
}
package() {
cd "${srcdir}/python-build-${MSYSTEM}"
MSYS2_ARG_CONV_EXCL="--prefix=" \
${MINGW_PREFIX}/bin/python -m installer --prefix=${MINGW_PREFIX} \
--destdir="${pkgdir}" dist/*.whl
#install -Dm644 LICENSE.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE.txt"
}