Skip to content
Snippets Groups Projects
Commit d8d8dc7f authored by Tamas Gal's avatar Tamas Gal :speech_balloon:
Browse files

Initial commit

parent 286e0087
No related branches found
No related tags found
No related merge requests found
# coding=utf-8
# Filename: __init__.py
"""
A set of classes and tools wich uses the ControlHost protocol.
"""
from __future__ import absolute_import
from controlhost.__version__ import version, version_info
__author__ = "Tamas Gal"
__copyright__ = ("Copyright 2014, Tamas Gal and the KM3NeT collaboration "
"(http://km3net.org)")
__credits__ = []
__license__ = "MIT"
__version__ = version
__maintainer__ = "Tamas Gal"
__email__ = "tgal@km3net.de"
__status__ = "Development"
class Tag(object):
def __init__(self):
pass
class Message(object):
pass
class Prefix(object):
pass
\ No newline at end of file
#!/usr/bin/env python
# coding=utf-8
# Filename: __version__.py
"""
Pep 386 compliant version info.
(major, minor, micro, alpha/beta/rc/final, #)
(1, 1, 2, 'alpha', 0) => "1.1.2.dev"
(1, 2, 0, 'beta', 2) => "1.2b2"
"""
version_info = (0, 1, 0, 'final', 0)
def _get_version(version_info):
"""Return a PEP 386-compliant version number."""
assert len(version_info) == 5
assert version_info[3] in ('alpha', 'beta', 'rc', 'final')
parts = 2 if version_info[2] == 0 else 3
main = '.'.join(map(str, version_info[:parts]))
sub = ''
if version_info[3] == 'alpha' and version_info[4] == 0:
sub = '.dev'
elif version_info[3] != 'final':
mapping = {'alpha': 'a', 'beta': 'b', 'rc': 'c'}
sub = mapping[version_info[3]] + str(version_info[4])
return str(main + sub)
version = _get_version(version_info)
# coding=utf-8
# Filename: __init__.py
"""
Unit tests for the controlhost package.
"""
__author__ = 'tamasgal'
# coding=utf-8
# Filename: test_controlhost.py
"""
"""
from __future__ import division, absolute_import, print_function
import unittest
from controlhost import Tag, Message, Prefix
class TestTag(unittest.TestCase):
def test_init(self):
tag = Tag()
class TestMessage(unittest.TestCase):
def test_init(self):
message = Message()
class TestPrefix(unittest.TestCase):
def test_init(self):
prefix = Prefix()
setup.py 0 → 100644
from setuptools import setup
import controlhost
setup(name='controlhost',
version=controlhost.__version__,
url='https://github.com/tamasgal/controlhost/',
description='A set of classes and tools wich uses the ControlHost protocol.',
author='Tamas Gal',
author_email='himself@tamasgal.com',
packages=['controlhost'],
include_package_data=True,
platforms='any',
install_requires=[
'docopt',
],
entry_points={
'console_scripts': [
#'controlhost=controlhost.app:main',
],
},
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Programming Language :: Python',
],
)
__author__ = 'Tamas Gal'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment