15
15
root_dir = os .path .abspath (os .path .join (os .path .abspath (__file__ ), '..' , '..' ))
16
16
17
17
18
- def exec_command (command ):
18
+ def pip_command (command ):
19
19
try :
20
20
print ('Executing: ' + command )
21
- check_call (command .split (), cwd = root_dir )
21
+ check_call ([ sys . executable , '-m' , 'pip' ] + command .split (), cwd = root_dir )
22
22
print ()
23
23
except CalledProcessError as err :
24
24
print (err , file = sys .stderr )
@@ -42,24 +42,24 @@ def exec_command(command):
42
42
print ('Root directory \' {}\' \n ' .format (root_dir ))
43
43
44
44
# install general requirements
45
- exec_command ( 'pip install -r requirements.txt' )
45
+ pip_command ( ' install -r requirements.txt' )
46
46
47
47
# install packages
48
48
for package_list in [nspkg_packages , content_packages ]:
49
49
for package_name in package_list :
50
- exec_command ( 'pip install -e {}' .format (package_name ))
50
+ pip_command ( ' install -e {}' .format (package_name ))
51
51
52
52
# install test requirements
53
- exec_command ( 'pip install -r azure-sdk-testutils/test-requirements.txt' )
53
+ pip_command ( ' install -r azure-sdk-testutils/test-requirements.txt' )
54
54
55
- # isntall packaging requirements
56
- exec_command ( 'pip install -r scripts/packaging_requirements.txt' )
55
+ # install packaging requirements
56
+ pip_command ( ' install -r scripts/packaging_requirements.txt' )
57
57
58
58
# install storage for tests
59
- exec_command ( 'pip install azure-storage' )
59
+ pip_command ( ' install azure-storage' )
60
60
61
61
# Ensure that the site package's azure/__init__.py has the old style namespace
62
62
# package declaration by installing the old namespace package
63
- exec_command ( 'pip install --force-reinstall azure-nspkg==1.0.0' )
64
- exec_command ( 'pip install --force-reinstall azure-mgmt-nspkg==1.0.0' )
63
+ pip_command ( ' install --force-reinstall azure-nspkg==1.0.0' )
64
+ pip_command ( ' install --force-reinstall azure-mgmt-nspkg==1.0.0' )
65
65
print ('Finished dev setup.' )
0 commit comments