From cde5b5170baa9d20c49e515699f5fc24345bc11c Mon Sep 17 00:00:00 2001 From: Thom Wiggers Date: Sun, 28 Feb 2016 12:53:35 +0100 Subject: [PATCH] Allow testing with tox --- .gitignore | 1 + setup.py | 3 ++- tox.ini | 6 ++++++ 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 tox.ini diff --git a/.gitignore b/.gitignore index 79889fe..80a1583 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ build dist pygit2.so _pygit2.so +.tox/ test/*.pyc test/__pycache__ pygit2/*.pyc diff --git a/setup.py b/setup.py index 54bbb0c..28d3fbd 100644 --- a/setup.py +++ b/setup.py @@ -108,7 +108,8 @@ class TestCommand(Command): class sdist_files_from_git(sdist): def get_file_list(self): - popen = Popen(['git', 'ls-files'], stdout=PIPE, stderr=PIPE) + popen = Popen(['git', 'ls-files'], stdout=PIPE, stderr=PIPE, + universal_newlines=True) stdoutdata, stderrdata = popen.communicate() if popen.returncode != 0: print(stderrdata) diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..a659c47 --- /dev/null +++ b/tox.ini @@ -0,0 +1,6 @@ +[tox] +envlist = py27,py32,py33,py34,py35,pypy,pypy3 + +[testenv] +commands = + python setup.py test