File tree Expand file tree Collapse file tree 6 files changed +81
-0
lines changed
Expand file tree Collapse file tree 6 files changed +81
-0
lines changed Original file line number Diff line number Diff line change 1+ * .pyc
2+ build
3+ * .egg-info
4+ dist
Original file line number Diff line number Diff line change 1+ include requirements.txt
2+ include README.md
Original file line number Diff line number Diff line change 1+ socos
2+ =====
3+
4+ socos (Sonos Controller Shell) is a commandline tools for controlling Sonos
5+ speakers.
Original file line number Diff line number Diff line change 1+ soco == 0.6
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python
2+
3+ try :
4+ from setuptools import setup
5+ has_setuptools = True
6+ except ImportError :
7+ from distutils .core import setup
8+ has_setuptools = False
9+
10+ import re
11+ import os .path
12+
13+ dirname = os .path .dirname (os .path .abspath (__file__ ))
14+ filename = os .path .join (dirname , 'socos.py' )
15+ src = open (filename ).read ()
16+ metadata = dict (re .findall ("__([a-z]+)__ = '([^']+)'" , src ))
17+ docstrings = re .findall ('"""(.*)"""' , src )
18+
19+ PACKAGE = 'socos'
20+
21+ MODULES = (
22+ 'socos' ,
23+ )
24+
25+ AUTHOR_EMAIL = metadata ['author' ]
26+ VERSION = metadata ['version' ]
27+ WEBSITE = metadata ['website' ]
28+ LICENSE = metadata ['license' ]
29+ DESCRIPTION = docstrings [0 ]
30+
31+ REQUIREMENTS = list (open ('requirements.txt' ))
32+
33+ OPTIONS = {}
34+
35+ if has_setuptools :
36+ OPTIONS = {
37+ 'install_requires' : REQUIREMENTS ,
38+ }
39+
40+ # Extract name and e-mail ("Firstname Lastname <mail@example.org>")
41+ AUTHOR , EMAIL = re .match (r'(.*) <(.*)>' , AUTHOR_EMAIL ).groups ()
42+
43+ setup (name = PACKAGE ,
44+ version = VERSION ,
45+ description = DESCRIPTION ,
46+ author = AUTHOR ,
47+ author_email = EMAIL ,
48+ license = LICENSE ,
49+ url = WEBSITE ,
50+ py_modules = MODULES ,
51+ scripts = ['bin/socos' ],
52+ entry_points = {
53+ 'console_scripts' : [
54+ 'socos = socos:main' ,
55+ ]
56+ },
57+ ** OPTIONS
58+ )
Original file line number Diff line number Diff line change 11#!/usr/bin/env python
22
33from __future__ import print_function
4+
5+
6+ """ socos is a commandline tool for controlling Sonos speakers """
7+
8+ # Will be parsed by setup.py to determine package metadata
9+ __author__ = 'SoCo team <python-soco @googlegroups.com>'
10+ __version__ = '0.1'
11+ __website__ = 'https://github.com/SoCo/socos'
12+ __license__ = 'MIT License'
13+
14+
415import sys
516try :
617 import colorama
You can’t perform that action at this time.
0 commit comments