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