Skip to content
Open
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Release History
===============
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 <path>``) 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)
Expand Down
2 changes: 1 addition & 1 deletion azdev/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# license information.
# -----------------------------------------------------------------------------

__VERSION__ = '0.2.11b2'
__VERSION__ = '0.2.11b3'
2 changes: 1 addition & 1 deletion azdev/operations/extensions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
10 changes: 9 additions & 1 deletion azdev/operations/extensions/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down