Skip to content

Commit

Permalink
Restructured modules into a package
Browse files Browse the repository at this point in the history
  • Loading branch information
SpotlightKid committed Oct 8, 2015
1 parent 5350b87 commit 96ea1a3
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 8 deletions.
4 changes: 2 additions & 2 deletions osc2mqtt.py → osc2mqtt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
import liblo
import paho.mqtt.client as mqtt

from converter import Osc2MqttConverter, ConversionRule
from util import as_bool, parse_hostport, parse_list
from .converter import Osc2MqttConverter, ConversionRule
from .util import as_bool, parse_hostport, parse_list


log = logging.getLogger('osc2mqtt')
Expand Down
5 changes: 5 additions & 0 deletions osc2mqtt/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if __name__ == '__main__':
import sys
from osc2mqtt import main

sys.exit(main(sys.argv[1:]) or 0)
2 changes: 1 addition & 1 deletion converter.py → osc2mqtt/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

from collections import namedtuple

from util import as_bool, parse_list
from .util import as_bool, parse_list

try:
# Python 3.2+
Expand Down
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

setup(
name = name,
version = '0.1b2',
version = '0.1b1',
description = __doc__.splitlines()[0],
long_description = "\n".join(readme.splitlines()[2:]),
keywords = 'osc mqtt iot',
Expand All @@ -47,18 +47,18 @@
author = 'Christopher Arndt',
author_email = 'chris@chrisarndt.de',
url = url,
repository = 'https://github.com/SpotlightKid/%s' % name.lower(),
repository = url,
download_url = url + '/releases',
license = 'MIT License',
platforms = 'POSIX, Windows, MacOS X',
py_modules = ['osc2mqtt'],
packages = ['osc2mqtt'],
install_requires = [
'paho-mqtt',
'pyliblo',
],
entry_points = {
'console_scripts': [
'osc2mqtt = osc2mqtt:main'
'osc2mqtt = osc2mqtt.__main__:main'
]
},
zip_safe = True
Expand Down
2 changes: 1 addition & 1 deletion start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ MQTT_HOST="dockstar3"
MQTT_PORT="1883"
OSC_PORT="9001"

python osc2mqtt.py -m $MQTT_HOST:$MQTT_PORT -p $OSC_PORT "$@"
PYTHONPATH=$(pwd) python -m osc2mqtt -m $MQTT_HOST:$MQTT_PORT -p $OSC_PORT "$@"

0 comments on commit 96ea1a3

Please sign in to comment.