new build architecture

This commit is contained in:
Maximilian P. Käfer 2022-03-25 19:32:03 +01:00
parent c8003f0ca7
commit f859ddd339
Signed by: mpk
GPG Key ID: 035869C949377C5C
6 changed files with 10 additions and 11 deletions

View File

@ -8,7 +8,7 @@ url="https://git.kske.dev/DieGurke/pwgen"
license=('GPL')
groups=()
depends=('binutils' 'python')
makedepends=('git')
makedepends=('git' 'python-build' 'python-installer')
checkupdates=()
optdepends=('bash')
provides=(pwgen)
@ -26,9 +26,14 @@ pkgver() {
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
build() {
python -m build --wheel --no-isolation
}
package() {
cd ${pkgname}
install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
install -Dm755 pwgen.sh "${pkgdir}/usr/bin/pwgen"
python -m installer --destdir="$pkgdir" dist/*.whl
}

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash
imp="import pwgenerator as g;"
imp="from src import pwgenerator as g;"
function _help() {
echo "Usage: pwgen [length] [mode]"

3
pyproject.toml Normal file
View File

@ -0,0 +1,3 @@
[build-system]
requres = ["setuptools>=42"]
build-backend = "setuptools.build_meta"

View File

@ -1,9 +0,0 @@
setup(
name='pwgen',
version='1.0',
description='Random Password Generator Module',
author="Maximilian Käfer",
author_email='maxi@kske.dev',
packages=['pwgen'],
install_requires=['wheel'],
)

0
src/__init__.py Normal file
View File