python-sympy: update to 1.12

This commit is contained in:
Mehdi Chinoune
2023-05-10 20:47:48 +00:00
committed by مهدي شينون (Mehdi Chinoune)
parent d8bd17e884
commit 9882d3bc2c

View File

@@ -6,7 +6,7 @@ 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=1.11.1
pkgver=1.12
pkgrel=1
pkgdesc="Symbolic manipulation package (Computer Algebra System), written in pure Python (mingw-w64)"
arch=('any')
@@ -16,39 +16,35 @@ license=('BSD')
depends=("${MINGW_PACKAGE_PREFIX}-python"
"${MINGW_PACKAGE_PREFIX}-python-mpmath")
optdepends=("${MINGW_PACKAGE_PREFIX}-python-ipython: user friendly interface for isympy")
makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools")
options=('staticlibs' 'strip' '!debug')
source=("${_realname}-${pkgver}.tar.gz::https://github.com/sympy/sympy/archive/sympy-${pkgver}.tar.gz")
sha512sums=('6cc720b673cf31a2e8f56a5cae24ec15024ea43dee92196adb0a87f28561b5d2404fbbfd3d55a8414930a31d4d0f4a731d458ad528c8cbb03c37555f5c14ce4a')
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
"${MINGW_PACKAGE_PREFIX}-python-installer"
"${MINGW_PACKAGE_PREFIX}-python-setuptools"
"${MINGW_PACKAGE_PREFIX}-python-wheel")
options=(!strip)
source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname/-/_}-${pkgver}.tar.gz")
sha256sums=('ebf595c8dac3e0fdc4152c51878b498396ec7f30e7a914d6071e674d49420fb8')
prepare() {
rm -rf python-build-${CARCH} | true
cp -r "${_realname}-${_realname}-${pkgver}" "python-build-${CARCH}"
# Set version for setuptools_scm
export SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver}
rm -rf python-build-${MSYSTEM} | true
cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}"
}
build() {
cd "${srcdir}/python-build-${CARCH}"
${MINGW_PREFIX}/bin/python setup.py build
cd "${srcdir}/python-build-${MSYSTEM}"
${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation
}
check() {
cd "${srcdir}/python-build-${CARCH}"
${MINGW_PREFIX}/bin/python setup.py test || warning "Tests failed"
cd "${srcdir}/python-build-${MSYSTEM}"
${MINGW_PREFIX}/bin/python -m pytest || warning "Tests failed"
}
package() {
cd "${srcdir}/python-build-${CARCH}"
cd "${srcdir}/python-build-${MSYSTEM}"
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
MSYS2_ARG_CONV_EXCL="--prefix=" \
${MINGW_PREFIX}/bin/python -m installer --prefix=${MINGW_PREFIX} \
--destdir="${pkgdir}" dist/*.whl
install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE"
for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*-script.py; do
sed -e '1 { s/^#!.*$// }' -i ${_f}
done
}