Sort requirement files in alphabetical order
This makes code more readable, and can check whether specific library in the requirement files easily. We also enforce the check in pep8. Change-Id: I032c3c3d29522ce85f64b21d6428d975e46cc701 Closes-Bug: #1285478
This commit is contained in:
parent
ec350d7a4f
commit
035abae6ef
@ -1,30 +1,30 @@
|
|||||||
pbr>=0.6,!=0.7,<1.0
|
argparse
|
||||||
pycrypto>=2.6
|
Babel>=1.3
|
||||||
eventlet>=0.13.0
|
eventlet>=0.13.0
|
||||||
greenlet>=0.3.2
|
greenlet>=0.3.2
|
||||||
httplib2>=0.7.5
|
httplib2>=0.7.5
|
||||||
iso8601>=0.1.9
|
iso8601>=0.1.9
|
||||||
kombu>=2.4.8
|
kombu>=2.4.8
|
||||||
argparse
|
|
||||||
lxml>=2.3
|
lxml>=2.3
|
||||||
netaddr>=0.7.6
|
netaddr>=0.7.6
|
||||||
six>=1.5.2
|
oslo.config>=1.2.0
|
||||||
sqlalchemy-migrate>=0.8.2,!=0.8.4
|
paramiko>=1.9.0
|
||||||
python-novaclient>=2.17.0
|
|
||||||
PasteDeploy>=1.5.0
|
PasteDeploy>=1.5.0
|
||||||
requests>=1.1
|
pbr>=0.6,!=0.7,<1.0
|
||||||
Routes>=1.12.3
|
pycrypto>=2.6
|
||||||
SQLAlchemy>=0.7.8,<=0.9.99
|
|
||||||
WebOb>=1.2.3
|
|
||||||
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-ceilometerclient>=1.0.6
|
||||||
python-cinderclient>=1.0.6
|
python-cinderclient>=1.0.6
|
||||||
|
python-heatclient>=0.2.3
|
||||||
|
python-keystoneclient>=0.7.0
|
||||||
|
python-neutronclient>=2.3.4,<3
|
||||||
|
python-novaclient>=2.17.0
|
||||||
|
python-swiftclient>=1.6
|
||||||
python-troveclient>=1.0.3
|
python-troveclient>=1.0.3
|
||||||
PyYAML>=3.1.0
|
PyYAML>=3.1.0
|
||||||
paramiko>=1.9.0
|
|
||||||
Babel>=1.3
|
|
||||||
oslo.config>=1.2.0
|
|
||||||
qpid-python
|
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
|
||||||
|
@ -1,14 +1,13 @@
|
|||||||
# Hacking already pins down pep8, pyflakes and flake8
|
|
||||||
hacking>=0.8.0,<0.9
|
|
||||||
|
|
||||||
coverage>=3.6
|
coverage>=3.6
|
||||||
discover
|
discover
|
||||||
|
# Hacking already pins down pep8, pyflakes and flake8
|
||||||
|
hacking>=0.8.0,<0.9
|
||||||
|
lockfile>=0.8
|
||||||
mock>=1.0
|
mock>=1.0
|
||||||
mox>=0.5.3
|
mox>=0.5.3
|
||||||
testtools>=0.9.34
|
oslosphinx
|
||||||
testrepository>=0.0.18
|
|
||||||
testscenarios>=0.4
|
|
||||||
python-glanceclient>=0.9.0
|
python-glanceclient>=0.9.0
|
||||||
sphinx>=1.1.2,<1.2
|
sphinx>=1.1.2,<1.2
|
||||||
oslosphinx
|
testrepository>=0.0.18
|
||||||
lockfile>=0.8
|
testscenarios>=0.4
|
||||||
|
testtools>=0.9.34
|
||||||
|
32
tools/requirements_style_check.sh
Executable file
32
tools/requirements_style_check.sh
Executable file
@ -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
|
1
tox.ini
1
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
|
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
|
# disable check_uptodate until a resolution is found to bug #1288586
|
||||||
#{toxinidir}/tools/config/check_uptodate.sh
|
#{toxinidir}/tools/config/check_uptodate.sh
|
||||||
|
{toxinidir}/tools/requirements_style_check.sh requirements.txt test-requirements.txt
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
Loading…
Reference in New Issue
Block a user