Skip to content

Commit d864b5e

Browse files
authored
Merge pull request #226 from lkollar/fix-wheel
Fix obsolete wheel usage in addtag
2 parents ea1e0f0 + 02ba626 commit d864b5e

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

auditwheel/main_addtag.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ def configure_parser(sub_parsers):
2222

2323
def execute(args, p):
2424
import os
25-
from wheel.install import WHEEL_INFO_RE # type: ignore
25+
from wheel.wheelfile import WHEEL_INFO_RE # type: ignore
2626
from .wheeltools import InWheelCtx, add_platforms, WheelToolsError
2727
from .wheel_abi import analyze_wheel_abi
2828

2929
wheel_abi = analyze_wheel_abi(args.WHEEL_FILE)
3030

31-
parsed_fname = WHEEL_INFO_RE(basename(args.WHEEL_FILE))
31+
parsed_fname = WHEEL_INFO_RE.search(basename(args.WHEEL_FILE))
3232
in_fname_tags = parsed_fname.groupdict()['plat'].split('.')
3333

3434
logger.info('%s receives the following tag: "%s".',

tests/integration/test_addtag.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from unittest.mock import Mock
2+
from pathlib import Path
3+
4+
from auditwheel.main_addtag import execute
5+
6+
HERE = Path(__file__).parent.resolve()
7+
8+
def test_smoke(tmpdir):
9+
"""Simple test to exercise the 'addtag' code path"""
10+
args = Mock(WHEEL_FILE=str(HERE / "cffi-1.5.0-cp27-none-linux_x86_64.whl"),
11+
WHEEL_DIR=str(tmpdir / "wheelhouse/"))
12+
execute(args, None)

0 commit comments

Comments
 (0)