Skip to content

Commit 4610d37

Browse files
committed
use entry_points console_scripts instead
1 parent 94a58b9 commit 4610d37

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

elasticgit/tools.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ def run(parser): # pragma: no cover
3838
dispatcher = dispatcher_class()
3939
dispatcher.run(**data)
4040

41-
if __name__ == '__main__': # pragma: no cover
41+
42+
def main(): # pragma: no cover
4243
parser = get_parser()
4344
run(parser)

scripts/eg-tools

-6
This file was deleted.

setup.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@
2424
url='http://github.com/universalcore/elastic-git',
2525
license='BSD',
2626
keywords='git elasticsearch json',
27-
scripts=['scripts/eg-tools'],
2827
packages=find_packages(),
2928
include_package_data=True,
3029
zip_safe=False,
3130
install_requires=requires,
32-
tests_require=requires)
31+
tests_require=requires,
32+
entry_points={
33+
'console_scripts': ['eg-tools = elasticgit.tools:main'],
34+
})

0 commit comments

Comments
 (0)