diff options
author | Devaev Maxim <[email protected]> | 2019-04-28 22:05:52 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2019-04-28 22:05:52 +0300 |
commit | 47641bf914c809f3c575d2caf071132008e19587 (patch) | |
tree | 5209b30137b67a4c899ff723572cc79ce8a96846 /setup.py | |
parent | e13b5027d6093cbacccf49e9af9c46c0dc1ef374 (diff) |
fast entrypoints
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -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", |