Skip to content

Commit 53ce472

Browse files
committed
Use console_scripts in setup.py
1 parent 1cb4974 commit 53ce472

File tree

10 files changed

+25
-13
lines changed

10 files changed

+25
-13
lines changed

boottodownload

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
edlclient/Tools/boottodwnload
1+
edlclient/Tools/boottodownload.py

edl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,6 @@ from edlclient.Library.utils import is_windows
149149

150150
args = docopt(__doc__, version='3')
151151

152-
print("Qualcomm Sahara / Firehose Client V3.62 (c) B.Kerler 2018-2025.")
153-
154-
155152
class main(metaclass=LogBase):
156153
def __init__(self, args, imported: str = ''):
157154
self.serial = None
@@ -403,7 +400,10 @@ class main(metaclass=LogBase):
403400
else:
404401
return self.exit(1)
405402

406-
407-
if __name__ == '__main__':
403+
def run():
404+
print("Qualcomm Sahara / Firehose Client V3.62 (c) B.Kerler 2018-2025.")
408405
base = main(args, __name__)
409406
base.run()
407+
408+
if __name__ == '__main__':
409+
run()
File renamed without changes.
File renamed without changes.

edlclient/Tools/enableadb renamed to edlclient/Tools/enableadb.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# !!!!! If you use this code in commercial products, your product is automatically
77
# GPLv3 and has to be open sourced under GPLv3 as well. !!!!!
88
import argparse
9+
import copy
910
import hashlib
1011
import time
1112
import os

edlclient/Tools/fhloaderparse renamed to edlclient/Tools/fhloaderparse.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ def is_duplicate(loaderdb, sign_info):
283283
return False
284284

285285

286-
def main(argv):
286+
def main(argv=sys.argv):
287287
file_list = []
288288
path = ""
289289
if len(argv) < 3:
@@ -497,4 +497,5 @@ class loaderinfo:
497497
rt.close()
498498

499499

500-
main(sys.argv)
500+
if __name__ == "__main__":
501+
main(sys.argv)

edlclient/Tools/sierrakeygen.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def __init__(cls, *args):
9090
C6 = 3 1 7 0 3 0 1
9191
C5 = 0 2 5 3 0 3 2
9292
C8 = 1 3 3 1 5 7 3
93-
C4 = 5 4 1 4 1 1 4
93+
C4 = 5 4 1 4 1 1 4
9494
'''
9595
prodtable = {
9696
"MDM8200": dict(openlock=0, openmep=1, opencnd=0, clen=8, init=[1, 3, 5, 7, 0],
@@ -584,7 +584,7 @@ def openlock(self):
584584
return False
585585

586586

587-
def main(args):
587+
def main(args=sys.argv):
588588
version = "1.5"
589589
info = 'Sierra Wireless Generator ' + version + ' (c) B. Kerler 2019-2021'
590590
parser = argparse.ArgumentParser(formatter_class=argparse.RawDescriptionHelpFormatter, description=info)

enableadb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
edlclient/Tools/enableadb
1+
edlclient/Tools/enableadb.py

fhloaderparse

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
edlclient/Tools/fhloaderparse
1+
edlclient/Tools/fhloaderparse.py

setup.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,17 @@
77
version='3.62',
88
packages=find_packages(),
99
long_description=open("README.md").read(),
10-
scripts=['edl','edlclient/Tools/qc_diag.py','edlclient/Tools/sierrakeygen.py','edlclient/Tools/boottodwnload','edlclient/Tools/enableadb','edlclient/Tools/fhloaderparse','edlclient/Tools/beagle_to_loader'],
10+
entry_points={
11+
'console_scripts': [
12+
'edl=edlclient.edl:run',
13+
'qc_diag=edlclient.Tools.qc_diag:main',
14+
'sierrakeygen=edlclient.Tools.sierrekeygen:main',
15+
'boottodownload=edlclient.Tools.boottodownload:main',
16+
'enableadb=edlclient.Tools.enableadb:main',
17+
'fhloaderparse=edlclient.Tools.fhloaderparse:main',
18+
'beagle_to_loader=edlclient.Tools.beagle_to_loader:main',
19+
],
20+
},
1121
data_files = ['LICENSE','README.md'],
1222
long_description_content_type="text/markdown",
1323
url='https://github.com/bkerler/edl',

0 commit comments

Comments
 (0)