Azure / Azure/azure-cli-dev-tools

azdev test fails when az-cli is installed through pypi

Offen
#268 1 Kommentar 1 Reaktion 2 zugewiesene Personen Beansprucht von @kairu-ms Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
91
Forks
134
Ø Merge
2 Std. 51 Min.
Gemergte PRs (30 T.)
1

Beschreibung

Here I am not specifying -c to azdev setup so it comes from py pi
```
python3 -m venv azdev2
2044 source azdev2/bin/activateive
2045 pip install azdev
2046 azdev setup azdev setup -r azure-cli-extensions -e aks-preview
2047 azdev setup -r azure-cli-extensions -e aks-preview
2048 azdev test --profile foo --discover --live aks-preview
```
I get this.

No module named 'azure.cli.core'
Traceback (most recent call last):
File "/home/pmiller/azdev2/lib/python3.8/site-packages/knack/cli.py", line 215, in invoke
cmd_result = self.invocation.execute(args)
File "/home/pmiller/azdev2/lib/python3.8/site-packages/knack/invocation.py", line 225, in execute
cmd_result = parsed_args.func(params)
File "/home/pmiller/azdev2/lib/python3.8/site-packages/knack/commands.py", line 148, in __call__
return self.handler(*args, **kwargs)
File "/home/pmiller/azdev2/lib/python3.8/site-packages/knack/commands.py", line 255, in _command_handler
result = op(client, **command_args) if client else op(**command_args)
File "/home/pmiller/azdev2/lib/python3.8/site-packages/azdev/operations/testtool/__init__.py", line 46, in run_tests
path_table = get_path_table()
File "/home/pmiller/azdev2/lib/python3.8/site-packages/azdev/utilities/path.py", line 193, in get_path_table
from azure.cli.core.extension import EXTENSIONS_DIR # pylint: disable=import-error
ModuleNotFoundError: No module named 'azure.cli.core'

If I give it a local repo with
azdev setup -c ./azure-cli -r ./azure-cli-extensions -e aks-preview

Then I get
No module named 'pkginfo'
Traceback (most recent call last):
File "/home/pmiller/azdev2/lib/python3.8/site-packages/knack/cli.py", line 215, in invoke
cmd_result = self.invocation.execute(args)
File "/home/pmiller/azdev2/lib/python3.8/site-packages/knack/invocation.py", line 225, in execute
cmd_result = parsed_args.func(params)
File "/home/pmiller/azdev2/lib/python3.8/site-packages/knack/commands.py", line 148, in __call__
return self.handler(*args, **kwargs)
File "/home/pmiller/azdev2/lib/python3.8/site-packages/knack/commands.py", line 255, in _command_handler
result = op(client, **command_args) if client else op(**command_args)
File "/home/pmiller/azdev2/lib/python3.8/site-packages/azdev/operations/testtool/__init__.py", line 46, in run_tests
path_table = get_path_table()
File "/home/pmiller/azdev2/lib/python3.8/site-packages/azdev/utilities/path.py", line 193, in get_path_table
from azure.cli.core.extension import EXTENSIONS_DIR # pylint: disable=import-error
File "/home/pmiller/azure-cli/src/azure-cli-core/azure/cli/core/extension/__init__.py", line 13, in
import pkginfo

And if i pip install pkginfo I ge a little further to errors that might be related to my pacakge

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.