-
Notifications
You must be signed in to change notification settings - Fork 0
/
pavement.py
65 lines (60 loc) · 2.64 KB
/
pavement.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
from collections import OrderedDict
import sys
from importlib import import_module
from paver.easy import task, needs, path, sh, cmdopts, options
from paver.setuputils import setup, find_package_data, install_distutils_tasks
try:
from base_node_rpc.pavement_base import *
except ImportError:
import warnings
warnings.warn('Could not import `base_node_rpc` (expected during '
'install).')
sys.path.insert(0, '.')
import version
install_distutils_tasks()
DEFAULT_ARDUINO_BOARDS = ['uno']
PROJECT_PREFIX = [d for d in path('.').dirs()
if d.joinpath('Arduino').isdir()
and d.name not in ('build', )][0].name
module_name = PROJECT_PREFIX
package_name = module_name.replace('_', '-')
rpc_module = import_module(PROJECT_PREFIX)
VERSION = version.getVersion()
URL='http://github.com/wheeler-microfluidics/%s.git' % package_name
PROPERTIES = OrderedDict([('package_name', package_name),
('display_name', package_name),
('manufacturer', 'Wheeler Lab'),
('software_version', VERSION),
('url', URL)])
LIB_PROPERTIES = PROPERTIES.copy()
LIB_PROPERTIES.update(OrderedDict([('author', 'Christian Fobel'),
('author_email', 'christian@fobel.net'),
('short_description', 'Arduino-based pulse '
'counting firmware and Python driver.'),
('version', VERSION),
('long_description', ''),
('category', 'Communication'),
('architectures', 'avr')]))
options(
rpc_module=rpc_module,
PROPERTIES=PROPERTIES,
LIB_PROPERTIES=LIB_PROPERTIES,
base_classes=['BaseNodeSerialHandler',
'BaseNodeEeprom',
'BaseNodeI2c',
'BaseNodeI2cHandler<Handler>',
'BaseNodeConfig<ConfigMessage, Address>',
'BaseNodeState<StateMessage>'],
rpc_classes=['pulse_counter_rpc::Node'],
DEFAULT_ARDUINO_BOARDS=DEFAULT_ARDUINO_BOARDS,
setup=dict(name=package_name,
version=VERSION,
description=LIB_PROPERTIES['short_description'],
author='Christian Fobel',
author_email='christian@fobel.net',
url=URL,
license='GPLv2',
install_requires=['base-node-rpc>=0.12.post23',
'arduino-helpers>=0.3.post16'],
include_package_data=True,
packages=[str(PROJECT_PREFIX)]))