diff --git a/.travis.yml b/.travis.yml index 9d2de8f..9f0c298 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,8 @@ language: python + +# with enabled SUDO the build goes slower sudo: false + python: # - "2.6" - "2.7" @@ -15,18 +18,13 @@ cache: directories: - node_modules - libs + - lib # command to install dependencies install: - - npm install - pip install --upgrade pip - - pip install coverage - - pip install coveralls - # disabled, since we don't require colors for tests on travis - - pip install --upgrade nose - # - pip install rednose - - - nosetests --plugins + - npm install + - pip install -r requirements-dev.txt -t ./libs # command to run tests script: diff --git a/CouchPotato.py b/CouchPotato.py index afc46aa..b4a6421 100755 --- a/CouchPotato.py +++ b/CouchPotato.py @@ -52,7 +52,7 @@ class Loader(object): os.makedirs(self.data_dir) # Create logging dir - self.log_dir = os.path.join(self.data_dir, 'logs'); + self.log_dir = os.path.join(self.data_dir, 'logs') if not os.path.isdir(self.log_dir): os.makedirs(self.log_dir) @@ -79,7 +79,7 @@ class Loader(object): def onExit(self, signal, frame): from couchpotato.core.event import fireEvent - fireEvent('app.shutdown', single = True) + fireEvent('app.shutdown', single=True) def run(self): @@ -96,8 +96,10 @@ class Loader(object): # remove old pidfile first try: if self.runAsDaemon(): - try: self.daemon.stop() - except: pass + try: + self.daemon.stop() + except: + pass except: self.log.critical(traceback.format_exc()) @@ -122,7 +124,7 @@ class Loader(object): self.log.critical(traceback.format_exc()) def runAsDaemon(self): - return self.options.daemon and self.options.pid_file + return self.options.daemon and self.options.pid_file if __name__ == '__main__': diff --git a/py-dev-requirements.txt b/py-dev-requirements.txt deleted file mode 100644 index e0b0c4c..0000000 --- a/py-dev-requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -nose -rednose -nose-htmloutput -coverage -coveralls diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 0000000..c39693d --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1,12 @@ +# development requirements + +mock>=1.3.0 +nose>=1.3.1 +nose-exclude>=0.4.1 +nose-htmloutput>=0.6.0 +coverage +coveralls +pep8>=1.4.6 + +# you could disable it on travis +rednose>=0.4.0