Skip to content

Commit

Permalink
tentative for packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
ratal committed Jun 4, 2015
1 parent 835fce6 commit 8585ba0
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ cur/
tmp/
__pycache__/
*.DS_Store
/dist/
/*.egg-info
Empty file added __init__.py
Empty file.
2 changes: 1 addition & 1 deletion mdfconverter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# along with this program. If not, see http://www.gnu.org/licenses.
#
# ----------------------------------------------------------------------
__version__ = "0.1.6"
__version__ = "0.1.7"
4 changes: 2 additions & 2 deletions mdfreader/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
__author__ = 'Aymeric Rateau (aymeric.rateau@gmail.com)'
__copyright__ = 'Copyright (c) 2015 Aymeric Rateau'
__license__ = 'GPLV3'
__version__ = "0.1.6"
__version__ = "0.1.7"

#if it's run as a script or imported within python, this happens
if __name__ == 'mdfreader':
from mdfreader import *
from .mdfreader import mdf,mdfinfo
2 changes: 1 addition & 1 deletion mdfreader/mdf3reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from time import strftime, time
from struct import pack, Struct
from io import open # for python 3 and 2 consistency
from mdfinfo3 import info3
from .mdfinfo3 import info3
PythonVersion = version_info
PythonVersion = PythonVersion[0]

Expand Down
2 changes: 1 addition & 1 deletion mdfreader/mdf4reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
from math import pow
from sys import platform, version_info
from io import open # for python 3 and 2 consistency
from mdfinfo4 import info4, MDFBlock, ATBlock
from .mdfinfo4 import info4, MDFBlock, ATBlock
from time import gmtime, strftime
from multiprocessing import Queue, Process
PythonVersion = version_info
Expand Down
8 changes: 4 additions & 4 deletions mdfreader/mdfreader.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
from io import open
from struct import unpack
from math import ceil
from mdf3reader import mdf3
from mdf4reader import mdf4
from .mdf3reader import mdf3
from .mdf4reader import mdf4
from numpy import arange, interp, all, diff, mean, vstack, hstack, float64, zeros, empty, delete
from numpy import nan, datetime64, array

Expand Down Expand Up @@ -149,10 +149,10 @@ def readinfo(self, fileName=None, filterChannelNames=False):
VersionNumber = unpack('<H', fid.read(2))
self.mdfversion = VersionNumber[0]
if self.mdfversion < 400: # up to version 3.x not compatible with version 4.x
from mdfinfo3 import info3
from mdfreader.mdfinfo3 import info3
self.update(info3(None, fid, filterChannelNames))
else: # MDF version 4.x
from mdfinfo4 import info4
from mdfreader.mdfinfo4 import info4
self.update(info4(None, fid))

def listChannels(self, fileName=None):
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# Versions should comply with PEP440. For a discussion on single-sourcing
# the version across setup.py and the project code, see
# https://packaging.python.org/en/latest/development.html#single-sourcing-the-version
version='0.1.6',
version='0.1.7',

description='A Measured Data Format file parser',
long_description=long_description,
Expand Down Expand Up @@ -94,7 +94,7 @@
# pip to create the appropriate form of executable for the target platform.
entry_points={
'console_scripts': [
'mdfconverter=mdfconverter:main',
'mdfconverter=mdfconverter.mdfconverter:main',
],
}
)

0 comments on commit 8585ba0

Please sign in to comment.