Sort requirement files in alphabetical order
Sort requirement files in alphabetical order and enforce pep8 check. Partial-Bug: #1285478 Change-Id: I0ff79651df9529a7c8da87cc51dcf0a1594702f9
This commit is contained in:
parent
28c4dba09e
commit
249063daf0
|
@ -1,24 +1,24 @@
|
|||
pbr>=0.5.21,<1.0
|
||||
SQLAlchemy>=0.7.8,<=0.7.99
|
||||
|
||||
amqplib>=0.6.1
|
||||
anyjson>=0.3.3
|
||||
argparse
|
||||
Babel>=1.3
|
||||
-e git+http://git.openstack.org/cgit/openstack/tripleo-heat-templates#egg=tripleo_heat_templates-master
|
||||
eventlet>=0.13.0
|
||||
Flask>=0.10,<1.0
|
||||
greenlet>=0.3.2
|
||||
iso8601>=0.1.8
|
||||
kombu>=2.4.8
|
||||
lxml>=2.3
|
||||
WebOb>=1.2.3,<1.3
|
||||
greenlet>=0.3.2
|
||||
sqlalchemy-migrate>=0.8.2
|
||||
Babel>=1.3
|
||||
iso8601>=0.1.8
|
||||
setuptools_git>=0.4
|
||||
python-keystoneclient>=0.4.1
|
||||
oslo.config>=1.2.0
|
||||
Flask>=0.10,<1.0
|
||||
pbr>=0.5.21,<1.0
|
||||
pecan>=0.2.0
|
||||
WSME>=0.5b6
|
||||
python-heatclient>=0.2.3
|
||||
python-keystoneclient>=0.4.1
|
||||
python-novaclient>=2.15.0
|
||||
PyYAML>=3.1.0
|
||||
python-heatclient>=0.2.3
|
||||
|
||||
-e git+http://git.openstack.org/cgit/openstack/tripleo-heat-templates#egg=tripleo_heat_templates-master
|
||||
setuptools_git>=0.4
|
||||
SQLAlchemy>=0.7.8,<=0.7.99
|
||||
sqlalchemy-migrate>=0.8.2
|
||||
WebOb>=1.2.3,<1.3
|
||||
WSME>=0.5b6
|
||||
|
|
|
@ -1,18 +1,17 @@
|
|||
# Hacking already pins down pep8, pyflakes and flake8
|
||||
hacking>=0.8.0,<0.9
|
||||
|
||||
coverage>=3.6
|
||||
discover
|
||||
fixtures>=0.3.14
|
||||
# Hacking already pins down pep8, pyflakes and flake8
|
||||
hacking>=0.8.0,<0.9
|
||||
mock>=1.0
|
||||
mox>=0.5.3
|
||||
MySQL-python
|
||||
python-subunit
|
||||
# Doc requirements
|
||||
sphinx>=1.1.2,<1.2
|
||||
sphinxcontrib-pecanwsme>=0.5
|
||||
stevedore>=0.14
|
||||
testrepository>=0.0.17
|
||||
testtools>=0.9.32
|
||||
unittest2
|
||||
|
||||
# Doc requirements
|
||||
sphinx>=1.1.2,<1.2
|
||||
sphinxcontrib-pecanwsme>=0.5
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue