comparison lib/python3.8/site-packages/wheel/cli/unpack.py @ 1:64071f2a4cf0 draft default tip

Deleted selected files
author guerler
date Mon, 27 Jul 2020 03:55:49 -0400
parents 9e54283cc701
children
comparison
equal deleted inserted replaced
0:9e54283cc701 1:64071f2a4cf0
1 from __future__ import print_function
2
3 import os.path
4 import sys
5
6 from ..wheelfile import WheelFile
7
8
9 def unpack(path, dest='.'):
10 """Unpack a wheel.
11
12 Wheel content will be unpacked to {dest}/{name}-{ver}, where {name}
13 is the package name and {ver} its version.
14
15 :param path: The path to the wheel.
16 :param dest: Destination directory (default to current directory).
17 """
18 with WheelFile(path) as wf:
19 namever = wf.parsed_filename.group('namever')
20 destination = os.path.join(dest, namever)
21 print("Unpacking to: {}...".format(destination), end='')
22 sys.stdout.flush()
23 wf.extractall(destination)
24
25 print('OK')