summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2015-12-11 09:14:43 +0200
committerClaudiu Popa <pcmanticore@gmail.com>2015-12-29 16:52:09 +0200
commite7107ae681c161f6cad0e43af510b3dbda30026f (patch)
treeb32fe01efbd2ed68cd764e09145530f81ae79439
parent7e270bcf3843fc775872305ba934463ad845b6e4 (diff)
downloadastroid-git-e7107ae681c161f6cad0e43af510b3dbda30026f.tar.gz
Include a travis.yml file for configuring Travis builds
This patch also brings a couple of small changes to the setup.py file, in order to make it work installing from another directory.
-rw-r--r--.travis.yml36
-rw-r--r--setup.py9
-rw-r--r--tox.ini4
3 files changed, 44 insertions, 5 deletions
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 00000000..09af14a7
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,36 @@
+language: python
+
+matrix:
+ include:
+ - python: 2.7
+ env: TOXENV=py27
+ - python: 3.3
+ env: TOXENV=py33
+ - python: 3.4
+ env: TOXENV=py34
+ - python: 3.5
+ env: TOXENV=py35
+ - python: pypy
+ env: TOXENV=pypy
+ - python: 3.5
+ env: TOXENV=pylint
+before_install:
+ - python --version
+ - uname -a
+ - lsb_release -a
+install:
+ - pip install tox
+ - virtualenv --version
+ - easy_install --version
+ - pip --version
+ - tox --version
+script:
+ - tox -e $TOXENV
+after_failure:
+ - more .tox/log/* | cat
+ - more .tox/*/log/* | cat
+notifications:
+ email:
+ on_success: always
+ on_failure: always
+
diff --git a/setup.py b/setup.py
index e03d6433..e143a2b9 100644
--- a/setup.py
+++ b/setup.py
@@ -22,17 +22,20 @@ import os
from setuptools import setup, find_packages
from setuptools.command import install_lib
-pkginfo = 'astroid/__pkginfo__.py'
+
+real_path = os.path.realpath(__file__)
+astroid_dir = os.path.dirname(real_path)
+pkginfo = os.path.join(astroid_dir, 'astroid', '__pkginfo__.py')
with open(pkginfo, 'rb') as fobj:
exec(compile(fobj.read(), pkginfo, 'exec'), locals())
-with open('README') as fobj:
+with open(os.path.join(astroid_dir, 'README.rst')) as fobj:
long_description = fobj.read()
class AstroidInstallLib(install_lib.install_lib):
def byte_compile(self, files):
- test_datadir = os.path.join('astroid', 'tests', 'testdata')
+ test_datadir = os.path.join(astroid_dir, 'tests', 'testdata')
files = [f for f in files if test_datadir not in f]
install_lib.install_lib.byte_compile(self, files)
diff --git a/tox.ini b/tox.ini
index c5c7924a..46aad96f 100644
--- a/tox.ini
+++ b/tox.ini
@@ -18,5 +18,5 @@ deps =
py27,py33,pypy,jython: singledispatch
six
wrapt
- pylint: hg+https://bitbucket.org/logilab/pylint
-commands = python -m unittest discover {posargs} -s {envsitepackagesdir}/astroid/tests -p "unittest*.py"
+ pylint: git+https://github.com/pycqa/pylint@master
+commands = python -Wi -m unittest discover -s {envsitepackagesdir}/astroid/tests -p "unittest*.py"