Skip to content

Commit cc68160

Browse files
committed
Better setup.py
1 parent b0f1190 commit cc68160

File tree

4 files changed

+16
-10
lines changed

4 files changed

+16
-10
lines changed

src/srec2bin.py renamed to bin/srec2bin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
#-----------------------------------------------------------------------------
1515

1616
import argparse
17+
import logging
1718
import os
1819
import sys
1920

20-
from src.srec import *
21-
from src.srecord import *
21+
from srec2bin import *
2222

2323
#-- definitions --------------------------------------------------------------
2424

setup.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from setuptools import find_packages, setup
99

1010
NAME = 'srec2bin_py'
11-
PACKAGES = find_packages(where='.')
11+
PACKAGES = ['srec2bin']
1212
META_PATH = os.path.join('src', '__init__.py')
1313
KEYWORDS = ['motorola', 'srecord', 'S3']
1414
CLASSIFIERS = [
@@ -61,15 +61,16 @@ def find_meta(meta):
6161
license=find_meta('license'),
6262
url=find_meta('uri'),
6363
version=find_meta('version'),
64-
# author=find_meta('author'),
65-
# author_email=find_meta('email'),
66-
# maintainer=find_meta('author'),
67-
# maintainer_email=find_meta('email'),
64+
author=find_meta('author'),
65+
author_email=find_meta('email'),
66+
maintainer=find_meta('author'),
67+
maintainer_email=find_meta('email'),
6868
keywords=KEYWORDS,
6969
long_description=read('README.md'),
7070
packages=PACKAGES,
71-
package_dir={'src': '.'},
72-
package_data={'srec2bin': ['*.rst']},
71+
package_dir={'srec2bin': 'src'},
72+
# package_data={'srec2bin': ['*.rst']},
73+
scripts=['bin/srec2bin.py'],
7374
classifiers=CLASSIFIERS,
7475
install_requires=INSTALL_REQUIRES,
7576
python_requires='>=3.5',

src/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
__version__ = '1.0'
22
__title__ = 'srec2bin'
33
__description__ = 'This utility converts binary data from Motorola S-Record file format [1] to raw binary.'
4+
__author__ = 'Oliver Thamm'
5+
__email__ = 'support@elmicro.com'
46
__uri__ = 'https://github.com/mrbell321/srec2bin_py'
57
__doc__ = __description__ + ' <' + __uri__ + '>'
68
__license__ = 'MIT'
9+
10+
from .srecord import SRecord, Purpose, Type
11+
from .srec import to_image, to_pages, load

src/srec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import logging
22
from typing import Generator, Iterable, Tuple, Optional
33

4-
from srecord import SRecord, Purpose
4+
from .srecord import SRecord, Purpose
55

66
log = logging.getLogger(__name__)
77
log.setLevel(logging.INFO)

0 commit comments

Comments
 (0)