diff options
author | Philipp Joram | 2023-07-16 17:06:55 +0300 |
---|---|---|
committer | Philipp Joram | 2023-07-16 17:06:55 +0300 |
commit | fbc1bdeddf20a8749e7e0a8db2cb0616d7583ff4 (patch) | |
tree | f2a7ab2e75c3166e54e788d401c0bde451d83903 /PKGBUILD | |
parent | e0f7151735a9857c4fd5ddac4ca9d26c25a33a6d (diff) | |
download | aur-python-dacite.tar.gz |
Build from upstream source instead of PyPI wheel
For 1.8.1, the source package disappeared from PyPI and we fell back to
the PyPI wheel. Packaging guidelines suggest to build from source
whenever possible, so let's do that. Upstream has been asked to provide
a source package on PyPI [1].
[1]: https://github.com/konradhalas/dacite/issues/235
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 24 |
1 files changed, 16 insertions, 8 deletions
@@ -3,22 +3,30 @@ pkgname='python-dacite' _name=${pkgname#python-} pkgver=1.8.1 -pkgrel=1 +pkgrel=2 pkgdesc="Simplify creation of data classes (PEP 557) from dictionaries." url="https://github.com/konradhalas/dacite" arch=('any') license=('MIT') depends=('python') -makedepends=('python-installer') -source=("https://files.pythonhosted.org/packages/py3/${_name::1}/$_name/${_name//-/_}-$pkgver-py3-none-any.whl" +makedepends=( + 'python-build' + 'python-installer' + 'python-wheel' + 'python-setuptools' + ) +source=("${_name}-${pkgver}.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz" ) -sha512sums=('747c8566b5ea6d68234fe8715d0a926ac9a916693e824841ee00338a3e1fbaac0632567b03f20cd6425a18facb434b9f3671a47a1f8d6d2a78aed8767d0d7f3f' - ) -noextract=("${_name}-${pkgver}-py3-none-any.whl") +sha256sums=('791ac3da85a040684a96df59e2320dc7b3cac000ff536e3f4b00fb3b67520b86') + +build() { + cd "$_name-$pkgver" + python -m build --wheel --no-isolation +} package() { - # Source package is not available on PyPI; use provided wheel package instead. - python -m installer --destdir="$pkgdir" "${srcdir}/${_name}-${pkgver}-py3-none-any.whl" + cd "$_name-$pkgver" + python -m installer --destdir="$pkgdir" dist/*.whl # Symlink license file (cf. PKGBUILD for python-black) local site_packages=$(python -c "import site; print(site.getsitepackages()[0])") |