diff --git a/HISTORY.rst b/HISTORY.rst index 6edd147f..5b6b88d8 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,6 +2,14 @@ Release History =============== +0.2.12 +++++++ +* Editable installs (``azdev setup``, ``azdev extension add``, code generation) now pass ``--no-build-isolation`` so wheels build against the environment's pinned ``setuptools`` instead of an isolated PEP 517 build environment. This fixes editable-install failures introduced by the ``setuptools`` pinning. + +0.2.11b3 +++++++++ +* ``azdev extension update-index``/``publish``: Fix ``ValueError: Not a known wheel archive format`` when reading wheel metadata. The wheel is now downloaded with its ``.whl`` filename so ``pkginfo.Wheel`` can read it, and ``read_pkginfo`` falls back to a temporary ``.whl`` copy for any non-``.whl`` path. (#7740) + 0.2.11b2 ++++++++ * Quote paths when running editable installs (``pip install -e ``) and the pytest runner so that paths containing spaces (e.g. OneDrive folders) no longer break ``azdev extension add``, ``azdev setup``, code generation, and ``azdev test``. (#550, #415) diff --git a/azdev/__init__.py b/azdev/__init__.py index 4e073268..f637ad2d 100644 --- a/azdev/__init__.py +++ b/azdev/__init__.py @@ -4,4 +4,4 @@ # license information. # ----------------------------------------------------------------------------- -__VERSION__ = '0.2.11b2' +__VERSION__ = '0.2.12' diff --git a/azdev/operations/code_gen.py b/azdev/operations/code_gen.py index 9e54627d..0cebe3dc 100644 --- a/azdev/operations/code_gen.py +++ b/azdev/operations/code_gen.py @@ -18,7 +18,7 @@ logger = get_logger(__name__) -_PIP_EDITABLE_OPTS = "--config-settings editable_mode=compat" +_PIP_EDITABLE_OPTS = "--config-settings editable_mode=compat --no-build-isolation" _MODULE_ROOT_PATH = os.path.join('src', 'azure-cli', 'azure', 'cli', 'command_modules') diff --git a/azdev/operations/extensions/__init__.py b/azdev/operations/extensions/__init__.py index c8699ec8..0b4ac495 100644 --- a/azdev/operations/extensions/__init__.py +++ b/azdev/operations/extensions/__init__.py @@ -21,7 +21,7 @@ logger = get_logger(__name__) -_PIP_EDITABLE_OPTS = "--config-settings editable_mode=compat" +_PIP_EDITABLE_OPTS = "--config-settings editable_mode=compat --no-build-isolation" # These are the index files cleared by CommandIndex().invalidate() in azure-cli-core. # Refer: azure-cli-core/azure/cli/core/__init__.py @@ -288,7 +288,7 @@ def update_extension_index(extensions): ext_dir = tempfile.mkdtemp(dir=extensions_dir) whl_cache_dir = tempfile.mkdtemp() whl_cache = {} - ext_file = get_whl_from_url(ext_path, extension_name, whl_cache_dir, whl_cache) + ext_file = get_whl_from_url(ext_path, ext_path.split("/")[-1], whl_cache_dir, whl_cache) with open(index_path, 'r') as infile: curr_index = json.loads(infile.read()) diff --git a/azdev/operations/extensions/metadata.py b/azdev/operations/extensions/metadata.py index bfc9717f..d72914a5 100644 --- a/azdev/operations/extensions/metadata.py +++ b/azdev/operations/extensions/metadata.py @@ -66,7 +66,15 @@ def read_pkginfo(wheel_path: Path) -> Dict[str, Any]: """Read spec-defined wheel metadata via pkginfo.Wheel.""" import pkginfo - whl = pkginfo.Wheel(str(wheel_path)) + wheel_path = Path(str(wheel_path)) + target = wheel_path + if wheel_path.suffix != ".whl": + import shutil + import tempfile + target = Path(tempfile.mkdtemp()) / (wheel_path.name + ".whl") + shutil.copyfile(wheel_path, target) + + whl = pkginfo.Wheel(str(target)) return { "name": whl.name, "version": whl.version, diff --git a/azdev/operations/setup.py b/azdev/operations/setup.py index 5c5e4547..4a2254f6 100644 --- a/azdev/operations/setup.py +++ b/azdev/operations/setup.py @@ -21,7 +21,7 @@ logger = get_logger(__name__) -_PIP_EDITABLE_OPTS = "--config-settings editable_mode=compat" +_PIP_EDITABLE_OPTS = "--config-settings editable_mode=compat --no-build-isolation" def _check_path(path, file_name):