Skip to content

Commit

Permalink
move soco.py to soco/core.py
Browse files Browse the repository at this point in the history
the __all__ in __init__.py ensures that all imports continue to work
  • Loading branch information
stefankoegl committed Mar 16, 2013
1 parent 0532bdc commit c2c888c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@
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)

PACKAGE = 'soco'

MODULES = (
'soco',
'soco.core',
)

REQUIREMENTS = list(open('requirements.txt'))
Expand Down
14 changes: 14 additions & 0 deletions soco/__init__.py
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>'
__version__ = '0.5'
__website__ = 'https://github.com/rahims/SoCo'
__license__ = 'MIT License'


from core import SonosDiscovery, SoCo

__all__ = ['SonosDiscovery', 'SoCo']
9 changes: 0 additions & 9 deletions soco.py → soco/core.py
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>'
__version__ = '0.5'
__website__ = 'https://github.com/rahims/SoCo'
__license__ = 'MIT License'

import xml.etree.cElementTree as XML

import requests
Expand All @@ -17,7 +9,6 @@

logger = logging.getLogger(__name__)

__all__ = ['SonosDiscovery', 'SoCo']

class SonosDiscovery(object):
"""A simple class for discovering Sonos speakers.
Expand Down

0 comments on commit c2c888c

Please sign in to comment.