Add entry point for console script in setup.py
This commit is contained in:
1 parent
1cd36825c1
commit
c5fc3ae896
2 files changed
+10
-1
No files matched your search
@@ -238,7 +238,7 @@ def split_path(path):
|
|||||||
return (split_path(a) if len(a) > 0 else []) + [b]
|
return (split_path(a) if len(a) > 0 else []) + [b]
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
def _main():
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
description='Detect backward incompatible django migrations.')
|
description='Detect backward incompatible django migrations.')
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
@@ -310,3 +310,7 @@ if __name__ == '__main__':
|
|||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
else:
|
else:
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
_main()
|
||||||
@@ -46,6 +46,11 @@ setup(
|
|||||||
extras_require={
|
extras_require={
|
||||||
'test': test_requirements
|
'test': test_requirements
|
||||||
},
|
},
|
||||||
|
entry_points={
|
||||||
|
'console_scripts': [
|
||||||
|
'django-migration-linter = django_migration_linter.migration_linter:_main'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
keywords='django migration lint linter database backward compatibility',
|
keywords='django migration lint linter database backward compatibility',
|
||||||
classifiers=[
|
classifiers=[
|
||||||
|
|||||||
Reference in new issue
Block a user