]> git.parisson.com Git - deefuzzer.git/commitdiff
fix module import, add deps, fix install
authorGuillaume Pellerin <yomguy@parisson.com>
Tue, 13 Jul 2010 13:39:50 +0000 (13:39 +0000)
committerGuillaume Pellerin <yomguy@parisson.com>
Tue, 13 Jul 2010 13:39:50 +0000 (13:39 +0000)
INSTALL
install.py
tools/station.py

diff --git a/INSTALL b/INSTALL
index 3341d5539a0c0e7a14e60466fbbcf75b18f52103..e56307de2077c35d7c7d67df2e7a9e00445222a7 100644 (file)
--- a/INSTALL
+++ b/INSTALL
 # Author: Guillaume Pellerin <pellerin@parisson.com>
 
  depends:  python, python-dev, python-xml, python-shout | shout-python, libshout3,
-           libshout3-dev, python-mutagen
+           libshout3-dev, python-mutagen, python-setuptools, python-twitter
 
  provides:  shout-python
 
- optional: python-twitter, python-tinyurl, python-liblo | pyliblo (>= 0.26)
+ optional: python-liblo | pyliblo (>= 0.26)
 
  recommends: icecast2
 
index c0059027936759c64870d8e8b3442e921240ea8b..4746d12572d5b072feeb386d13104488a08beac7 100644 (file)
@@ -52,7 +52,13 @@ if not os.path.exists(install_dir):
     os.mkdir(install_dir)
 
 os.system('cp -ra ./* '+install_dir+os.sep)
-os.system('rm -rf '+install_dir+os.sep+'debian')
+
+# Install shout-python
+os.chdir('shout-python')
+os.system('python setup.py install')
+os.chdir('..')
+
+os.system('easy_install tinyurl')
 
 if os.path.exists('/usr/bin/deefuzzer'):
     os.system('rm -r /usr/bin/deefuzzer')
index b18c06fb70c504b7c3f7cb8a95f9b35c17c47daa..a07b69cf09576888695db8c7f7e8d5b3e74dec77 100644 (file)
@@ -43,7 +43,6 @@ import datetime
 import string
 import random
 import shout
-import tinyurl
 from threading import Thread
 from __init__ import *
 
@@ -144,7 +143,6 @@ class Station(Thread):
             self.twitter_user = self.station['twitter']['user']
             self.twitter_pass = self.station['twitter']['pass']
             self.twitter_tags = self.station['twitter']['tags'].split(' ')
-            self.twitter = Twitter(self.twitter_user, self.twitter_pass)
             if self.twitter_mode == 1:
                 self.twitter_callback('/twitter', [1])
 
@@ -209,6 +207,8 @@ class Station(Thread):
 
     def twitter_callback(self, path, value):
         value = value[0]
+        import tinyurl
+        self.twitter = Twitter(self.twitter_user, self.twitter_pass)
         self.twitter_mode = value
         message = "Received OSC message '%s' with arguments '%d'" % (path, value)
         self.m3u_tinyurl = tinyurl.create_one(self.channel.url + '/m3u/' + self.m3u.split(os.sep)[-1])