added setup script
This commit is contained in:
parent
931544572d
commit
2a72572026
|
@ -0,0 +1,35 @@
|
|||
*.py[cod]
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Packages
|
||||
*.egg
|
||||
*.egg-info
|
||||
dist
|
||||
build
|
||||
eggs
|
||||
parts
|
||||
bin
|
||||
var
|
||||
sdist
|
||||
develop-eggs
|
||||
.installed.cfg
|
||||
lib
|
||||
lib64
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
.coverage
|
||||
.tox
|
||||
nosetests.xml
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
|
||||
# Mr Developer
|
||||
.mr.developer.cfg
|
||||
.project
|
||||
.pydevproject
|
|
@ -21,21 +21,6 @@ except ImportError as e:
|
|||
from chaosc.osc_lib import *
|
||||
|
||||
|
||||
parser = argparse.ArgumentParser(prog='psychose_actor')
|
||||
parser.add_argument("-H", '--chaosc_host', required=True,
|
||||
type=str, help='host of chaosc instance to control')
|
||||
parser.add_argument("-p", '--chaosc_port', required=True,
|
||||
type=int, help='port of chaosc instance to control')
|
||||
|
||||
|
||||
args = parser.parse_args(sys.argv[1:])
|
||||
|
||||
connections = list()
|
||||
osc_sock = socket.socket(2, 2, 17)
|
||||
osc_sock.connect((args.chaosc_host, args.chaosc_port))
|
||||
|
||||
|
||||
|
||||
class Forwarder(object):
|
||||
def __init__(self, actor, platform, device):
|
||||
self.actor = actor
|
||||
|
@ -102,6 +87,22 @@ class Pulse2OSC(Forwarder):
|
|||
osc_sock.sendall(osc_message.encode_osc())
|
||||
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(prog='psychose_actor')
|
||||
parser.add_argument("-H", '--chaosc_host', required=True,
|
||||
type=str, help='host of chaosc instance to control')
|
||||
parser.add_argument("-p", '--chaosc_port', required=True,
|
||||
type=int, help='port of chaosc instance to control')
|
||||
|
||||
|
||||
args = parser.parse_args(sys.argv[1:])
|
||||
|
||||
connections = list()
|
||||
osc_sock = socket.socket(2, 2, 17)
|
||||
osc_sock.connect((args.chaosc_host, args.chaosc_port))
|
||||
|
||||
|
||||
naming = {
|
||||
"/dev/ttyUSB0" : ["merle", "ehealth"],
|
||||
"/dev/ttyUSB1" : ["merle", "ekg"],
|
||||
|
|
|
@ -0,0 +1,57 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from distribute_setup import use_setuptools
|
||||
use_setuptools()
|
||||
|
||||
from scripts.version import get_git_version
|
||||
import sys
|
||||
from setuptools import find_packages, setup
|
||||
|
||||
if sys.version_info >= (3,):
|
||||
extras['use_2to3'] = True
|
||||
|
||||
setup(
|
||||
name='sensors2osc',
|
||||
version="0.1",
|
||||
packages=find_packages(exclude=["scripts",]),
|
||||
|
||||
include_package_data = True,
|
||||
|
||||
package_data = {
|
||||
"chaosc" : ["config/*",]},
|
||||
|
||||
exclude_package_data = {'': ['.gitignore']},
|
||||
|
||||
install_requires=[
|
||||
"pyserial",],
|
||||
|
||||
# installing unzipped
|
||||
zip_safe = False,
|
||||
|
||||
# predefined extension points, e.g. for plugins
|
||||
entry_points = """
|
||||
[console_scripts]
|
||||
sensors2osc = sensors2osc.main:main
|
||||
""",
|
||||
# pypi metadata
|
||||
author = "Stefan Kögl",
|
||||
|
||||
# FIXME: add author email
|
||||
author_email = "",
|
||||
description = "osc filtering application level gateway",
|
||||
|
||||
# FIXME: add long_description
|
||||
long_description = """
|
||||
""",
|
||||
|
||||
# FIXME: add license
|
||||
license = "LGPL",
|
||||
|
||||
# FIXME: add keywords
|
||||
keywords = "",
|
||||
|
||||
# FIXME: add download url
|
||||
url = "",
|
||||
test_suite='tests'
|
||||
)
|
Loading…
Reference in New Issue