aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--BluetoothPairedDevices.py20
-rw-r--r--ParrotProtocol.py11
-rw-r--r--ParrotZik.py47
-rwxr-xr-xParrotZikTray83
-rw-r--r--StatusAppMac.py8
-rw-r--r--SysIndicator.py122
-rw-r--r--setup.py54
7 files changed, 191 insertions, 154 deletions
diff --git a/BluetoothPairedDevices.py b/BluetoothPairedDevices.py
index 52b9a7d..4cf0c2b 100644
--- a/BluetoothPairedDevices.py
+++ b/BluetoothPairedDevices.py
@@ -13,29 +13,31 @@ def ParrotZikMac():
if sys.platform == "linux2":
out = os.popen("bluez-test-device list").read()
res = p.findall(out)
- if len(res)>0:
+ if len(res) > 0:
return res[0]
elif sys.platform == "darwin":
fd = open("/Library/Preferences/com.apple.Bluetooth.plist", "rb")
plist = binplist.BinaryPlist(file_obj=fd)
parsed_plist = plist.Parse()
- try :
+ try:
for mac in parsed_plist['PairedDevices']:
- if p.match(mac.replace("-",":")):
- return mac.replace("-",":")
+ if p.match(mac.replace("-", ":")):
+ return mac.replace("-", ":")
except:
pass
elif sys.platform == "win32":
- aReg = _winreg.ConnectRegistry(None,_winreg.HKEY_LOCAL_MACHINE)
- aKey = _winreg.OpenKey(aReg, 'SYSTEM\CurrentControlSet\Services\BTHPORT\Parameters\Devices')
+ aReg = _winreg.ConnectRegistry(None, _winreg.HKEY_LOCAL_MACHINE)
+ aKey = _winreg.OpenKey(
+ aReg, 'SYSTEM\CurrentControlSet\Services\
+ BTHPORT\Parameters\Devices')
for i in range(10):
try:
- asubkey_name=_winreg.EnumKey(aKey,i)
- mac =':'.join(asubkey_name[i:i+2] for i in range(0,12,2))
+ asubkey_name = _winreg.EnumKey(aKey, i)
+ mac = ':'.join(asubkey_name[i:i+2] for i in range(0, 12, 2))
res = p.findall(mac)
- if len(res)>0:
+ if len(res) > 0:
return res[0]
except EnvironmentError:
diff --git a/ParrotProtocol.py b/ParrotProtocol.py
index 1af6340..bd09ed3 100644
--- a/ParrotProtocol.py
+++ b/ParrotProtocol.py
@@ -1,17 +1,20 @@
def generateRequest(requestString):
- message=bytearray()
+ message = bytearray()
message.extend(generateHeader(requestString))
message.extend(bytearray(requestString))
return message
+
def generateHeader(requestString):
header = bytearray([0])
- header.append(len(requestString)+3)
+ header.append(len(requestString) + 3)
header.append("\x80")
return header
+
def getRequest(apiString):
- return generateRequest("GET "+apiString)
+ return generateRequest("GET " + apiString)
+
def setRequest(apiString,args):
- return generateRequest("SET "+apiString+"?arg="+args)
+ return generateRequest("SET " + apiString + "?arg=" + args)
diff --git a/ParrotZik.py b/ParrotZik.py
index f7db9f2..a934a90 100644
--- a/ParrotZik.py
+++ b/ParrotZik.py
@@ -8,19 +8,18 @@ import ParrotProtocol
from BeautifulSoup import BeautifulSoup
class ParrotZik(object):
- def __init__(self,addr=None):
+ def __init__(self, addr=None):
uuid = "0ef0f502-f0ee-46c9-986c-54ed027807fb"
-
if sys.platform == "darwin":
- service_matches = lightblue.findservices( name = "Parrot RFcomm service", addr = addr )
+ service_matches = lightblue.findservices(
+ name="Parrot RFcomm service", addr=addr)
else:
- service_matches = bluetooth.find_service( uuid = uuid, address = addr )
-
+ service_matches = bluetooth.find_service(uuid=uuid, address=addr)
if len(service_matches) == 0:
print "Failed to find Parrot Zik RFCOMM service"
- self.sock =""
+ self.sock = ""
return
if sys.platform == "darwin":
@@ -37,9 +36,9 @@ class ParrotZik(object):
print "Connecting to \"%s\" on %s" % (name, host)
if sys.platform == "darwin":
- self.sock=lightblue.socket()
+ self.sock = lightblue.socket()
else:
- self.sock=bluetooth.BluetoothSocket( bluetooth.RFCOMM )
+ self.sock = bluetooth.BluetoothSocket(bluetooth.RFCOMM)
self.sock.connect((host, port))
@@ -57,7 +56,7 @@ class ParrotZik(object):
def getBatteryLevel(self):
data = self.sendGetMessage("/api/system/battery/get")
try:
- if data.answer.system.battery["level"] <> '':
+ if data.answer.system.battery["level"] != '':
self.BatteryLevel = data.answer.system.battery["level"]
if data.answer.system.battery["state"] == 'charging':
self.BatteryCharging = True
@@ -85,8 +84,9 @@ class ParrotZik(object):
data = self.sendGetMessage("/api/system/auto_connection/enabled/get")
return data.answer.system.auto_connection["enabled"]
- def setAutoConnection(self,arg):
- data = self.sendSetMessage("/api/system/auto_connection/enabled/set",arg)
+ def setAutoConnection(self, arg):
+ data = self.sendSetMessage("/api/system/auto_connection/enabled/set",
+ arg)
return data
def getAncPhoneMode(self):
@@ -97,46 +97,47 @@ class ParrotZik(object):
data = self.sendGetMessage("/api/audio/noise_cancellation/enabled/get")
return data.answer.audio.noise_cancellation["enabled"]
- def setNoiseCancel(self,arg):
- data = self.sendSetMessage("/api/audio/noise_cancellation/enabled/set",arg)
+ def setNoiseCancel(self, arg):
+ data = self.sendSetMessage("/api/audio/noise_cancellation/enabled/set",
+ arg)
return data
def getLouReedMode(self):
data = self.sendGetMessage("/api/audio/specific_mode/enabled/get")
return data.answer.audio.specific_mode["enabled"]
- def setLouReedMode(self,arg):
- data = self.sendSetMessage("/api/audio/specific_mode/enabled/set",arg)
+ def setLouReedMode(self, arg):
+ data = self.sendSetMessage("/api/audio/specific_mode/enabled/set", arg)
return data
def getParrotConcertHall(self):
data = self.sendGetMessage("/api/audio/sound_effect/enabled/get")
return data.answer.audio.sound_effect["enabled"]
- def setParrotConcertHall(self,arg):
- data = self.sendSetMessage("/api/audio/sound_effect/enabled/set",arg)
+ def setParrotConcertHall(self, arg):
+ data = self.sendSetMessage("/api/audio/sound_effect/enabled/set", arg)
return data
- def sendGetMessage(self,message):
+ def sendGetMessage(self, message):
message = ParrotProtocol.getRequest(message)
return self.sendMessage(message)
- def sendSetMessage(self,message,arg):
- message = ParrotProtocol.setRequest(message,arg)
+ def sendSetMessage(self, message, arg):
+ message = ParrotProtocol.setRequest(message, arg)
return self.sendMessage(message)
- def sendMessage(self,message):
+ def sendMessage(self, message):
try:
self.sock.send(str(message))
except:
- self.sock =""
+ self.sock = ""
return
if sys.platform == "darwin":
data = self.sock.recv(30)
else:
data = self.sock.recv(7)
data = self.sock.recv(1024)
- data=BeautifulSoup(data)
+ data = BeautifulSoup(data)
return data
def Close(self):
diff --git a/ParrotZikTray b/ParrotZikTray
index 9d392a3..f35662a 100755
--- a/ParrotZikTray
+++ b/ParrotZikTray
@@ -5,44 +5,57 @@ import ParrotZik
import BluetoothPairedDevices
from SysIndicator import *
-UPDATE_FREQUENCY = 30 # seconds
+# seconds
+UPDATE_FREQUENCY = 30
+
class ParrotZikIndicator(SysIndicator):
def __init__(self):
self.menu = UniversalMenu()
- self.info_item = MenuItem("Parrot Zik Not connected..",None,sensitive = False)
+ self.info_item = MenuItem("Parrot Zik Not connected..",
+ None, sensitive=False)
self.menu.append(self.info_item)
- self.battery_level = MenuItem("Battery Level:",None,sensitive = False)
+ self.battery_level = MenuItem("Battery Level:",
+ None, sensitive=False)
self.menu.append(self.battery_level)
- self.battery_state = MenuItem("Battery State:",None,sensitive = False)
+ self.battery_state = MenuItem("Battery State:",
+ None, sensitive=False)
self.menu.append(self.battery_state)
- self.firmware_version = MenuItem("Firmware Version:",None,sensitive = False)
+ self.firmware_version = MenuItem("Firmware Version:",
+ None, sensitive=False)
self.menu.append(self.firmware_version)
- self.check = MenuItem("Noise Cancellation",self.toggleANC,sensitive = False, checkitem = True)
+ self.check = MenuItem("Noise Cancellation", self.toggleANC,
+ sensitive=False, checkitem=True)
self.menu.append(self.check)
- self.check2 = MenuItem("Auto Connection",self.toggleAuto,sensitive = False, checkitem = True)
+ self.check2 = MenuItem("Auto Connection", self.toggleAuto,
+ sensitive=False, checkitem=True)
self.menu.append(self.check2)
- self.check3 = MenuItem("Lou Reed Mode",self.toggleLouReedMode,sensitive = False, checkitem = True)
+ self.check3 = MenuItem("Lou Reed Mode", self.toggleLouReedMode,
+ sensitive=False, checkitem=True)
self.menu.append(self.check3)
- self.check4 = MenuItem("Concert Hall Mode",self.toggleParrotConcertHall,sensitive = False, checkitem = True)
+ self.check4 = MenuItem(
+ "Concert Hall Mode", self.toggleParrotConcertHall,
+ sensitive=False, checkitem=True)
self.menu.append(self.check4)
- self.quit = MenuItem("Quit",sys.exit,sensitive = True, checkitem = True)
+ self.quit = MenuItem("Quit", sys.exit, sensitive=True, checkitem=True)
self.menu.append(self.quit)
- SysIndicator.__init__(self,icon = "zik-audio-headset",menu = self.menu)
+ SysIndicator.__init__(self, icon="zik-audio-headset", menu=self.menu)
- self.connected=False
- self.p = re.compile('90:03:[0-9A-Fa-f]{2}:[0-9A-Fa-f]{2}:[0-9A-Fa-f]{2}:[0-9A-Fa-f]{2}')
+ self.connected = False
+ self.p = re.compile(
+ '90:03:[0-9A-Fa-f]{2}:[0-9A-Fa-f]{2}:[0-9A-Fa-f]{2}:[0-9A-Fa-f]{2}'
+ )
def EstablishConnection(self):
if self.connected:
@@ -52,7 +65,7 @@ class ParrotZikIndicator(SysIndicator):
else:
print "Connection already established"
else:
- mac=BluetoothPairedDevices.ParrotZikMac()
+ mac = BluetoothPairedDevices.ParrotZikMac()
if mac:
self.parrot = ParrotZik.ParrotZik(mac)
if not self.parrot.sock:
@@ -91,21 +104,21 @@ class ParrotZikIndicator(SysIndicator):
self.CheckBattery()
return True
- def toggleANC(self,widget):
+ def toggleANC(self, widget):
if self.connected:
if self.check.get_active():
self.parrot.setNoiseCancel("true")
else:
self.parrot.setNoiseCancel("false")
- def toggleAuto(self,widget):
+ def toggleAuto(self, widget):
if self.connected:
if self.check2.get_active():
self.parrot.setAutoConnection("true")
else:
self.parrot.setAutoConnection("false")
- def toggleLouReedMode(self,widget):
+ def toggleLouReedMode(self, widget):
if self.connected:
if self.check3.get_active():
self.parrot.setLouReedMode("true")
@@ -114,7 +127,7 @@ class ParrotZikIndicator(SysIndicator):
self.parrot.setLouReedMode("false")
self.check4.set_sensitive(True)
- def toggleParrotConcertHall(self,widget):
+ def toggleParrotConcertHall(self, widget):
if self.connected:
if self.check4.get_active():
self.parrot.setParrotConcertHall("true")
@@ -129,28 +142,30 @@ class ParrotZikIndicator(SysIndicator):
if self.parrot.BatteryCharging:
self.batteryLevel = "Charging"
self.setIcon("zik-battery-charging")
- self.batteryLevel="Unknown"
- self.batteryState="Charging"
- elif self.batteryLevel>80:
+ self.batteryLevel = "Unknown"
+ self.batteryState = "Charging"
+ elif self.batteryLevel > 80:
self.setIcon("zik-battery-100")
- self.batteryState="In Use"
- elif self.batteryLevel>60:
+ self.batteryState = "In Use"
+ elif self.batteryLevel > 60:
self.setIcon("zik-battery-080")
- self.batteryState="In Use"
- elif self.batteryLevel>40:
+ self.batteryState = "In Use"
+ elif self.batteryLevel > 40:
self.setIcon("zik-battery-060")
- self.batteryState="In Use"
- elif self.batteryLevel>20:
+ self.batteryState = "In Use"
+ elif self.batteryLevel > 20:
self.setIcon("zik-battery-040")
- self.batteryState="In Use"
+ self.batteryState = "In Use"
else:
self.setIcon("zik-battery-low")
- self.batteryState="In Use"
-
- self.info_item.set_label("Connected to: "+self.name)
- self.firmware_version.set_label("Firmware version: "+self.version)
- self.battery_state.set_label("State: "+self.batteryState)
- self.battery_level.set_label("Battery Level: "+str(self.batteryLevel))
+ self.batteryState = "In Use"
+
+ self.info_item.set_label("Connected to: " + self.name)
+ self.firmware_version.set_label(
+ "Firmware version: " + self.version)
+ self.battery_state.set_label("State: " + self.batteryState)
+ self.battery_level.set_label(
+ "Battery Level: " + str(self.batteryLevel))
else:
self.setIcon("zik-audio-headset")
self.info_item.set_label("Parrot Zik Not connected..")
diff --git a/StatusAppMac.py b/StatusAppMac.py
index 9ecd528..dccffe4 100644
--- a/StatusAppMac.py
+++ b/StatusAppMac.py
@@ -3,9 +3,10 @@ from AppKit import *
class StatusApp(NSApplication):
- def initMenu(self,menu):
+ def initMenu(self, menu):
statusbar = NSStatusBar.systemStatusBar()
- self.statusitem = statusbar.statusItemWithLength_(NSVariableStatusItemLength)
+ self.statusitem = statusbar.statusItemWithLength_(
+ NSVariableStatusItemLength)
self.mymenu = menu
#add menu to statusitem
@@ -13,7 +14,8 @@ class StatusApp(NSApplication):
self.statusitem.setToolTip_('Parrot Zik Indicator')
def setIcon(self,icon,icon_directory):
- self.icon = NSImage.alloc().initByReferencingFile_(icon_directory+icon+'.png')
+ self.icon = NSImage.alloc().initByReferencingFile_(
+ icon_directory + icon + '.png')
self.icon.setScalesWhenResized_(True)
self.icon.setSize_((20, 20))
self.statusitem.setImage_(self.icon)
diff --git a/SysIndicator.py b/SysIndicator.py
index 145f0bd..ea93677 100644
--- a/SysIndicator.py
+++ b/SysIndicator.py
@@ -4,9 +4,9 @@ import sys
import os
import tempfile
-if sys.platform=="linux2" or sys.platform=="win32":
+if sys.platform == "linux2" or sys.platform == "win32":
import gtk
-elif sys.platform=="darwin":
+elif sys.platform == "darwin":
from Foundation import *
from AppKit import *
from PyObjCTools import AppHelper
@@ -14,62 +14,76 @@ elif sys.platform=="darwin":
class SysIndicator:
- def __init__(self, icon,menu):
- if sys.platform=="linux2":
+ def __init__(self, icon, menu):
+ if sys.platform == "linux2":
self.menu = menu.gtk_menu
import appindicator
- self.icon_directory = os.path.sep + 'usr' + os.path.sep+ 'share' + os.path.sep+'icons' + os.path.sep+'zik'+ os.path.sep
+ self.icon_directory = (os.path.sep + 'usr' + os.path.sep + 'share'
+ + os.path.sep + 'icons' + os.path.sep+'zik'
+ + os.path.sep)
if not os.path.isdir(self.icon_directory):
- self.icon_directory = os.path.dirname(sys.argv[0]) + os.path.sep + 'share' + os.path.sep+'icons' + os.path.sep+'zik'+ os.path.sep
- self.statusicon = appindicator.Indicator("new-parrotzik-indicator",
- "indicator-messages",
- appindicator.CATEGORY_APPLICATION_STATUS)
+ self.icon_directory = (os.path.dirname(sys.argv[0])
+ + os.path.sep + 'share' + os.path.sep
+ + 'icons' + os.path.sep+'zik'
+ + os.path.sep)
+ self.statusicon = appindicator.Indicator(
+ "new-parrotzik-indicator", "indicator-messages",
+ appindicator.CATEGORY_APPLICATION_STATUS)
self.statusicon.set_status(appindicator.STATUS_ACTIVE)
self.statusicon.set_icon_theme_path(self.icon_directory)
self.statusicon.set_menu(self.menu)
- elif sys.platform=="win32":
+ elif sys.platform == "win32":
self.menu = menu.gtk_menu
- self.icon_directory = os.path.dirname(os.path.realpath(sys.argv[0])) + os.path.sep+ 'share' + os.path.sep+'icons' + os.path.sep+'zik'+ os.path.sep
+ self.icon_directory = (
+ os.path.dirname(os.path.realpath(sys.argv[0]))
+ + os.path.sep + 'share' + os.path.sep+'icons'
+ + os.path.sep +'zik' + os.path.sep)
self.statusicon = gtk.StatusIcon()
self.statusicon.connect("popup-menu", self.gtk_right_click_event)
self.statusicon.set_tooltip("Parrot Zik")
- self.menu_shown=False
- sys.stdout = open(tempfile.gettempdir()+os.path.sep+"zik_tray_stdout.log", "w")
- sys.stderr = open(tempfile.gettempdir()+os.path.sep+"zik_tray_stderr.log", "w")
-
- elif sys.platform=="darwin":
- self.icon_directory = os.path.dirname(os.path.realpath(sys.argv[0])) + os.path.sep+ 'share' + os.path.sep+'icons' + os.path.sep+'zik'+ os.path.sep
+ self.menu_shown = False
+ sys.stdout = open(tempfile.gettempdir()
+ + os.path.sep+"zik_tray_stdout.log", "w")
+ sys.stderr = open(tempfile.gettempdir()
+ + os.path.sep+"zik_tray_stderr.log", "w")
+
+ elif sys.platform == "darwin":
+ self.icon_directory = (
+ os.path.dirname(os.path.realpath(sys.argv[0])) + os.path.sep
+ + 'share' + os.path.sep + 'icons' + os.path.sep + 'zik'
+ + os.path.sep)
self.statusicon = StatusApp.sharedApplication()
self.statusicon.initMenu(menu)
self.setIcon(icon)
def setIcon(self, name):
- if sys.platform=="linux2":
+ if sys.platform == "linux2":
self.statusicon.set_icon(name)
- elif sys.platform=="win32":
- self.statusicon.set_from_file(self.icon_directory+name+'.png')
- elif sys.platform=="darwin":
- self.statusicon.setIcon(name,self.icon_directory)
+ elif sys.platform == "win32":
+ self.statusicon.set_from_file(self.icon_directory + name + '.png')
+ elif sys.platform == "darwin":
+ self.statusicon.setIcon(name, self.icon_directory)
def gtk_right_click_event(self, icon, button, time):
if not self.menu_shown:
- self.menu_shown=True
- self.menu.popup(None, None, gtk.status_icon_position_menu, button, time, self.statusicon)
+ self.menu_shown = True
+ self.menu.popup(None, None, gtk.status_icon_position_menu,
+ button, time, self.statusicon)
else:
- self.menu_shown=False
+ self.menu_shown = False
self.menu.popdown()
def main(self):
- if sys.platform=="linux2" or sys.platform=="win32":
+ if sys.platform == "linux2" or sys.platform == "win32":
gtk.main()
- elif sys.platform=="darwin":
+ elif sys.platform == "darwin":
#self.statusicon.run()
AppHelper.runEventLoop()
def show_about_dialog(self, widget):
- if sys.platform=="linux2" or sys.platform=="win32":
+ if sys.platform == "linux2" or sys.platform == "win32":
about_dialog = gtk.AboutDialog()
about_dialog.set_destroy_with_parent(True)
about_dialog.set_name("Parrot Zik Tray")
@@ -81,73 +95,73 @@ class SysIndicator:
class UniversalMenu:
def __init__(self):
- if sys.platform=="linux2" or sys.platform=="win32":
+ if sys.platform == "linux2" or sys.platform == "win32":
self.gtk_menu = gtk.Menu()
- elif sys.platform=="darwin":
+ elif sys.platform == "darwin":
self.actions = {}
self.menubarMenu = NSMenu.alloc().init()
self.menubarMenu.setAutoenablesItems_(False)
-
- def append(self,MenuItem):
- if sys.platform=="linux2" or sys.platform=="win32":
+ def append(self, MenuItem):
+ if sys.platform == "linux2" or sys.platform == "win32":
self.gtk_menu.append(MenuItem.gtk_item)
- elif sys.platform=="darwin":
+ elif sys.platform == "darwin":
self.actions[MenuItem.title] = MenuItem.action
self.menubarMenu.addItem_(MenuItem.nsmenu_item)
class MenuItem:
- def __init__(self,name,action,sensitive = True, checkitem = False):
- if sys.platform=="linux2" or sys.platform=="win32":
+ def __init__(self, name, action, sensitive=True, checkitem=False):
+ if sys.platform == "linux2" or sys.platform == "win32":
if checkitem:
- self.gtk_item=gtk.CheckMenuItem(name)
+ self.gtk_item = gtk.CheckMenuItem(name)
else:
- self.gtk_item=gtk.MenuItem(name)
+ self.gtk_item = gtk.MenuItem(name)
self.gtk_item.show()
if action:
self.gtk_item.connect("activate", action)
- elif sys.platform=="darwin":
+ elif sys.platform == "darwin":
self.title = name
self.action = action
- self.nsmenu_item = NSMenuItem.alloc().initWithTitle_action_keyEquivalent_(name, 'clicked:', '')
+ self.nsmenu_item = (
+ NSMenuItem.alloc().initWithTitle_action_keyEquivalent_(
+ name, 'clicked:', ''))
self.set_sensitive(sensitive)
- def set_sensitive(self,option):
- if sys.platform=="linux2" or sys.platform=="win32":
+ def set_sensitive(self, option):
+ if sys.platform == "linux2" or sys.platform == "win32":
return self.gtk_item.set_sensitive(option)
- elif sys.platform=="darwin":
+ elif sys.platform == "darwin":
self.nsmenu_item.setEnabled_(option)
- def set_active(self,option):
- if sys.platform=="linux2" or sys.platform=="win32":
+ def set_active(self, option):
+ if sys.platform == "linux2" or sys.platform == "win32":
return self.gtk_item.set_active(option)
- elif sys.platform=="darwin":
+ elif sys.platform == "darwin":
self.nsmenu_item.setState_(option)
def get_active(self):
- if sys.platform=="linux2" or sys.platform=="win32":
+ if sys.platform == "linux2" or sys.platform == "win32":
return self.gtk_item.get_active()
- elif sys.platform=="darwin":
+ elif sys.platform == "darwin":
print self.nsmenu_item.state
return self.nsmenu_item.state
-
- def set_label(self,option):
- if sys.platform=="linux2" or sys.platform=="win32":
+ def set_label(self, option):
+ if sys.platform == "linux2" or sys.platform == "win32":
return self.gtk_item.set_label(option)
- elif sys.platform=="darwin":
+ elif sys.platform == "darwin":
self.title = option
self.nsmenu_item.setTitle_(option)
#self.rumps_item.title=option
if __name__ == "__main__":
- quit_item = MenuItem("Quit",sys.exit,True)
+ quit_item = MenuItem("Quit", sys.exit, True)
menu = UniversalMenu()
menu.append(quit_item)
- indicator = SysIndicator(icon = "zik-audio-headset",menu = menu)
+ indicator = SysIndicator(icon="zik-audio-headset", menu=menu)
indicator.main()
diff --git a/setup.py b/setup.py
index 064cf67..b919e8f 100644
--- a/setup.py
+++ b/setup.py
@@ -1,49 +1,49 @@
import glob
import sys
-if sys.platform=="win32":
+if sys.platform == "win32":
from distutils.core import setup
else:
from setuptools import setup
setup(
- name = 'parrotziktray',
- description = 'Parrot Zik Tray Indicator',
+ name='parrotziktray',
+ description='Parrot Zik Tray Indicator',
author="Dmitry Moiseev",
author_email="m0sia@m0sia.ru",
maintainer_email="m0sia@m0sia.ru",
url="https://github.com/m0sia/pyParrotZik",
license="'GPLv2+'",
- version = '0.3',
-
- windows = [
- {
- 'script': 'ParrotZikTray',
- 'icon_resources': [(1, "./share/icons/zik/Headphone.ico")],
- }
- ],
-
- options = {
- 'py2exe': {
- #'packages':'encodings',
- # Optionally omit gio, gtk.keysyms, and/or rsvg if you're not using them
- 'includes': 'cairo, pango, pangocairo, atk, gobject, gio, gtk.keysyms, _winreg',
- }
- },
+ version='0.3',
+
+ windows=[
+ {
+ 'script': 'ParrotZikTray',
+ 'icon_resources': [(1, "./share/icons/zik/Headphone.ico")],
+ }
+ ],
+
+ options={
+ 'py2exe': {
+ #'packages':'encodings',
+ # Optionally omit gio, gtk.keysyms, and/or rsvg if you're not using them
+ 'includes': 'cairo, pango, pangocairo, atk, gobject, gio, gtk.keysyms, _winreg',
+ }
+ },
data_files=[
- ("share/icons/zik", glob.glob("share/icons/zik/*.png"))
- # If using GTK+'s built in SVG support, uncomment these
- #os.path.join(gtk_base_path, '..', 'runtime', 'bin', 'gdk-pixbuf-query-loaders.exe'),
- #os.path.join(gtk_base_path, '..', 'runtime', 'bin', 'libxml2-2.dll'),
- ],
+ ("share/icons/zik", glob.glob("share/icons/zik/*.png"))
+ # If using GTK+'s built in SVG support, uncomment these
+ #os.path.join(gtk_base_path, '..', 'runtime', 'bin', 'gdk-pixbuf-query-loaders.exe'),
+ #os.path.join(gtk_base_path, '..', 'runtime', 'bin', 'libxml2-2.dll'),
+ ],
install_requires=[
- 'BeautifulSoup','bluetooth'
- ],
+ 'BeautifulSoup', 'bluetooth'
+ ],
- py_modules=['ParrotZik','ParrotProtocol'],
+ py_modules=['ParrotZik', 'ParrotProtocol'],
scripts=["ParrotZikTray"]
)