Skip to content

Commit d4c2741

Browse files
committed
Changed console_scripts target to a function
1 parent a19c771 commit d4c2741

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

pythonforandroid/toolchain.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2743,7 +2743,7 @@ def sdk_tools(self, args):
27432743
for line in output:
27442744
sys.stdout.write(line)
27452745
sys.stdout.flush()
2746-
2746+
27472747
def adb(self, args):
27482748
'''Runs the adb binary from the detected SDK directory, passing all
27492749
arguments straight to it. This is intended as a convenience
@@ -2769,6 +2769,9 @@ def logcat(self, args):
27692769
directory. All extra args are passed as arguments to logcat.'''
27702770
self.adb(['logcat'] + args)
27712771

2772-
if __name__ == "__main__":
27732772

2773+
def main():
27742774
ToolchainCL()
2775+
2776+
if __name__ == "__main__":
2777+
main()

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ def recursively_include(results, directory, patterns):
4949
install_requires=['appdirs', 'colorama>0.3', 'sh', 'jinja2', 'argparse'],
5050
entry_points={
5151
'console_scripts': [
52-
'python-for-android = pythonforandroid.toolchain:ToolchainCL',
53-
'p4a = pythonforandroid.toolchain:ToolchainCL',
52+
'python-for-android = pythonforandroid.toolchain:main',
53+
'p4a = pythonforandroid.toolchain:main',
5454
],
5555
'distutils.commands': [
5656
'bdist_apk = pythonforandroid.bdist_apk:BdistAPK',

0 commit comments

Comments
 (0)