Browse Source

Dependencies moved to the requirements.txt, travis config changed

pull/6087/head
maxkoryukov 9 years ago
parent
commit
94ec30fc2e
  1. 14
      .travis.yml
  2. 12
      CouchPotato.py
  3. 5
      py-dev-requirements.txt
  4. 12
      requirements-dev.txt

14
.travis.yml

@ -1,5 +1,8 @@
language: python language: python
# with enabled SUDO the build goes slower
sudo: false sudo: false
python: python:
# - "2.6" # - "2.6"
- "2.7" - "2.7"
@ -15,18 +18,13 @@ cache:
directories: directories:
- node_modules - node_modules
- libs - libs
- lib
# command to install dependencies # command to install dependencies
install: install:
- npm install
- pip install --upgrade pip - pip install --upgrade pip
- pip install coverage - npm install
- pip install coveralls - pip install -r requirements-dev.txt -t ./libs
# disabled, since we don't require colors for tests on travis
- pip install --upgrade nose
# - pip install rednose
- nosetests --plugins
# command to run tests # command to run tests
script: script:

12
CouchPotato.py

@ -52,7 +52,7 @@ class Loader(object):
os.makedirs(self.data_dir) os.makedirs(self.data_dir)
# Create logging 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): if not os.path.isdir(self.log_dir):
os.makedirs(self.log_dir) os.makedirs(self.log_dir)
@ -79,7 +79,7 @@ class Loader(object):
def onExit(self, signal, frame): def onExit(self, signal, frame):
from couchpotato.core.event import fireEvent from couchpotato.core.event import fireEvent
fireEvent('app.shutdown', single = True) fireEvent('app.shutdown', single=True)
def run(self): def run(self):
@ -96,8 +96,10 @@ class Loader(object):
# remove old pidfile first # remove old pidfile first
try: try:
if self.runAsDaemon(): if self.runAsDaemon():
try: self.daemon.stop() try:
except: pass self.daemon.stop()
except:
pass
except: except:
self.log.critical(traceback.format_exc()) self.log.critical(traceback.format_exc())
@ -122,7 +124,7 @@ class Loader(object):
self.log.critical(traceback.format_exc()) self.log.critical(traceback.format_exc())
def runAsDaemon(self): def runAsDaemon(self):
return self.options.daemon and self.options.pid_file return self.options.daemon and self.options.pid_file
if __name__ == '__main__': if __name__ == '__main__':

5
py-dev-requirements.txt

@ -1,5 +0,0 @@
nose
rednose
nose-htmloutput
coverage
coveralls

12
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
Loading…
Cancel
Save