comparison lib/python3.8/site-packages/wheel/cli/unpack.py @ 0:9e54283cc701 draft

"planemo upload commit d12c32a45bcd441307e632fca6d9af7d60289d44"
author guerler
date Mon, 27 Jul 2020 03:47:31 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:9e54283cc701
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')