Skip to content

Commit

Permalink
Use different requirements list on Python 2 and 3
Browse files Browse the repository at this point in the history
In Python 3 websocker-client not required (and previously requiested
version doesn't work at all).
  • Loading branch information
rutsky committed Mar 17, 2014
1 parent 375521d commit 5c850d4
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
4 changes: 4 additions & 0 deletions requirements3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
mock==1.0.1
requests==2.2.1
six>=1.3.0
websocket-client==0.11.0
8 changes: 7 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
#!/usr/bin/env python
import os
import sys
from setuptools import setup

ROOT_DIR = os.path.dirname(__file__)
SOURCE_DIR = os.path.join(ROOT_DIR)

if sys.version_info[0] == 3:
requirements_file = './requirements3.txt'
else:
requirements_file = './requirements.txt'

test_requirements = []
with open('./requirements.txt') as requirements_txt:
with open(requirements_file) as requirements_txt:
requirements = [line for line in requirements_txt]

setup(
Expand Down
16 changes: 14 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,24 @@
envlist = py26, py27, py32, py33, flake8
skipsdist=True

[testenv]
[testenv:py26]
usedevelop=True
commands =
{envpython} tests/test.py
deps = -r{toxinidir}/requirements.txt

[testenv:py27]
usedevelop=True
commands =
{envpython} tests/test.py
deps = -r{toxinidir}/requirements.txt

[testenv]
usedevelop=True
commands =
{envpython} tests/test.py
deps = -r{toxinidir}/requirements3.txt

[testenv:flake8]
commands = flake8 docker tests
deps = flake8
deps = flake8

0 comments on commit 5c850d4

Please sign in to comment.