diff --git a/mingw-w64-cssselect2/PKGBUILD b/mingw-w64-cssselect2/PKGBUILD new file mode 100644 index 0000000000000..550e77de595c5 --- /dev/null +++ b/mingw-w64-cssselect2/PKGBUILD @@ -0,0 +1,61 @@ +# Maintainer: J. Peter Mugaas + +_realname=cssselect2 +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}") +pkgver=0.7.0 +pkgrel=1 +pkgdesc="CSS selectors for Python ElementTree (mingw-w64)" +arch=('any') +mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64') +url='https://github.com/Kozea/cssselect2/' +license=('BSD-3-Clause') +depends=("${MINGW_PACKAGE_PREFIX}-python" + "${MINGW_PACKAGE_PREFIX}-python-tinycss2" + "${MINGW_PACKAGE_PREFIX}-python-webencodings") +makedepends=("${MINGW_PACKAGE_PREFIX}-python-build" + "${MINGW_PACKAGE_PREFIX}-python-flit-core" + "${MINGW_PACKAGE_PREFIX}-python-installer" + "${MINGW_PACKAGE_PREFIX}-python-wheel") +checkdepends=("${MINGW_PACKAGE_PREFIX}-python-pytest" + "${MINGW_PACKAGE_PREFIX}-python-pytest-cov" + "${MINGW_PACKAGE_PREFIX}-python-pytest-isort") +options=('!strip') +source=("https://files.pythonhosted.org/packages/e7/fc/326cb6f988905998f09bb54a3f5d98d4462ba119363c0dfad29750d48c09/${_realname}-${pkgver}.tar.gz") +sha256sums=('1ccd984dab89fc68955043aca4e1b03e0cf29cad9880f6e28e3ba7a74b14aa5a') + +prepare() { + cd "${srcdir}/${_realname}-${pkgver}" + + ## (OPTIONAL) Only if setuptools-scm is used + # Set version for setuptools_scm + export SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver} +} + +build() { + msg "Python build for ${MSYSTEM}" + cd "${srcdir}" + cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}" && cd "python-build-${MSYSTEM}" + + ${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation +} + +check() { + msg "Python test for ${MSYSTEM}" + cd "${srcdir}/python-build-${MSYSTEM}" + +# The test command will usually depend upon what is contained in the tox.ini file +# or in the [testenv:py] section of the pyproject.toml file. + ${MINGW_PREFIX}/bin/pytest | true +} + +package() { + msg "Python install for ${MSYSTEM}" + 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 "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE" +} diff --git a/mingw-w64-python-svglib/PKGBUILD b/mingw-w64-python-svglib/PKGBUILD new file mode 100644 index 0000000000000..6f7380d46f4f6 --- /dev/null +++ b/mingw-w64-python-svglib/PKGBUILD @@ -0,0 +1,64 @@ +# Maintainer: J. Peter Mugaas + +_realname=svglib +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}") +pkgver=1.5.1 +pkgrel=1 +pkgdesc="Read SVG files and convert them to other formats (mingw-w64)" +arch=('any') +mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64') +url="https://github.com/deeplook/svglib" +license=('LGPL-3.0-only') +depends=("${MINGW_PACKAGE_PREFIX}-python" + "${MINGW_PACKAGE_PREFIX}-python-cssselect2" + "${MINGW_PACKAGE_PREFIX}-python-lxml" + "${MINGW_PACKAGE_PREFIX}-python-reportlab" + "${MINGW_PACKAGE_PREFIX}-python-tinycss2" +) +makedepends=("${MINGW_PACKAGE_PREFIX}-python-build" + "${MINGW_PACKAGE_PREFIX}-python-installer" + "${MINGW_PACKAGE_PREFIX}-python-setuptools" + "${MINGW_PACKAGE_PREFIX}-python-wheel") +checkdepends=("${MINGW_PACKAGE_PREFIX}-python-pillow" + "${MINGW_PACKAGE_PREFIX}-python-pytest") +options=('!strip') +source=("https://files.pythonhosted.org/packages/56/5b/53ca0fd447f73423c7dc59d34e523530ef434481a3d18808ff7537ad33ec/${_realname}-${pkgver}.tar.gz") +sha256sums=('3ae765d3a9409ee60c0fb4d24c2deb6a80617aa927054f5bcd7fc98f0695e587') + +prepare() { + cd "${srcdir}/${_realname}-${pkgver}" + + ## (OPTIONAL) Only if setuptools-scm is used + # Set version for setuptools_scm + export SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver} +} + +build() { + msg "Python build for ${MSYSTEM}" + cd "${srcdir}" + cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}" && cd "python-build-${MSYSTEM}" + + ${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation +} + +check() { + msg "Python test for ${MSYSTEM}" + cd "${srcdir}/python-build-${MSYSTEM}" + +# The test command will usually depend upon what is contained in the tox.ini file +# or in the [testenv:py] section of the pyproject.toml file. + ${MINGW_PREFIX}/bin/pytest | true +} + +package() { + msg "Python install for ${MSYSTEM}" + 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" + install -vDm 644 {CHANGELOG,CONTRIBUTORS,README}.rst -t "$pkgdir${MINGW_PREFIX}/share/doc/$pkgname/" +}