50 lines
1.8 KiB
Bash
50 lines
1.8 KiB
Bash
# Maintainer: Ryuta Suzuki <oroppas@gmail.com>
|
|
|
|
_realname=networkx
|
|
pkgbase=mingw-w64-python-${_realname}
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
|
|
pkgver=3.6.1
|
|
pkgrel=1
|
|
pkgdesc="High-productivity software for complex networks (mingw-w64)"
|
|
arch=('any')
|
|
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
|
license=('spdx:BSD-3-Clause')
|
|
url="https://networkx.org/"
|
|
msys2_repository_url="https://github.com/networkx/networkx"
|
|
msys2_references=(
|
|
'archlinux: python-networkx'
|
|
'purl: pkg:pypi/networkx'
|
|
"cpe: cpe:2.3:a:python:networkx"
|
|
)
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python")
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
|
|
"${MINGW_PACKAGE_PREFIX}-python-installer"
|
|
"${MINGW_PACKAGE_PREFIX}-python-setuptools")
|
|
checkdepends=("${MINGW_PACKAGE_PREFIX}-python-pytest"
|
|
"${MINGW_PACKAGE_PREFIX}-python-pytest-cov")
|
|
optdepends=("${MINGW_PACKAGE_PREFIX}-python-numpy"
|
|
"${MINGW_PACKAGE_PREFIX}-python-scipy"
|
|
"${MINGW_PACKAGE_PREFIX}-python-matplotlib"
|
|
"${MINGW_PACKAGE_PREFIX}-python-pandas")
|
|
source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname}-${pkgver}.tar.gz")
|
|
sha256sums=('26b7c357accc0c8cde558ad486283728b65b6a95d85ee1cd66bafab4c8168509')
|
|
|
|
build() {
|
|
cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}" && cd "python-build-${MSYSTEM}"
|
|
${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation
|
|
}
|
|
|
|
check() {
|
|
cd "${srcdir}"/python-build-${MSYSTEM}
|
|
${MINGW_PREFIX}/bin/python -m pytest || warning "Tests failed"
|
|
}
|
|
|
|
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 -D -m644 LICENSE.txt "${pkgdir}"${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE
|
|
}
|