Skip to content

Commit

Permalink
Better setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbell321 authored and veganschmegan committed Jul 29, 2018
1 parent b0f1190 commit 2445610
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/srec2bin.py → bin/srec2bin.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
#-----------------------------------------------------------------------------

import argparse
import logging
import os
import sys

from src.srec import *
from src.srecord import *
from srec2bin import *

#-- definitions --------------------------------------------------------------

Expand Down
15 changes: 8 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down Expand Up @@ -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',
Expand Down
5 changes: 5 additions & 0 deletions src/__init__.py → srec2bin/__init__.py
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion src/srec.py → srec2bin/srec.py
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
File renamed without changes.

0 comments on commit 2445610

Please sign in to comment.