Fix cookiecutter
Change-Id: I9beab1971cbeb77c081bac3bfdab4fcab9acdc6d
This commit is contained in:
parent
c036b072cc
commit
16642779e3
@ -74,22 +74,22 @@ if [ -z "${testing}" ]; then
|
||||
else
|
||||
tmp_var="${PWD}/puppet-${proj}"
|
||||
cookiecutter_conf="${PWD}/default-config.yaml"
|
||||
# https://github.com/audreyr/cookiecutter/pull/621
|
||||
if ! grep -q poyo /usr/lib/python2.7/site-packages/cookiecutter-*.egg-info/requires.txt; then
|
||||
# Requires gcc
|
||||
if [ -z "$(which gcc 2>/dev/null)" ]; then
|
||||
echo "GCC is required to install cookiecutter."
|
||||
exit 1
|
||||
fi
|
||||
sudo pip install ruamel.yaml
|
||||
set +e
|
||||
which pip3 2>&1
|
||||
ret=$?
|
||||
set -e
|
||||
if [ $ret -eq 0 ]; then
|
||||
pip_bin=pip3
|
||||
else
|
||||
pip_bin=pip
|
||||
fi
|
||||
sudo pip install cookiecutter==1.3.0
|
||||
sudo $pip_bin install cookiecutter==1.7.0
|
||||
cat > "${cookiecutter_conf}" <<EOF
|
||||
---
|
||||
default_context:
|
||||
project_name: $proj
|
||||
version: 0.0.1
|
||||
year: 2019
|
||||
year: 2020
|
||||
EOF
|
||||
fi
|
||||
|
||||
|
@ -7,8 +7,9 @@ prepare_environment() {
|
||||
rm -rf puppet-whazz default-config.yaml
|
||||
mkdir -p .bundled_gems
|
||||
export GEM_HOME=`pwd`/.bundled_gems
|
||||
export GEM_BIN_DIR=$GEM_HOME/bin
|
||||
ruby <<EOF
|
||||
cmd = 'gem install bundler --no-rdoc --no-ri --verbose'
|
||||
cmd = 'gem install bundler --no-rdoc --no-ri --verbose --bindir=${GEM_BIN_DIR}'
|
||||
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.3.0') then
|
||||
cmd += ' -v 1.17.3'
|
||||
end
|
||||
|
@ -1,12 +1,13 @@
|
||||
[tox]
|
||||
minversion = 2.0
|
||||
minversion = 3.1
|
||||
skipsdist = True
|
||||
envlist = releasenotes
|
||||
ignore_basepython_conflict = True
|
||||
|
||||
[testenv]
|
||||
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt} {opts} {packages}
|
||||
basepython = python3
|
||||
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages}
|
||||
|
||||
[testenv:releasenotes]
|
||||
basepython = python3
|
||||
deps = -r{toxinidir}/doc/requirements.txt
|
||||
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
||||
|
Loading…
x
Reference in New Issue
Block a user