setup.py installs a "kepi" commandline tool which delegates to manage.py.

At present it just calls kepi-list.

Gitlab URL in setup.py corrected.
trilby
Marnanel Thurman 2019-08-19 17:08:59 +01:00
rodzic e794076248
commit d9891d7295
2 zmienionych plików z 35 dodań i 2 usunięć

Wyświetl plik

@ -0,0 +1,28 @@
import kepi.settings
from django.core.management import get_commands, call_command
from django.conf import settings
from pkg_resources import resource_filename
import django
import os
KEPI_PREFIX = 'kepi-'
def show_commands():
for command in sorted(get_commands().keys()):
if command.startswith(KEPI_PREFIX):
print(command[len(KEPI_PREFIX):])
def main():
#resource_filename('kepi', 'settings.py'),
#
os.environ.setdefault(
"DJANGO_SETTINGS_MODULE",
"kepi.settings"
)
django.setup()
show_commands()
call_command('kepi-list')

Wyświetl plik

@ -20,7 +20,7 @@ version = get_version('django_kepi')
setup(
name='kepi',
version=version,
url='https://gitlab.com/marnanel/django-kepi/',
url='https://gitlab.com/marnanel/kepi/',
license='GPL-2',
description='ActivityPub for Django',
long_description=README,
@ -34,6 +34,11 @@ setup(
#zip_safe=False,
classifiers=[
# XXX fixme
]
],
entry_points = {
'console_scripts': [
'kepi=django_kepi.command_line:main',
],
},
)