Merge "Add ensure-venv element, install glean with it"
This commit is contained in:
commit
61b72ca2c2
5
diskimage_builder/elements/ensure-venv/README.rst
Normal file
5
diskimage_builder/elements/ensure-venv/README.rst
Normal file
@ -0,0 +1,5 @@
|
||||
===========
|
||||
ensure-venv
|
||||
===========
|
||||
|
||||
A simple element to make sure `python3 -m venv` will work.
|
1
diskimage_builder/elements/ensure-venv/element-deps
Normal file
1
diskimage_builder/elements/ensure-venv/element-deps
Normal file
@ -0,0 +1 @@
|
||||
package-installs
|
@ -0,0 +1 @@
|
||||
python3-venv:
|
19
diskimage_builder/elements/ensure-venv/pkg-map
Normal file
19
diskimage_builder/elements/ensure-venv/pkg-map
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"family": {
|
||||
"debian": {
|
||||
"python3-venv": "python3-venv"
|
||||
},
|
||||
"gentoo": {
|
||||
"python3-venv": "dev-lang/python"
|
||||
},
|
||||
"redhat": {
|
||||
"python3-venv": "python3"
|
||||
},
|
||||
"suse": {
|
||||
"python3-venv": "python3"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"python3-venv": ""
|
||||
}
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
cloud-init-datasources
|
||||
dib-init-system
|
||||
ensure-venv
|
||||
install-types
|
||||
pip-and-virtualenv
|
||||
runtime-ssh-host-keys
|
||||
source-repositories
|
||||
|
@ -21,4 +21,10 @@ fi
|
||||
set -eu
|
||||
set -o pipefail
|
||||
|
||||
$DIB_PYTHON_PIP install /tmp/glean.git
|
||||
python3 -m venv /usr/glean
|
||||
/usr/glean/bin/pip install /tmp/glean.git
|
||||
|
||||
mkdir -p /usr/local/bin
|
||||
ln -sf /usr/glean/bin/glean /usr/local/bin/glean
|
||||
ln -sf /usr/glean/bin/glean.sh /usr/local/bin/glean.sh
|
||||
ln -sf /usr/glean/bin/glean-install /usr/local/bin/glean-install
|
||||
|
@ -21,4 +21,10 @@ fi
|
||||
set -eu
|
||||
set -o pipefail
|
||||
|
||||
$DIB_PYTHON_PIP install glean
|
||||
python3 -m venv /usr/glean
|
||||
/usr/glean/bin/pip install glean
|
||||
|
||||
mkdir -p /usr/local/bin
|
||||
ln -sf /usr/glean/bin/glean /usr/local/bin/glean
|
||||
ln -sf /usr/glean/bin/glean.sh /usr/local/bin/glean.sh
|
||||
ln -sf /usr/glean/bin/glean-install /usr/local/bin/glean-install
|
||||
|
13
releasenotes/notes/ensure-venv-d7c16a2a04fd3b8f.yaml
Normal file
13
releasenotes/notes/ensure-venv-d7c16a2a04fd3b8f.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The `ensure-venv` module is added to ensure that `python3 -m venv`
|
||||
is available on the host. This can be useful if you wish to
|
||||
install non-distribution-packaged Python software on a host during
|
||||
build, but not mix any non-distro installation. This works on all
|
||||
platforms with Python 3 available.
|
||||
depreceations:
|
||||
- |
|
||||
The `simple-init` element now uses `ensure-venv` so is technically
|
||||
Python 3 only. At this stage, all supported platforms have Python
|
||||
3 available.
|
Loading…
Reference in New Issue
Block a user