Skip to content
This repository was archived by the owner on Sep 18, 2021. It is now read-only.

Commit e7f1df1

Browse files
committed
feat: add pip dependencies to collection
1 parent 15f564f commit e7f1df1

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

commands/init/install_collection.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,17 @@ func installCollectionDependencies() error {
2929
)
3030
}
3131

32+
func installCollectionPipDependencies() error {
33+
collectionDir, err := ansible.GetStackHeadCollectionLocation()
34+
if err != nil {
35+
return err
36+
}
37+
return routines.Exec(
38+
"pip",
39+
"install", "-r", collectionDir+"/requirements/pip_requirements.txt",
40+
)
41+
}
42+
3243
func installInternalDependencies() error {
3344
return routines.ExecAnsiblePlaybook("setup-ansible", "", nil)
3445
}
@@ -57,6 +68,9 @@ func InstallCollection(version string) []routines.TaskOption {
5768
if err == nil {
5869
err = installCollectionDependencies()
5970
}
71+
if err == nil {
72+
err = installCollectionPipDependencies()
73+
}
6074
if err == nil {
6175
err = installInternalDependencies()
6276
}

0 commit comments

Comments
 (0)