Merge "Split requirements into py2 and py3 files"

This commit is contained in:
Jenkins 2014-09-05 00:11:45 +00:00 committed by Gerrit Code Review
commit 7c3332e49b
5 changed files with 56 additions and 16 deletions

View File

@ -21,12 +21,13 @@ Requirements
Because TaskFlow has many optional (pluggable) parts like persistence Because TaskFlow has many optional (pluggable) parts like persistence
backends and engines, we decided to split our requirements into two backends and engines, we decided to split our requirements into two
parts: - things that are absolutely required by TaskFlow (you can't use parts: - things that are absolutely required by TaskFlow (you can't use
TaskFlow without them) are put to ``requirements.txt``; - things that TaskFlow without them) are put into ``requirements-pyN.txt`` (``N`` being the
are required by some optional part of TaskFlow (you can use TaskFlow Python *major* version number used to install the package); - things that are
without them) are put to ``optional-requirements.txt``; if you want to required by some optional part of TaskFlow (you can use TaskFlow without
use the feature in question, you should add that requirements to your them) are put into ``optional-requirements.txt``; if you want to use the
project or environment; - as usual, things that required only for feature in question, you should add that requirements to your project or
running tests are put to ``test-requirements.txt``. environment; - as usual, things that required only for running tests are
put into ``test-requirements.txt``.
Tox.ini Tox.ini
~~~~~~~ ~~~~~~~

View File

@ -10,4 +10,5 @@ Babel>=1.3
stevedore>=0.14 stevedore>=0.14
# Backport for concurrent.futures which exists in 3.2+ # Backport for concurrent.futures which exists in 3.2+
futures>=2.1.3 futures>=2.1.3
# Used for structured input validation
jsonschema>=2.0.0,<3.0.0 jsonschema>=2.0.0,<3.0.0

12
requirements-py3.txt Normal file
View File

@ -0,0 +1,12 @@
# Packages needed for using this library.
anyjson>=0.3.3
iso8601>=0.1.9
# Python 2->3 compatibility library.
six>=1.7.0
# Very nice graph library
networkx>=1.8
Babel>=1.3
# Used for backend storage engine loading.
stevedore>=0.14
# Used for structured input validation
jsonschema>=2.0.0,<3.0.0

View File

@ -10,8 +10,7 @@ skipsdist = True
usedevelop = True usedevelop = True
install_command = pip install {opts} {packages} install_command = pip install {opts} {packages}
setenv = VIRTUAL_ENV={envdir} setenv = VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/requirements.txt deps = -r{toxinidir}/test-requirements.txt
-r{toxinidir}/test-requirements.txt
alembic>=0.4.1 alembic>=0.4.1
psycopg2 psycopg2
kazoo>=1.3.1 kazoo>=1.3.1
@ -26,7 +25,7 @@ commands = flake8 {posargs}
[testenv:pylint] [testenv:pylint]
setenv = VIRTUAL_ENV={envdir} setenv = VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/requirements.txt deps = -r{toxinidir}/requirements-py2.txt
pylint==0.26.0 pylint==0.26.0
commands = pylint --rcfile=pylintrc taskflow commands = pylint --rcfile=pylintrc taskflow
@ -50,7 +49,7 @@ exclude = .venv,.tox,dist,doc,./taskflow/openstack/common,*egg,.git,build,tools
deps = {[testenv:py26-sa7-mysql-ev]deps} deps = {[testenv:py26-sa7-mysql-ev]deps}
[testenv:py27] [testenv:py27]
deps = -r{toxinidir}/requirements.txt deps = -r{toxinidir}/requirements-py2.txt
-r{toxinidir}/optional-requirements.txt -r{toxinidir}/optional-requirements.txt
-r{toxinidir}/test-requirements.txt -r{toxinidir}/test-requirements.txt
doc8>=0.3.4 doc8>=0.3.4
@ -61,11 +60,12 @@ commands =
[testenv:py33] [testenv:py33]
deps = {[testenv]deps} deps = {[testenv]deps}
-r{toxinidir}/requirements-py3.txt
SQLAlchemy>=0.7.8,<=0.9.99 SQLAlchemy>=0.7.8,<=0.9.99
# NOTE(imelnikov): psycopg2 is not supported on pypy # NOTE(imelnikov): psycopg2 is not supported on pypy
[testenv:pypy] [testenv:pypy]
deps = -r{toxinidir}/requirements.txt deps = -r{toxinidir}/requirements-py2.txt
-r{toxinidir}/test-requirements.txt -r{toxinidir}/test-requirements.txt
SQLAlchemy>=0.7.8,<=0.9.99 SQLAlchemy>=0.7.8,<=0.9.99
alembic>=0.4.1 alembic>=0.4.1
@ -81,10 +81,12 @@ eventlet = ev,*
[axis:python:py26] [axis:python:py26]
basepython = python2.6 basepython = python2.6
deps = {[testenv]deps} deps = {[testenv]deps}
-r{toxinidir}/requirements-py2.txt
[axis:python:py27] [axis:python:py27]
basepython = python2.7 basepython = python2.7
deps = {[testenv]deps} deps = {[testenv]deps}
-r{toxinidir}/requirements-py2.txt
[axis:eventlet:ev] [axis:eventlet:ev]
deps = deps =

34
tox.ini
View File

@ -39,8 +39,7 @@ envlist = cover,
usedevelop = True usedevelop = True
install_command = pip install {opts} {packages} install_command = pip install {opts} {packages}
setenv = VIRTUAL_ENV={envdir} setenv = VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/requirements.txt deps = -r{toxinidir}/test-requirements.txt
-r{toxinidir}/test-requirements.txt
alembic>=0.4.1 alembic>=0.4.1
psycopg2 psycopg2
kazoo>=1.3.1 kazoo>=1.3.1
@ -55,7 +54,7 @@ commands = flake8 {posargs}
[testenv:pylint] [testenv:pylint]
setenv = VIRTUAL_ENV={envdir} setenv = VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/requirements.txt deps = -r{toxinidir}/requirements-py2.txt
pylint==0.26.0 pylint==0.26.0
commands = pylint --rcfile=pylintrc taskflow commands = pylint --rcfile=pylintrc taskflow
@ -76,7 +75,7 @@ exclude = .venv,.tox,dist,doc,./taskflow/openstack/common,*egg,.git,build,tools
deps = {[testenv:py26-sa7-mysql-ev]deps} deps = {[testenv:py26-sa7-mysql-ev]deps}
[testenv:py27] [testenv:py27]
deps = -r{toxinidir}/requirements.txt deps = -r{toxinidir}/requirements-py2.txt
-r{toxinidir}/optional-requirements.txt -r{toxinidir}/optional-requirements.txt
-r{toxinidir}/test-requirements.txt -r{toxinidir}/test-requirements.txt
doc8>=0.3.4 doc8>=0.3.4
@ -87,10 +86,11 @@ commands =
[testenv:py33] [testenv:py33]
deps = {[testenv]deps} deps = {[testenv]deps}
-r{toxinidir}/requirements-py3.txt
SQLAlchemy>=0.7.8,<=0.9.99 SQLAlchemy>=0.7.8,<=0.9.99
[testenv:pypy] [testenv:pypy]
deps = -r{toxinidir}/requirements.txt deps = -r{toxinidir}/requirements-py2.txt
-r{toxinidir}/test-requirements.txt -r{toxinidir}/test-requirements.txt
SQLAlchemy>=0.7.8,<=0.9.99 SQLAlchemy>=0.7.8,<=0.9.99
alembic>=0.4.1 alembic>=0.4.1
@ -99,6 +99,7 @@ deps = -r{toxinidir}/requirements.txt
[testenv:py26-sa7-mysql-ev] [testenv:py26-sa7-mysql-ev]
deps = {[testenv]deps} deps = {[testenv]deps}
-r{toxinidir}/requirements-py2.txt
SQLAlchemy>=0.7.8,<=0.7.99 SQLAlchemy>=0.7.8,<=0.7.99
MySQL-python MySQL-python
eventlet>=0.13.0 eventlet>=0.13.0
@ -106,12 +107,14 @@ basepython = python2.6
[testenv:py26-sa7-mysql] [testenv:py26-sa7-mysql]
deps = {[testenv]deps} deps = {[testenv]deps}
-r{toxinidir}/requirements-py2.txt
SQLAlchemy>=0.7.8,<=0.7.99 SQLAlchemy>=0.7.8,<=0.7.99
MySQL-python MySQL-python
basepython = python2.6 basepython = python2.6
[testenv:py26-sa7-pymysql-ev] [testenv:py26-sa7-pymysql-ev]
deps = {[testenv]deps} deps = {[testenv]deps}
-r{toxinidir}/requirements-py2.txt
SQLAlchemy>=0.7.8,<=0.7.99 SQLAlchemy>=0.7.8,<=0.7.99
pyMySQL pyMySQL
eventlet>=0.13.0 eventlet>=0.13.0
@ -119,12 +122,14 @@ basepython = python2.6
[testenv:py26-sa7-pymysql] [testenv:py26-sa7-pymysql]
deps = {[testenv]deps} deps = {[testenv]deps}
-r{toxinidir}/requirements-py2.txt
SQLAlchemy>=0.7.8,<=0.7.99 SQLAlchemy>=0.7.8,<=0.7.99
pyMySQL pyMySQL
basepython = python2.6 basepython = python2.6
[testenv:py26-sa8-mysql-ev] [testenv:py26-sa8-mysql-ev]
deps = {[testenv]deps} deps = {[testenv]deps}
-r{toxinidir}/requirements-py2.txt
SQLAlchemy>=0.8,<=0.8.99 SQLAlchemy>=0.8,<=0.8.99
MySQL-python MySQL-python
eventlet>=0.13.0 eventlet>=0.13.0
@ -132,12 +137,14 @@ basepython = python2.6
[testenv:py26-sa8-mysql] [testenv:py26-sa8-mysql]
deps = {[testenv]deps} deps = {[testenv]deps}
-r{toxinidir}/requirements-py2.txt
SQLAlchemy>=0.8,<=0.8.99 SQLAlchemy>=0.8,<=0.8.99
MySQL-python MySQL-python
basepython = python2.6 basepython = python2.6
[testenv:py26-sa8-pymysql-ev] [testenv:py26-sa8-pymysql-ev]
deps = {[testenv]deps} deps = {[testenv]deps}
-r{toxinidir}/requirements-py2.txt
SQLAlchemy>=0.8,<=0.8.99 SQLAlchemy>=0.8,<=0.8.99
pyMySQL pyMySQL
eventlet>=0.13.0 eventlet>=0.13.0
@ -145,12 +152,14 @@ basepython = python2.6
[testenv:py26-sa8-pymysql] [testenv:py26-sa8-pymysql]
deps = {[testenv]deps} deps = {[testenv]deps}
-r{toxinidir}/requirements-py2.txt
SQLAlchemy>=0.8,<=0.8.99 SQLAlchemy>=0.8,<=0.8.99
pyMySQL pyMySQL
basepython = python2.6 basepython = python2.6
[testenv:py26-sa9-mysql-ev] [testenv:py26-sa9-mysql-ev]
deps = {[testenv]deps} deps = {[testenv]deps}
-r{toxinidir}/requirements-py2.txt
SQLAlchemy>=0.9,<=0.9.99 SQLAlchemy>=0.9,<=0.9.99
MySQL-python MySQL-python
eventlet>=0.13.0 eventlet>=0.13.0
@ -158,12 +167,14 @@ basepython = python2.6
[testenv:py26-sa9-mysql] [testenv:py26-sa9-mysql]
deps = {[testenv]deps} deps = {[testenv]deps}
-r{toxinidir}/requirements-py2.txt
SQLAlchemy>=0.9,<=0.9.99 SQLAlchemy>=0.9,<=0.9.99
MySQL-python MySQL-python
basepython = python2.6 basepython = python2.6
[testenv:py26-sa9-pymysql-ev] [testenv:py26-sa9-pymysql-ev]
deps = {[testenv]deps} deps = {[testenv]deps}
-r{toxinidir}/requirements-py2.txt
SQLAlchemy>=0.9,<=0.9.99 SQLAlchemy>=0.9,<=0.9.99
pyMySQL pyMySQL
eventlet>=0.13.0 eventlet>=0.13.0
@ -171,12 +182,14 @@ basepython = python2.6
[testenv:py26-sa9-pymysql] [testenv:py26-sa9-pymysql]
deps = {[testenv]deps} deps = {[testenv]deps}
-r{toxinidir}/requirements-py2.txt
SQLAlchemy>=0.9,<=0.9.99 SQLAlchemy>=0.9,<=0.9.99
pyMySQL pyMySQL
basepython = python2.6 basepython = python2.6
[testenv:py27-sa7-mysql-ev] [testenv:py27-sa7-mysql-ev]
deps = {[testenv]deps} deps = {[testenv]deps}
-r{toxinidir}/requirements-py2.txt
SQLAlchemy>=0.7.8,<=0.7.99 SQLAlchemy>=0.7.8,<=0.7.99
MySQL-python MySQL-python
eventlet>=0.13.0 eventlet>=0.13.0
@ -184,12 +197,14 @@ basepython = python2.7
[testenv:py27-sa7-mysql] [testenv:py27-sa7-mysql]
deps = {[testenv]deps} deps = {[testenv]deps}
-r{toxinidir}/requirements-py2.txt
SQLAlchemy>=0.7.8,<=0.7.99 SQLAlchemy>=0.7.8,<=0.7.99
MySQL-python MySQL-python
basepython = python2.7 basepython = python2.7
[testenv:py27-sa7-pymysql-ev] [testenv:py27-sa7-pymysql-ev]
deps = {[testenv]deps} deps = {[testenv]deps}
-r{toxinidir}/requirements-py2.txt
SQLAlchemy>=0.7.8,<=0.7.99 SQLAlchemy>=0.7.8,<=0.7.99
pyMySQL pyMySQL
eventlet>=0.13.0 eventlet>=0.13.0
@ -197,12 +212,14 @@ basepython = python2.7
[testenv:py27-sa7-pymysql] [testenv:py27-sa7-pymysql]
deps = {[testenv]deps} deps = {[testenv]deps}
-r{toxinidir}/requirements-py2.txt
SQLAlchemy>=0.7.8,<=0.7.99 SQLAlchemy>=0.7.8,<=0.7.99
pyMySQL pyMySQL
basepython = python2.7 basepython = python2.7
[testenv:py27-sa8-mysql-ev] [testenv:py27-sa8-mysql-ev]
deps = {[testenv]deps} deps = {[testenv]deps}
-r{toxinidir}/requirements-py2.txt
SQLAlchemy>=0.8,<=0.8.99 SQLAlchemy>=0.8,<=0.8.99
MySQL-python MySQL-python
eventlet>=0.13.0 eventlet>=0.13.0
@ -210,12 +227,14 @@ basepython = python2.7
[testenv:py27-sa8-mysql] [testenv:py27-sa8-mysql]
deps = {[testenv]deps} deps = {[testenv]deps}
-r{toxinidir}/requirements-py2.txt
SQLAlchemy>=0.8,<=0.8.99 SQLAlchemy>=0.8,<=0.8.99
MySQL-python MySQL-python
basepython = python2.7 basepython = python2.7
[testenv:py27-sa8-pymysql-ev] [testenv:py27-sa8-pymysql-ev]
deps = {[testenv]deps} deps = {[testenv]deps}
-r{toxinidir}/requirements-py2.txt
SQLAlchemy>=0.8,<=0.8.99 SQLAlchemy>=0.8,<=0.8.99
pyMySQL pyMySQL
eventlet>=0.13.0 eventlet>=0.13.0
@ -223,12 +242,14 @@ basepython = python2.7
[testenv:py27-sa8-pymysql] [testenv:py27-sa8-pymysql]
deps = {[testenv]deps} deps = {[testenv]deps}
-r{toxinidir}/requirements-py2.txt
SQLAlchemy>=0.8,<=0.8.99 SQLAlchemy>=0.8,<=0.8.99
pyMySQL pyMySQL
basepython = python2.7 basepython = python2.7
[testenv:py27-sa9-mysql-ev] [testenv:py27-sa9-mysql-ev]
deps = {[testenv]deps} deps = {[testenv]deps}
-r{toxinidir}/requirements-py2.txt
SQLAlchemy>=0.9,<=0.9.99 SQLAlchemy>=0.9,<=0.9.99
MySQL-python MySQL-python
eventlet>=0.13.0 eventlet>=0.13.0
@ -236,12 +257,14 @@ basepython = python2.7
[testenv:py27-sa9-mysql] [testenv:py27-sa9-mysql]
deps = {[testenv]deps} deps = {[testenv]deps}
-r{toxinidir}/requirements-py2.txt
SQLAlchemy>=0.9,<=0.9.99 SQLAlchemy>=0.9,<=0.9.99
MySQL-python MySQL-python
basepython = python2.7 basepython = python2.7
[testenv:py27-sa9-pymysql-ev] [testenv:py27-sa9-pymysql-ev]
deps = {[testenv]deps} deps = {[testenv]deps}
-r{toxinidir}/requirements-py2.txt
SQLAlchemy>=0.9,<=0.9.99 SQLAlchemy>=0.9,<=0.9.99
pyMySQL pyMySQL
eventlet>=0.13.0 eventlet>=0.13.0
@ -249,6 +272,7 @@ basepython = python2.7
[testenv:py27-sa9-pymysql] [testenv:py27-sa9-pymysql]
deps = {[testenv]deps} deps = {[testenv]deps}
-r{toxinidir}/requirements-py2.txt
SQLAlchemy>=0.9,<=0.9.99 SQLAlchemy>=0.9,<=0.9.99
pyMySQL pyMySQL
basepython = python2.7 basepython = python2.7