From 4e7d197c7fc30a251ddb9bf0595f6362b9df7df1 Mon Sep 17 00:00:00 2001 From: satreix Date: Fri, 18 Mar 2016 23:24:38 -0700 Subject: [PATCH] travis: better pip usage --- .gitattributes | 1 - .gitignore | 23 +++++++++++------------ .travis.yml | 23 ++++++----------------- headphones/__init__.py | 2 +- requirements-dev.txt | 8 ++++++++ 5 files changed, 26 insertions(+), 31 deletions(-) delete mode 100644 .gitattributes create mode 100644 requirements-dev.txt diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 176a458f..00000000 --- a/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -* text=auto diff --git a/.gitignore b/.gitignore index 8bacef32..29da270b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,20 +4,18 @@ .project .pydevproject -# coverage generated: +# coverage generated /cover-html/ .coverage .coveralls.yml -# Compiled source # -################### +# Compiled source *.pyc *.py~ *.pyproj *.sln -# Headphones files # -###################### +# Headphones files *.log *.db* *.db-journal @@ -26,27 +24,25 @@ version.lock logs/* cache/* -# HTTPS Cert/Key # -################## +# HTTPS Cert/Key *.crt *.key *.csr -# OS generated files # -###################### +# OS generated files .DS_Store? .DS_Store ehthumbs.db Icon? Thumbs.db -#Ignore files generated by PyCharm +# Ignore files generated by PyCharm .idea/* -#Ignore files generated by vi +# Ignore files generated by vi *.swp -#Ignore files build by Visual Studio +# Ignore files build by Visual Studio *.obj *.exe *.pdb @@ -72,3 +68,6 @@ obj/ [Rr]elease*/ _ReSharper*/ .vscode + +# Python virtual env +venv \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 165f65e3..41ad6f25 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,36 +2,25 @@ # http://about.travis-ci.org/docs/ language: python + sudo: false cache: pip: true directories: - - lib + - lib -# Available Python versions: -# http://about.travis-ci.org/docs/user/ci-environment/#Python-VM-images python: - "2.6" -matrix: - include: - - python: "2.7" - env: SENDCOVERAGE=1 + - "2.7" -# pylint 1.4 does not run under python 2.6 install: - - pip install pyOpenSSL - - pip install pylint==1.3.1 - - pip install pyflakes - - pip install pep8 - # coverage stuff: - - pip install coveralls - - pip install coverage + - pip install -r requirements-dev.txt + script: - pep8 headphones - pyflakes headphones - nosetests after_success: - # coverage stuff: - - if [ $SENDCOVERAGE ]; then coveralls; fi + - if [[ $TRAVIS_PYTHON_VERSION == "2.7" ]]; then coveralls; fi diff --git a/headphones/__init__.py b/headphones/__init__.py index 4b36acf7..daf067a5 100644 --- a/headphones/__init__.py +++ b/headphones/__init__.py @@ -143,7 +143,7 @@ def initialize(config_file): SOFT_CHROOT = SoftChroot(str(CONFIG.SOFT_CHROOT)) if SOFT_CHROOT.isEnabled(): logger.info("Soft-chroot enabled for dir: %s", str(CONFIG.SOFT_CHROOT)) - except exceptions.SoftChrootError as e: + except headphones.exceptions.SoftChrootError as e: logger.error("SoftChroot error: %s", e) raise e diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 00000000..09a50e63 --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1,8 @@ +coverage==4.0.3 +coveralls==1.1 +mock==1.3.0 +nose==1.3.7 +pep8==1.7.0 +pyflakes==1.1.0 +pylint==1.3.1 # pylint 1.4 does not run under python 2.6 +pyOpenSSL==0.15.1