Skip to content

Commit d19a43a

Browse files
dwighthubbardDwight Hubbard
andauthored
Installdeps pip3 use base python (#103)
* Make validate_style actually use the directories for the packages from the package metadata. * Make validate_style actually use the directories for the packages from the package metadata. * Make validate_style actually use the directories for the packages from the package metadata. * Fix test since the interpreter can have the version at the end * Default the pip3 dependencies installer to installing for the BASE_PYTHON interpreter by default instead of the first python3 interpreter found in the path. Co-authored-by: Dwight Hubbard <dhubbard@verizonmedia.com>
1 parent 831e5df commit d19a43a

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

  • src/screwdrivercd/installdeps/installers

src/screwdrivercd/installdeps/installers/pip3.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Licensed under the terms of the Apache 2.0 license. See the LICENSE file in the project root for terms
33
"""Install pip dependencies"""
44
import logging
5+
import os
56
from typing import Optional, List
67

78
from ..installer import Installer
@@ -29,3 +30,13 @@ class PipInstaller(Installer):
2930
# Ubuntu/Fedora
3031
'/usr/bin'
3132
]
33+
34+
def find_install_command(self):
35+
"""
36+
Find the install command binary to use and update the install command
37+
"""
38+
base_python = os.environ.get('BASE_PYTHON', '')
39+
if base_python and os.path.exists(base_python):
40+
self.install_command = [base_python, '-m', 'pip', 'install']
41+
return
42+
super().find_install_command()

0 commit comments

Comments
 (0)