Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion intelhex/bench.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# (c) Alexander Belchenko, 2007, 2009

# [2013/08] NOTE: This file is keeping for historical reasons.
Expand Down
Empty file added intelhex/scripts/__init__.py
Empty file.
7 changes: 5 additions & 2 deletions scripts/bin2hex.py → intelhex/scripts/bin2hex.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python

# Copyright (c) 2008-2018 Alexander Belchenko
# All rights reserved.
Expand Down Expand Up @@ -37,7 +37,7 @@

VERSION = '2.3.0'

if __name__ == '__main__':
def main():
import getopt
import os
import sys
Expand Down Expand Up @@ -113,3 +113,6 @@

from intelhex import bin2hex
sys.exit(bin2hex(fin, fout, offset))

if __name__ == '__main__':
main()
7 changes: 5 additions & 2 deletions scripts/hex2bin.py → intelhex/scripts/hex2bin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python

# Copyright (c) 2005-2018 Alexander Belchenko
# All rights reserved.
Expand Down Expand Up @@ -37,7 +37,7 @@

VERSION = '2.3.0'

if __name__ == '__main__':
def main():
import getopt
import os
import sys
Expand Down Expand Up @@ -130,3 +130,6 @@

from intelhex import hex2bin
sys.exit(hex2bin(fin, fout, start, end, size, pad))

if __name__ == '__main__':
main()
2 changes: 1 addition & 1 deletion scripts/hex2dump.py → intelhex/scripts/hex2dump.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python

# Copyright (c) 2008-2018 Alexander Belchenko
# All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion scripts/hexdiff.py → intelhex/scripts/hexdiff.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python

# Copyright (c) 2011-2018 Alexander Belchenko
# All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion scripts/hexinfo.py → intelhex/scripts/hexinfo.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python

# Copyright (c) 2015 Andrew Fernandes <andrew@fernandes.org>
# All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion scripts/hexmerge.py → intelhex/scripts/hexmerge.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python

# Copyright (c) 2008-2018 Alexander Belchenko
# All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[wheel]
[bdist_wheel]
universal = 1
20 changes: 16 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python

# Copyright (c) 2008-2018, Alexander Belchenko
# All rights reserved.
Expand Down Expand Up @@ -35,7 +35,7 @@

"""Setup script for IntelHex."""

import sys, glob
import os, sys, glob
try:
from setuptools import setup
except ImportError:
Expand All @@ -46,12 +46,24 @@

LONG_DESCRIPTION = open('README.rst', 'r').read()

SCRIPT_MODULES = [os.path.splitext(x)[0] for x in glob.glob('intelhex/scripts/*')]

print(SCRIPT_MODULES)

METADATA = dict(
name='intelhex',
version=intelhex.__version__.version_str,

scripts=glob.glob('scripts/*'),
packages=['intelhex'],
# Include the scripts as a subpackage
packages=['intelhex', 'intelhex.scripts'],

# For every script file, add an entrypoint
entry_points={
"console_scripts": [
"{name}.py = intelhex.scripts.{name}:main".format(name=os.path.basename(x))
for x in SCRIPT_MODULES
]
},

author='Alexander Belchenko',
author_email='alexander.belchenko@gmail.com',
Expand Down