diff --git a/setup.py b/setup.py index bede2fe74..a43a3b054 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ from distutils.core import setup has_setuptools = False -src = open('soco.py').read() +src = open('soco/__init__.py').read() metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", src)) docstrings = re.findall('"""([^"]*)"""', src, re.MULTILINE | re.DOTALL) @@ -18,6 +18,7 @@ MODULES = ( 'soco', + 'soco.core', ) REQUIREMENTS = list(open('requirements.txt')) diff --git a/soco/__init__.py b/soco/__init__.py new file mode 100644 index 000000000..82a6817db --- /dev/null +++ b/soco/__init__.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- + +""" SoCo (Sonos Controller) is a simple library to control Sonos speakers """ + +# Will be parsed by setup.py to determine package metadata +__author__ = 'Rahim Sonawalla ' +__version__ = '0.5' +__website__ = 'https://github.com/rahims/SoCo' +__license__ = 'MIT License' + + +from core import SonosDiscovery, SoCo + +__all__ = ['SonosDiscovery', 'SoCo'] diff --git a/soco.py b/soco/core.py similarity index 99% rename from soco.py rename to soco/core.py index 563632f54..93b14343e 100755 --- a/soco.py +++ b/soco/core.py @@ -1,13 +1,5 @@ # -*- coding: utf-8 -*- -""" SoCo (Sonos Controller) is a simple library to control Sonos speakers """ - -# Will be parsed by setup.py to determine package metadata -__author__ = 'Rahim Sonawalla ' -__version__ = '0.5' -__website__ = 'https://github.com/rahims/SoCo' -__license__ = 'MIT License' - import xml.etree.cElementTree as XML import requests @@ -17,7 +9,6 @@ logger = logging.getLogger(__name__) -__all__ = ['SonosDiscovery', 'SoCo'] class SonosDiscovery(object): """A simple class for discovering Sonos speakers.