From: Guillaume Pellerin Date: Tue, 13 Jul 2010 13:39:50 +0000 (+0000) Subject: fix module import, add deps, fix install X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=4527d480c2517006ee8b5258bd772816e8e80bc9;p=deefuzzer.git fix module import, add deps, fix install --- diff --git a/INSTALL b/INSTALL index 3341d55..e56307d 100644 --- a/INSTALL +++ b/INSTALL @@ -10,11 +10,11 @@ # Author: Guillaume Pellerin 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 diff --git a/install.py b/install.py index c005902..4746d12 100644 --- a/install.py +++ b/install.py @@ -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') diff --git a/tools/station.py b/tools/station.py index b18c06f..a07b69c 100644 --- a/tools/station.py +++ b/tools/station.py @@ -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])