summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--requirements.txt32
-rw-r--r--test-requirements.txt15
-rwxr-xr-xtools/requirements_style_check.sh32
-rw-r--r--tox.ini1
4 files changed, 56 insertions, 24 deletions
diff --git a/requirements.txt b/requirements.txt
index 7399f73d2..aea5222e6 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,30 +1,30 @@
-pbr>=0.6,!=0.7,<1.0
-pycrypto>=2.6
+argparse
+Babel>=1.3
eventlet>=0.13.0
greenlet>=0.3.2
httplib2>=0.7.5
iso8601>=0.1.9
kombu>=2.4.8
-argparse
lxml>=2.3
netaddr>=0.7.6
-six>=1.5.2
-sqlalchemy-migrate>=0.8.2,!=0.8.4
-python-novaclient>=2.17.0
+oslo.config>=1.2.0
+paramiko>=1.9.0
PasteDeploy>=1.5.0
-requests>=1.1
-Routes>=1.12.3
-SQLAlchemy>=0.7.8,<=0.9.99
-WebOb>=1.2.3
+pbr>=0.6,!=0.7,<1.0
+pycrypto>=2.6
+python-ceilometerclient>=1.0.6
+python-cinderclient>=1.0.6
python-heatclient>=0.2.3
python-keystoneclient>=0.7.0
-python-swiftclient>=1.6
python-neutronclient>=2.3.4,<3
-python-ceilometerclient>=1.0.6
-python-cinderclient>=1.0.6
+python-novaclient>=2.17.0
+python-swiftclient>=1.6
python-troveclient>=1.0.3
PyYAML>=3.1.0
-paramiko>=1.9.0
-Babel>=1.3
-oslo.config>=1.2.0
qpid-python
+requests>=1.1
+Routes>=1.12.3
+six>=1.5.2
+SQLAlchemy>=0.7.8,<=0.9.99
+sqlalchemy-migrate>=0.8.2,!=0.8.4
+WebOb>=1.2.3
diff --git a/test-requirements.txt b/test-requirements.txt
index f8aab6837..c02607833 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -1,14 +1,13 @@
-# Hacking already pins down pep8, pyflakes and flake8
-hacking>=0.8.0,<0.9
-
coverage>=3.6
discover
+# Hacking already pins down pep8, pyflakes and flake8
+hacking>=0.8.0,<0.9
+lockfile>=0.8
mock>=1.0
mox>=0.5.3
-testtools>=0.9.34
-testrepository>=0.0.18
-testscenarios>=0.4
+oslosphinx
python-glanceclient>=0.9.0
sphinx>=1.1.2,<1.2
-oslosphinx
-lockfile>=0.8
+testrepository>=0.0.18
+testscenarios>=0.4
+testtools>=0.9.34
diff --git a/tools/requirements_style_check.sh b/tools/requirements_style_check.sh
new file mode 100755
index 000000000..ccbff3bdd
--- /dev/null
+++ b/tools/requirements_style_check.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+#
+# Enforce the requirement that dependencies are listed in the input
+# files in alphabetical order.
+
+# FIXME(dhellmann): This doesn't deal with URL requirements very
+# well. We should probably sort those on the egg-name, rather than the
+# full line.
+
+function check_file() {
+ typeset f=$1
+
+ # We don't care about comment lines.
+ grep -v '^#' $f > ${f}.unsorted
+ sort -i -f ${f}.unsorted > ${f}.sorted
+ diff -c ${f}.unsorted ${f}.sorted
+ rc=$?
+ rm -f ${f}.sorted ${f}.unsorted
+ return $rc
+}
+
+exit_code=0
+for filename in $@
+do
+ check_file $filename
+ if [ $? -ne 0 ]
+ then
+ echo "Please list requirements in $filename in alphabetical order" 1>&2
+ exit_code=1
+ fi
+done
+exit $exit_code
diff --git a/tox.ini b/tox.ini
index 4e0cf1617..c0b5ffdbf 100644
--- a/tox.ini
+++ b/tox.ini
@@ -17,6 +17,7 @@ commands =
flake8 heat bin/heat-api bin/heat-api-cfn bin/heat-api-cloudwatch bin/heat-engine bin/heat-manage contrib
# disable check_uptodate until a resolution is found to bug #1288586
#{toxinidir}/tools/config/check_uptodate.sh
+ {toxinidir}/tools/requirements_style_check.sh requirements.txt test-requirements.txt
[testenv:venv]
commands = {posargs}