diff options
author | Marek Siarkowicz <mareksiarkowicz@gmail.com> | 2015-06-15 12:41:30 +0200 |
---|---|---|
committer | Marek Siarkowicz <mareksiarkowicz@gmail.com> | 2015-06-15 12:41:30 +0200 |
commit | b4ff541fd77d4076051e57b748fc5817e0cc1e25 (patch) | |
tree | 0251b1812c3a4d37ee7a3794b90ee692f66ebdb1 | |
parent | 21ed2889c4001d7338bfc4e356a567d5471893b1 (diff) | |
download | pyParrotZikTCP-b4ff541fd77d4076051e57b748fc5817e0cc1e25.tar.xz pyParrotZikTCP-b4ff541fd77d4076051e57b748fc5817e0cc1e25.zip |
Make into proper package.
-rw-r--r-- | parrot_zik/bluetooth_paired_devices.py | 2 | ||||
-rw-r--r-- | parrot_zik/indicator.py | 6 | ||||
-rw-r--r-- | parrot_zik/parrot_zik_model.py | 4 | ||||
-rw-r--r-- | parrot_zik/resource_manager.py | 2 | ||||
-rw-r--r-- | setup.py | 3 |
5 files changed, 9 insertions, 8 deletions
diff --git a/parrot_zik/bluetooth_paired_devices.py b/parrot_zik/bluetooth_paired_devices.py index eb1ec09..726731c 100644 --- a/parrot_zik/bluetooth_paired_devices.py +++ b/parrot_zik/bluetooth_paired_devices.py @@ -2,7 +2,7 @@ import sys import re import os -from parrot_zik.resource_manager import GenericResourceManager +from .resource_manager import GenericResourceManager if sys.platform == "darwin": from binplist import binplist diff --git a/parrot_zik/indicator.py b/parrot_zik/indicator.py index e121e92..b6b6bea 100644 --- a/parrot_zik/indicator.py +++ b/parrot_zik/indicator.py @@ -41,7 +41,7 @@ class BaseIndicator(object): class WindowsIndicator(BaseIndicator): def __init__(self, icon, menu): self.icon_directory = os.path.join( - os.path.dirname(os.path.realpath(sys.argv[0])), '..', 'share', 'icons', 'zik') + os.path.dirname(os.path.realpath(sys.argv[0])), 'share', 'icons', 'zik') self.menu_shown = False sys.stdout = open(os.path.join(tempfile.gettempdir(), "zik_tray_stdout.log", "w")) sys.stderr = open(os.path.join(tempfile.gettempdir(), "zik_tray_stderr.log", "w")) @@ -71,7 +71,7 @@ class LinuxIndicator(BaseIndicator): import appindicator self.icon_directory = os.path.join('/', 'usr', 'share', 'icons', 'zik') if not os.path.isdir(self.icon_directory): - self.icon_directory = os.path.join(os.path.dirname(sys.argv[0]), '..', 'share', 'icons', 'zik') + self.icon_directory = os.path.join('share', 'icons', 'zik') statusicon = appindicator.Indicator( "new-parrotzik-indicator", "indicator-messages", appindicator.CATEGORY_APPLICATION_STATUS) @@ -99,7 +99,7 @@ class LinuxIndicator(BaseIndicator): class DarwinIndicator(BaseIndicator): def __init__(self, icon, menu): self.icon_directory = os.path.join( - os.path.dirname(os.path.realpath(sys.argv[0])), '..', 'share', 'icons', 'zik') + os.path.dirname(os.path.realpath(sys.argv[0])), 'share', 'icons', 'zik') statusicon = StatusApp.sharedApplication() statusicon.initMenu(menu) super(DarwinIndicator, self).__init__(icon, menu, statusicon) diff --git a/parrot_zik/parrot_zik_model.py b/parrot_zik/parrot_zik_model.py index e15200f..e6a8bc7 100644 --- a/parrot_zik/parrot_zik_model.py +++ b/parrot_zik/parrot_zik_model.py @@ -1,5 +1,5 @@ -from parrot_zik.resource_manager import Version1ResourceManager -from parrot_zik.resource_manager import Version2ResourceManager +from .resource_manager import Version1ResourceManager +from .resource_manager import Version2ResourceManager class BatteryStates: diff --git a/parrot_zik/resource_manager.py b/parrot_zik/resource_manager.py index 8b63e8c..8a9cd46 100644 --- a/parrot_zik/resource_manager.py +++ b/parrot_zik/resource_manager.py @@ -4,7 +4,7 @@ import sys from BeautifulSoup import BeautifulSoup -from parrot_zik.message import Message +from .message import Message class ResourceManagerBase(object): @@ -44,5 +44,6 @@ setup( ],
packages=['parrot_zik'],
- scripts=["parrot_zik/parrot_zik_tray"]
+ scripts=["parrot_zik/parrot_zik_tray"],
+ include_package_data=True,
)
|