diff --git a/setup.py b/setup.py index 0ac44a2f..bd81b852 100644 --- a/setup.py +++ b/setup.py @@ -38,4 +38,7 @@ setup( "Topic :: Software Development :: Libraries :: Python Modules", "Programming Language :: Python", ], -) + entry_points={ + 'console_scripts': ['umap=umap.bin:main'], + }, + ) diff --git a/umap/bin/__init__.py b/umap/bin/__init__.py new file mode 100644 index 00000000..0a252ac3 --- /dev/null +++ b/umap/bin/__init__.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python +import os + +from django.core import management + + +def main(): + os.environ.setdefault( + "DJANGO_SETTINGS_MODULE", + "umap.settings" + ) + management.execute_from_command_line() + + +if __name__ == '__main__': + main()