Skip to content

Makes dev_setup.py script more portable #2062

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 28, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions scripts/dev_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
root_dir = os.path.abspath(os.path.join(os.path.abspath(__file__), '..', '..'))


def exec_command(command):
def pip_command(command):
try:
print('Executing: ' + command)
check_call(command.split(), cwd=root_dir)
check_call([sys.executable, '-m', 'pip'] + command.split(), cwd=root_dir)
print()
except CalledProcessError as err:
print(err, file=sys.stderr)
Expand All @@ -42,24 +42,24 @@ def exec_command(command):
print('Root directory \'{}\'\n'.format(root_dir))

# install general requirements
exec_command('pip install -r requirements.txt')
pip_command('install -r requirements.txt')

# install packages
for package_list in [nspkg_packages, content_packages]:
for package_name in package_list:
exec_command('pip install -e {}'.format(package_name))
pip_command('install -e {}'.format(package_name))

# install test requirements
exec_command('pip install -r azure-sdk-testutils/test-requirements.txt')
pip_command('install -r azure-sdk-testutils/test-requirements.txt')

# isntall packaging requirements
exec_command('pip install -r scripts/packaging_requirements.txt')
# install packaging requirements
pip_command('install -r scripts/packaging_requirements.txt')

# install storage for tests
exec_command('pip install azure-storage')
pip_command('install azure-storage')

# Ensure that the site package's azure/__init__.py has the old style namespace
# package declaration by installing the old namespace package
exec_command('pip install --force-reinstall azure-nspkg==1.0.0')
exec_command('pip install --force-reinstall azure-mgmt-nspkg==1.0.0')
pip_command('install --force-reinstall azure-nspkg==1.0.0')
pip_command('install --force-reinstall azure-mgmt-nspkg==1.0.0')
print('Finished dev setup.')