Skip to content

Commit bd9076a

Browse files
authored
Revert PR #102. (#106)
1 parent 1e8e696 commit bd9076a

File tree

3 files changed

+36
-34
lines changed

3 files changed

+36
-34
lines changed

HISTORY.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
Release History
44
===============
55

6+
0.1.2
7+
++++++
8+
* `azdev setup`: Fix regression where azure.cli could not be run after installation.
9+
610
0.1.1
711
++++++
812
* `azdev cli/extension create`: Fix issue where supporting files were not included. Adjust generation logic.

azdev/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
# license information.
55
# -----------------------------------------------------------------------------
66

7-
__VERSION__ = '0.1.1'
7+
__VERSION__ = '0.1.2'

azdev/operations/setup.py

Lines changed: 31 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
import os
88
from shutil import copytree, rmtree
99
import time
10-
import sys
11-
import warnings
1210

1311
from knack.log import get_logger
1412
from knack.util import CLIError
@@ -73,37 +71,37 @@ def _install_cli(cli_path):
7371
)
7472
pip_cmd("install -q {}".format(whl_list), "Installing private whl files...")
7573

76-
src_path = '{}/src/'.format(cli_path)
77-
local_distributables = ' '.join(
78-
root
79-
for root, dirs, files in os.walk(src_path)
80-
if 'setup.py' in files)
81-
82-
python_major_version = sys.version_info[0]
83-
84-
if sys.platform.startswith('darwin'):
85-
requirements_file = "{}/src/azure-cli/requirements.py{}.Darwin.txt".format(cli_path, python_major_version)
86-
elif sys.platform.startswith('win32'):
87-
requirements_file = "{}/src/azure-cli/requirements.py{}.Windows.txt".format(cli_path, python_major_version)
88-
elif sys.platform.startswith('linux'):
89-
requirements_file = "{}/src/azure-cli/requirements.py{}.Linux.txt".format(cli_path, python_major_version)
90-
91-
if requirements_file:
92-
pip_cmd(
93-
"install -q --no-deps -e {}".format(local_distributables),
94-
"Installing packages found in this repository..."
95-
)
96-
97-
pip_cmd(
98-
"install -q -r {}".format(requirements_file),
99-
"Installing external dependencies...",
100-
)
101-
else:
102-
warnings.warn('platform {} does not have pinned dependencies, using latest compatible from PyPI.')
103-
pip_cmd(
104-
"install -q -e {}".format(local_distributables),
105-
"Installing all packages...",
106-
)
74+
# install general requirements
75+
pip_cmd(
76+
"install -q -r {}/requirements.txt".format(cli_path),
77+
"Installing `requirements.txt`..."
78+
)
79+
80+
# command modules have dependency on azure-cli-core so install this first
81+
pip_cmd(
82+
"install -q -e {}/src/azure-cli-nspkg".format(cli_path),
83+
"Installing `azure-cli-nspkg`..."
84+
)
85+
pip_cmd(
86+
"install -q -e {}/src/azure-cli-telemetry".format(cli_path),
87+
"Installing `azure-cli-telemetry`..."
88+
)
89+
pip_cmd(
90+
"install -q -e {}/src/azure-cli-core".format(cli_path),
91+
"Installing `azure-cli-core`..."
92+
)
93+
94+
# azure cli has dependencies on the above packages so install this one last
95+
pip_cmd("install -q -e {}/src/azure-cli".format(cli_path), "Installing `azure-cli`...")
96+
pip_cmd(
97+
"install -q -e {}/src/azure-cli-testsdk".format(cli_path),
98+
"Installing `azure-cli-testsdk`..."
99+
)
100+
101+
# Ensure that the site package's azure/__init__.py has the old style namespace
102+
# package declaration by installing the old namespace package
103+
pip_cmd("install -q -I azure-nspkg==1.0.0", "Installing `azure-nspkg`...")
104+
pip_cmd("install -q -I azure-mgmt-nspkg==1.0.0", "Installing `azure-mgmt-nspkg`...")
107105

108106

109107
def _copy_config_files():

0 commit comments

Comments
 (0)