diff --git a/src/srec2bin.py b/bin/srec2bin.py similarity index 98% rename from src/srec2bin.py rename to bin/srec2bin.py index a5f5ee9..86a9fff 100644 --- a/src/srec2bin.py +++ b/bin/srec2bin.py @@ -14,11 +14,11 @@ #----------------------------------------------------------------------------- import argparse +import logging import os import sys -from src.srec import * -from src.srecord import * +from srec2bin import * #-- definitions -------------------------------------------------------------- diff --git a/setup.py b/setup.py index fa1ff8d..49b563c 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ from setuptools import find_packages, setup NAME = 'srec2bin_py' -PACKAGES = find_packages(where='.') +PACKAGES = ['srec2bin'] META_PATH = os.path.join('src', '__init__.py') KEYWORDS = ['motorola', 'srecord', 'S3'] CLASSIFIERS = [ @@ -61,15 +61,16 @@ def find_meta(meta): license=find_meta('license'), url=find_meta('uri'), version=find_meta('version'), - # author=find_meta('author'), - # author_email=find_meta('email'), - # maintainer=find_meta('author'), - # maintainer_email=find_meta('email'), + author=find_meta('author'), + author_email=find_meta('email'), + maintainer=find_meta('author'), + maintainer_email=find_meta('email'), keywords=KEYWORDS, long_description=read('README.md'), packages=PACKAGES, - package_dir={'src': '.'}, - package_data={'srec2bin': ['*.rst']}, + package_dir={'srec2bin': 'src'}, + # package_data={'srec2bin': ['*.rst']}, + scripts=['bin/srec2bin.py'], classifiers=CLASSIFIERS, install_requires=INSTALL_REQUIRES, python_requires='>=3.5', diff --git a/src/__init__.py b/srec2bin/__init__.py similarity index 64% rename from src/__init__.py rename to srec2bin/__init__.py index 7286cf2..76ebdca 100644 --- a/src/__init__.py +++ b/srec2bin/__init__.py @@ -1,6 +1,11 @@ __version__ = '1.0' __title__ = 'srec2bin' __description__ = 'This utility converts binary data from Motorola S-Record file format [1] to raw binary.' +__author__ = 'Oliver Thamm' +__email__ = 'support@elmicro.com' __uri__ = 'https://github.com/mrbell321/srec2bin_py' __doc__ = __description__ + ' <' + __uri__ + '>' __license__ = 'MIT' + +from .srecord import SRecord, Purpose, Type +from .srec import to_image, to_pages, load \ No newline at end of file diff --git a/src/srec.py b/srec2bin/srec.py similarity index 98% rename from src/srec.py rename to srec2bin/srec.py index 80c4d96..2cf09a3 100644 --- a/src/srec.py +++ b/srec2bin/srec.py @@ -1,7 +1,7 @@ import logging from typing import Generator, Iterable, Tuple, Optional -from srecord import SRecord, Purpose +from .srecord import SRecord, Purpose log = logging.getLogger(__name__) log.setLevel(logging.INFO) diff --git a/src/srecord.py b/srec2bin/srecord.py similarity index 100% rename from src/srecord.py rename to srec2bin/srecord.py