Merge "DIB: default to installing pip and virtualenv from packages"
This commit is contained in:
commit
42ec4f9aea
@ -13,8 +13,8 @@ VENVDIR=/opt/ironic-python-agent
|
|||||||
# Generate upper-constraints
|
# Generate upper-constraints
|
||||||
$IPADIR/imagebuild/common/generate_upper_constraints.sh $IPADIR/upper-constraints.txt
|
$IPADIR/imagebuild/common/generate_upper_constraints.sh $IPADIR/upper-constraints.txt
|
||||||
|
|
||||||
# create the virtual environment
|
# create the virtual environment using the default python
|
||||||
virtualenv $VENVDIR
|
$DIB_PYTHON -m virtualenv -- $VENVDIR
|
||||||
|
|
||||||
# pip might be an older version which does not support the -c option, therefore upgrade first
|
# pip might be an older version which does not support the -c option, therefore upgrade first
|
||||||
$VENVDIR/bin/pip install pip --upgrade
|
$VENVDIR/bin/pip install pip --upgrade
|
||||||
|
@ -48,6 +48,11 @@ def main():
|
|||||||
help="Additional DIB element to use")
|
help="Additional DIB element to use")
|
||||||
# TODO(dtantsur): handle distribution == tinyipa
|
# TODO(dtantsur): handle distribution == tinyipa
|
||||||
os.environ['ELEMENTS_PATH'] = find_elements_path()
|
os.environ['ELEMENTS_PATH'] = find_elements_path()
|
||||||
|
if not os.environ.get('DIB_INSTALLTYPE_pip_and_virtualenv'):
|
||||||
|
# DIB updates these to latest versions from source. However, we do the
|
||||||
|
# same in our virtualenv, so it's not needed and just increases the
|
||||||
|
# size of the image.
|
||||||
|
os.environ['DIB_INSTALLTYPE_pip_and_virtualenv'] = 'package'
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
try:
|
try:
|
||||||
subprocess.check_call(['disk-image-create', '-o', args.output,
|
subprocess.check_call(['disk-image-create', '-o', args.output,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user