|
1 | 1 | # Maintainer: @naveen521kk on Github, Naveen M K <[email protected]> |
2 | 2 |
|
3 | | -_pyname=pytest-black |
4 | 3 | _realname=pytest-black |
5 | 4 | pkgbase=mingw-w64-python-${_realname} |
6 | 5 | pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}") |
7 | | -pkgver=0.3.12 |
8 | | -pkgrel=7 |
| 6 | +pkgver=0.6.0 |
| 7 | +pkgrel=1 |
9 | 8 | pkgdesc='A pytest plugin to enable format checking with black (mingw-w64)' |
10 | 9 | arch=('any') |
11 | 10 | mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64') |
12 | 11 | msys2_references=( |
13 | 12 | 'pypi: pytest-black' |
14 | 13 | ) |
15 | | -url="https://github.com/shopkeep/pytest-black" |
16 | | -license=('MIT') |
| 14 | +url='https://github.com/coherent-oss/pytest-black' |
| 15 | +license=('spdx:MIT') |
17 | 16 | depends=( |
18 | 17 | "${MINGW_PACKAGE_PREFIX}-python" |
19 | 18 | "${MINGW_PACKAGE_PREFIX}-python-black" |
20 | 19 | "${MINGW_PACKAGE_PREFIX}-python-pytest" |
21 | 20 | "${MINGW_PACKAGE_PREFIX}-python-toml" |
22 | 21 | ) |
23 | 22 | makedepends=( |
| 23 | + "${MINGW_PACKAGE_PREFIX}-python-build" |
| 24 | + "${MINGW_PACKAGE_PREFIX}-python-installer" |
24 | 25 | "${MINGW_PACKAGE_PREFIX}-python-setuptools" |
25 | 26 | "${MINGW_PACKAGE_PREFIX}-python-setuptools-scm" |
26 | 27 | ) |
27 | | -source=("${_pyname}-${pkgver}.tar.gz::https://pypi.org/packages/source/${_pyname::1}/${_pyname}/${_pyname}-${pkgver}.tar.gz") |
28 | | -sha256sums=('1d339b004f764d6cd0f06e690f6dd748df3d62e6fe1a692d6a5500ac2c5b75a5') |
| 28 | +source=("https://pypi.org/packages/source/${_realname::1}/${_realname/-/_}/${_realname/-/_}-${pkgver}.tar.gz") |
| 29 | +sha256sums=('ecb77455f379805cb4bd8f45a813a3754c3bbee3199adf1b3665c0dfd086b511') |
29 | 30 |
|
30 | | -prepare() { |
31 | | - cd "$srcdir" |
32 | | - rm -rf python-build-${MSYSTEM} | true |
33 | | - cp -r "${_pyname//_/-}-$pkgver" "python-build-${MSYSTEM}" |
| 31 | +build() { |
34 | 32 | export SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver} |
35 | | -} |
| 33 | + cp -r "${_realname/-/_}-${pkgver}" "python-build-${MSYSTEM}" && cd "python-build-${MSYSTEM}" |
36 | 34 |
|
37 | | -build() { |
38 | | - msg "Python build for ${MSYSTEM}" |
39 | | - cd "${srcdir}/python-build-${MSYSTEM}" |
40 | | - ${MINGW_PREFIX}/bin/python setup.py build |
| 35 | + python -m build --wheel --skip-dependency-check --no-isolation |
41 | 36 | } |
42 | 37 |
|
43 | 38 | package() { |
44 | | - cd "${srcdir}/python-build-${MSYSTEM}" |
45 | | - MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ |
46 | | - ${MINGW_PREFIX}/bin/python setup.py install --prefix=${MINGW_PREFIX} \ |
47 | | - --root="${pkgdir}" --optimize=1 --skip-build |
| 39 | + cd "python-build-${MSYSTEM}" |
| 40 | + |
| 41 | + MSYS2_ARG_CONV_EXCL="--prefix=" \ |
| 42 | + python -m installer --prefix=${MINGW_PREFIX} \ |
| 43 | + --destdir="${pkgdir}" dist/*.whl |
| 44 | + |
48 | 45 | install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE" |
49 | 46 | } |
0 commit comments