activate venv in termials
This commit is contained in:
parent
a78512c8de
commit
8ef505fb47
3 changed files with 7 additions and 6 deletions
|
@ -107,7 +107,7 @@ fun Prov.provisionWorkplace(
|
||||||
|
|
||||||
installDevOps()
|
installDevOps()
|
||||||
|
|
||||||
installPython()
|
provisionPython()
|
||||||
}
|
}
|
||||||
ProvResult(true)
|
ProvResult(true)
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,9 +5,9 @@ import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
||||||
import org.domaindrivenarchitecture.provs.framework.ubuntu.install.base.aptInstall
|
import org.domaindrivenarchitecture.provs.framework.ubuntu.install.base.aptInstall
|
||||||
|
|
||||||
|
|
||||||
fun Prov.installPython() = task {
|
fun Prov.provisionPython() = task {
|
||||||
installPython3()
|
installPython3()
|
||||||
installVenv()
|
configureVenv()
|
||||||
installPybuilder()
|
installPybuilder()
|
||||||
installRestClient()
|
installRestClient()
|
||||||
installJupyterlab()
|
installJupyterlab()
|
||||||
|
@ -17,10 +17,11 @@ fun Prov.installPython3(): ProvResult = task {
|
||||||
aptInstall("python3.8-venv python3-pip")
|
aptInstall("python3.8-venv python3-pip")
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Prov.installVenv(): ProvResult = task {
|
fun Prov.configureVenv(): ProvResult = task {
|
||||||
val venvHome = "~/.python/meissa"
|
val venvHome = "~/.venv/meissa"
|
||||||
cmd("python3 -m venv " + venvHome)
|
cmd("python3 -m venv " + venvHome)
|
||||||
cmd("source " + venvHome + "/bin/activate")
|
cmd("source " + venvHome + "/bin/activate")
|
||||||
|
cmd("ln -s " + venvHome + "/bin/activate ~/.bashrc.d/venv.sh")
|
||||||
cmd("pip3 install pip --upgrade")
|
cmd("pip3 install pip --upgrade")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ internal class PythonKtTest {
|
||||||
@ExtensiveContainerTest
|
@ExtensiveContainerTest
|
||||||
fun installPython() {
|
fun installPython() {
|
||||||
// when
|
// when
|
||||||
val res = defaultTestContainer().installPython()
|
val res = defaultTestContainer().provisionPython()
|
||||||
|
|
||||||
// then
|
// then
|
||||||
assertTrue(res.success)
|
assertTrue(res.success)
|
||||||
|
|
Loading…
Reference in a new issue