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.
65 lines
2.5 KiB
Bash
65 lines
2.5 KiB
Bash
# Contributor: Runar Tenfjord < runar dot tenfjord at gmail dot com >
|
|
|
|
_realname=statsmodels
|
|
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.14.4
|
|
pkgrel=1
|
|
pkgdesc="Statistical computations and models for use with SciPy (mingw-w64)"
|
|
arch=('any')
|
|
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
|
url="https://www.statsmodels.org"
|
|
msys2_repository_url="https://github.com/statsmodels/statsmodels"
|
|
msys2_references=(
|
|
'purl: pkg:pypi/statsmodels'
|
|
)
|
|
license=('spdx:BSD-3-Clause')
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python"
|
|
"${MINGW_PACKAGE_PREFIX}-python-numpy"
|
|
"${MINGW_PACKAGE_PREFIX}-python-scipy"
|
|
"${MINGW_PACKAGE_PREFIX}-python-packaging"
|
|
"${MINGW_PACKAGE_PREFIX}-python-pandas"
|
|
"${MINGW_PACKAGE_PREFIX}-python-patsy")
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
|
|
"${MINGW_PACKAGE_PREFIX}-python-installer"
|
|
"${MINGW_PACKAGE_PREFIX}-python-setuptools"
|
|
"${MINGW_PACKAGE_PREFIX}-python-setuptools-scm"
|
|
"${MINGW_PACKAGE_PREFIX}-cython"
|
|
"${MINGW_PACKAGE_PREFIX}-cc")
|
|
optdepends=("${MINGW_PACKAGE_PREFIX}-python-colorama"
|
|
"${MINGW_PACKAGE_PREFIX}-python-joblib"
|
|
"${MINGW_PACKAGE_PREFIX}-python-matplotlib: needed for plotting functions")
|
|
source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname}-${pkgver}.tar.gz"
|
|
001-dont-include-extra-files.patch)
|
|
sha256sums=('5d69e0f39060dc72c067f9bb6e8033b6dccdb0bae101d76a7ef0bcc94e898b67'
|
|
'9d0aed0638a5f07b305d67318d17de38f766c0d845b911ebea61e6b6f6287570')
|
|
|
|
prepare() {
|
|
cd "${_realname}-${pkgver}"
|
|
patch -p1 -i "${srcdir}"/001-dont-include-extra-files.patch
|
|
|
|
cd "${srcdir}"
|
|
rm -rf "python-build-${MSYSTEM}" | true
|
|
cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}"
|
|
}
|
|
|
|
build() {
|
|
cd "${srcdir}/python-build-${MSYSTEM}"
|
|
CFLAGS+=" -Wno-int-conversion -Wno-implicit-function-declaration" \
|
|
${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"
|
|
}
|