mirror of https://github.com/amol-/dukpy.git
Support packages that don't contain package directory
This commit is contained in:
parent
364952b154
commit
da8cefb4fb
|
@ -78,8 +78,9 @@ def install_jspackage(package_name, version, modulesdir):
|
|||
tmpdir = tempfile.mkdtemp()
|
||||
try:
|
||||
tb.extractall(tmpdir)
|
||||
dirname = os.listdir(tmpdir)[0]
|
||||
shutil.rmtree(os.path.abspath(dest), ignore_errors=True)
|
||||
shutil.move(os.path.join(tmpdir, 'package'),
|
||||
shutil.move(os.path.join(tmpdir, dirname),
|
||||
os.path.abspath(dest))
|
||||
finally:
|
||||
shutil.rmtree(tmpdir)
|
||||
|
|
Loading…
Reference in New Issue