Use setuptools to build the project

This commit is contained in:
2023-05-05 19:03:23 +02:00
parent c6871ac81a
commit 97419c30f9
7 changed files with 64 additions and 16 deletions

View File

@ -10,7 +10,10 @@ arch=('any')
url="https://github.com/Fuxino/simple_backup.git"
license=('GPL3')
makedepends=('git'
'python-setuptools')
'python-setuptools'
'python-build'
'python-installer'
'python-wheel')
depends=('python'
'rsync'
'python-dotenv'
@ -26,14 +29,20 @@ pkgver()
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare()
{
git -C ${srcdir}/${pkgname} clean -dfx
}
build()
{
cd ${srcdir}/${pkgname}
python3 setup.py build
python -m build --wheel --no-isolation
}
package()
{
cd ${srcdir}/${pkgname}
python3 setup.py install --root=${pkgdir} --optimize=1 --skip-build
python -m installer --destdir=${pkgdir} dist/*.whl
install -Dm644 ${srcdir}/${pkgname}/${pkgname}.conf ${pkgdir}/etc/${pkgname}/${pkgname}.conf
}