diff options
-rw-r--r-- | PKGBUILD | 1 | ||||
-rwxr-xr-x | setup.py | 21 |
2 files changed, 21 insertions, 1 deletions
@@ -62,7 +62,6 @@ package_kvmd() { cd "$srcdir/$pkgname-build" python setup.py install --root="$pkgdir" - install -Dm755 scripts/* "$pkgdir/usr/bin" mkdir -p "$pkgdir/usr/lib/systemd/system" cp configs/os/systemd/*.service "$pkgdir/usr/lib/systemd/system" @@ -21,11 +21,26 @@ # ========================================================================== # +import os +import textwrap + from setuptools import setup +from setuptools.command.easy_install import ScriptWriter # ===== def main() -> None: + ScriptWriter.template = textwrap.dedent(""" + # EASY-INSTALL-ENTRY-SCRIPT: %(spec)r,%(group)r,%(name)r + + __requires__ = %(spec)r + + from kvmd.apps.%(name)r import main + + if __name__ == "__main__": + main() + """).strip() + setup( name="kvmd", version="0.158", @@ -53,6 +68,12 @@ def main() -> None: "kvmd": ["data/*.yaml"], }, + scripts=[ + os.path.join("scripts", name) + for name in os.listdir("scripts") + if not name.startswith(".") + ], + entry_points={ "console_scripts": [ "kvmd = kvmd.apps.kvmd:main", |