Add entry point for console script in setup.py

This commit is contained in:
David-Wobrock committed 2017-10-31 17:24:14 +01:00
1 parent 1cd36825c1
commit c5fc3ae896
2 files changed
+10 -1

No files matched your search

+5 -1
View File
@@ -238,7 +238,7 @@ def split_path(path):
return (split_path(a) if len(a) > 0 else []) + [b]
if __name__ == '__main__':
def _main():
parser = argparse.ArgumentParser(
description='Detect backward incompatible django migrations.')
parser.add_argument(
@@ -310,3 +310,7 @@ if __name__ == '__main__':
sys.exit(1)
else:
sys.exit(1)
if __name__ == '__main__':
_main()
+5
View File
@@ -46,6 +46,11 @@ setup(
extras_require={
'test': test_requirements
},
entry_points={
'console_scripts': [
'django-migration-linter = django_migration_linter.migration_linter:_main'
]
},
keywords='django migration lint linter database backward compatibility',
classifiers=[