2014-12-02 15:06:50 -05:00
|
|
|
#!/bin/bash -x
|
2014-04-22 15:16:18 -07:00
|
|
|
|
|
|
|
# Copyright 2013 OpenStack Foundation
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
|
|
# not use this file except in compliance with the License. You may obtain
|
|
|
|
# a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
# License for the specific language governing permissions and limitations
|
|
|
|
# under the License.
|
|
|
|
|
2015-09-28 17:44:35 +10:00
|
|
|
venv=${1:-pep8}
|
|
|
|
|
|
|
|
export UPPER_CONSTRAINTS_FILE=$(pwd)/upper-constraints.txt
|
2014-12-16 18:11:27 -05:00
|
|
|
|
2015-12-09 15:07:23 -05:00
|
|
|
virtualenv sdist_check && sdist_check/bin/pip install pbr && sdist_check/bin/python setup.py sdist
|
2015-12-04 14:54:04 -05:00
|
|
|
sdistrc=$?
|
2015-12-09 15:07:23 -05:00
|
|
|
rm -rf sdist_check
|
2015-12-04 14:54:04 -05:00
|
|
|
|
2014-12-16 18:11:27 -05:00
|
|
|
tox -v -e$venv
|
2014-12-02 15:06:50 -05:00
|
|
|
rc=$?
|
2014-04-22 15:16:18 -07:00
|
|
|
|
2014-12-16 18:11:27 -05:00
|
|
|
[ -e .tox/$venv/bin/pbr ] && freezecmd=pbr || freezecmd=pip
|
|
|
|
|
|
|
|
echo "Begin $freezecmd freeze output from test virtualenv:"
|
2014-07-09 13:01:12 +02:00
|
|
|
echo "======================================================================"
|
2014-12-23 10:42:31 -08:00
|
|
|
.tox/${venv}/bin/${freezecmd} freeze
|
2014-07-09 13:01:12 +02:00
|
|
|
echo "======================================================================"
|
2014-12-02 15:06:50 -05:00
|
|
|
|
2015-12-04 14:54:04 -05:00
|
|
|
if [ ! $sdistrc ] ; then
|
|
|
|
echo "******************************************************************"
|
|
|
|
echo "Project cannot create sdist tarball!!!"
|
|
|
|
echo "To reproduce this locally, run: 'python setup.py sdist'"
|
|
|
|
echo "******************************************************************"
|
|
|
|
exit $sdistrc
|
|
|
|
fi
|
|
|
|
|
2014-12-02 15:06:50 -05:00
|
|
|
exit $rc
|