Skip to content

Commit e6ed866

Browse files
committed
set up for pypi distribution
1 parent 83a0aac commit e6ed866

File tree

3 files changed

+38
-15
lines changed

3 files changed

+38
-15
lines changed

daktronics.py

+22-13
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
# MIT License
2+
#
3+
# Copyright (c) 2016 Alex Riviere
4+
#
5+
# Permission is hereby granted, free of charge, to any person obtaining a copy
6+
# of this software and associated documentation files (the "Software"), to deal
7+
# in the Software without restriction, including without limitation the rights
8+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
# copies of the Software, and to permit persons to whom the Software is
10+
# furnished to do so, subject to the following conditions:
11+
#
12+
# The above copyright notice and this permission notice shall be included in all
13+
# copies or substantial portions of the Software.
14+
#
15+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
# SOFTWARE.
22+
123
import serial
224
import socket
325
import struct
@@ -305,16 +327,3 @@ def __getitem__(self, gikey):
305327
if gikey in self.sport:
306328
return self.dakString[self.sport[gikey][0] - 1:self.sport[gikey][1] + self.sport[gikey][0] - 1]
307329
return ""
308-
309-
310-
if __name__ == '__main__':
311-
print("UDP MULTICAST 21000")
312-
dakdata = DakUDP(21000)
313-
dak = Daktronics("hockey/lacrosse", dakdata)
314-
while True:
315-
dak.update()
316-
print("--------------------------------------------------------------")
317-
print(dak['Main Clock Time (mm:ss/ss.t )'])
318-
print(dak['Home Team Name'], dak['Home Team Score'])
319-
print(dak['Guest Team Name'], dak['Guest Team Score'])
320-
print("--------------------------------------------------------------")

examples/dakexample.py

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from daktronics import DakUDP, Daktronics
2+
3+
if __name__ == '__main__':
4+
print("UDP MULTICAST 21000")
5+
dak_data = DakUDP(21000)
6+
dak = Daktronics("hockey/lacrosse", dak_data)
7+
while True:
8+
dak.update()
9+
print("--------------------------------------------------------------")
10+
print(dak['Main Clock Time (mm:ss/ss.t )'])
11+
print(dak['Home Team Name'], dak['Home Team Score'])
12+
print(dak['Guest Team Name'], dak['Guest Team Score'])
13+
print("--------------------------------------------------------------")

setup.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
from distutils.core import setup
1+
from setuptools import setup
22

33
setup(
44
name='pydak',
55
version='0.1',
6-
packages=['pyserial'],
6+
# packages=[''],
7+
install_requires=['pyserial'],
78
url='https://github.com/fimion/pydak',
89
license='MIT',
910
author='Alex Riviere',

0 commit comments

Comments
 (0)