warn against sorting requirements

And do not check for sorted files.

Change-Id: I64ae9191863564e278a35d42ec9cd743a233028e
Closes-Bug: 1365061
This commit is contained in:
Andreas Jaeger 2014-09-03 22:20:47 +02:00
parent b7f295fd7d
commit 3ebd84bf3c
4 changed files with 11 additions and 36 deletions

View File

@ -1,3 +1,8 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
pbr>=0.6,!=0.7,<1.0
argparse argparse
Babel>=1.3 Babel>=1.3
eventlet>=0.13.0 eventlet>=0.13.0
@ -12,7 +17,6 @@ oslo.config>=1.4.0.0a3
oslo.db>=0.2.0 # Apache-2.0 oslo.db>=0.2.0 # Apache-2.0
oslo.messaging>=1.3.0 oslo.messaging>=1.3.0
PasteDeploy>=1.5.0 PasteDeploy>=1.5.0
pbr>=0.6,!=0.7,<1.0
posix_ipc posix_ipc
pycrypto>=2.6 pycrypto>=2.6
python-ceilometerclient>=1.0.6 python-ceilometerclient>=1.0.6

View File

@ -1,7 +1,11 @@
coverage>=3.6 # The order of packages is significant, because pip processes them in the order
discover # of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
# Hacking already pins down pep8, pyflakes and flake8 # Hacking already pins down pep8, pyflakes and flake8
hacking>=0.8.0,<0.9 hacking>=0.8.0,<0.9
coverage>=3.6
discover
lockfile>=0.8 lockfile>=0.8
mock>=1.0 mock>=1.0
mox>=0.5.3 mox>=0.5.3

View File

@ -1,32 +0,0 @@
#!/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 -d -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

View File

@ -25,7 +25,6 @@ commands =
commands = commands =
flake8 heat bin/heat-api bin/heat-api-cfn bin/heat-api-cloudwatch bin/heat-engine bin/heat-manage contrib functionaltests flake8 heat bin/heat-api bin/heat-api-cfn bin/heat-api-cloudwatch bin/heat-engine bin/heat-manage contrib functionaltests
{toxinidir}/tools/config/check_uptodate.sh {toxinidir}/tools/config/check_uptodate.sh
{toxinidir}/tools/requirements_style_check.sh requirements.txt test-requirements.txt
# Check that .po and .pot files are valid: # Check that .po and .pot files are valid:
bash -c "find heat -type f -regex '.*\.pot?' -print0|xargs -0 -n 1 msgfmt --check-format -o /dev/null" bash -c "find heat -type f -regex '.*\.pot?' -print0|xargs -0 -n 1 msgfmt --check-format -o /dev/null"