warn against sorting requirements
And do not check for sorted requirements. Change-Id: I64ae9191863564e278a35d42ec9cd743a233028e Closes-Bug: 1365061
This commit is contained in:
parent
a9aa4ef427
commit
7155d072b0
@ -1,9 +1,13 @@
|
|||||||
|
# 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
|
||||||
Babel>=1.3
|
Babel>=1.3
|
||||||
Flask>=0.10,<1.0
|
Flask>=0.10,<1.0
|
||||||
iso8601>=0.1.9
|
iso8601>=0.1.9
|
||||||
oslo.config>=1.2.1
|
oslo.config>=1.2.1
|
||||||
paramiko>=1.13.0
|
paramiko>=1.13.0
|
||||||
pbr>=0.6,!=0.7,<1.0
|
|
||||||
psutil>=1.1.1,<2.0.0
|
psutil>=1.1.1,<2.0.0
|
||||||
python3-memcached>=1.48
|
python3-memcached>=1.48
|
||||||
PyYAML>=3.1.0
|
PyYAML>=3.1.0
|
||||||
|
@ -1,9 +1,13 @@
|
|||||||
|
# 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
|
||||||
Babel>=1.3
|
Babel>=1.3
|
||||||
Flask>=0.10,<1.0
|
Flask>=0.10,<1.0
|
||||||
iso8601>=0.1.9
|
iso8601>=0.1.9
|
||||||
oslo.config>=1.2.1
|
oslo.config>=1.2.1
|
||||||
paramiko>=1.13.0
|
paramiko>=1.13.0
|
||||||
pbr>=0.6,!=0.7,<1.0
|
|
||||||
psutil>=1.1.1,<2.0.0
|
psutil>=1.1.1,<2.0.0
|
||||||
python-memcached>=1.48
|
python-memcached>=1.48
|
||||||
PyYAML>=3.1.0
|
PyYAML>=3.1.0
|
||||||
|
@ -1,8 +1,13 @@
|
|||||||
|
# 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.
|
||||||
|
|
||||||
|
# Hacking already pins down pep8, pyflakes and flake8
|
||||||
|
hacking>=0.8.0,<0.9
|
||||||
coverage>=3.6
|
coverage>=3.6
|
||||||
discover
|
discover
|
||||||
docutils==0.9.1
|
docutils==0.9.1
|
||||||
fixtures>=0.3.14
|
fixtures>=0.3.14
|
||||||
hacking>=0.8.0,<0.9
|
|
||||||
jsonschema>=2.0.0,<3.0.0
|
jsonschema>=2.0.0,<3.0.0
|
||||||
mock>=1.0
|
mock>=1.0
|
||||||
python-subunit
|
python-subunit
|
||||||
|
@ -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 -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
@ -25,7 +25,6 @@ deps = -r{toxinidir}/requirements-py3.txt
|
|||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
commands = flake8
|
commands = flake8
|
||||||
{toxinidir}/tools/requirements_style_check.sh requirements.txt requirements-py3.txt test-requirements.txt
|
|
||||||
distribute = false
|
distribute = false
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user