Skip to content

Commit

Permalink
url: prefer Python extractors on win32
Browse files Browse the repository at this point in the history
On native Windows it is not always the case that the tar and/or unzip
commands are available. Make everybody's life easier by using the Python
libraries. There were also cases where non-working binaries were
installed in the system.

Fixes #496.
  • Loading branch information
jkloetzke committed Jun 21, 2023
1 parent 4da282a commit 48651e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pym/bob/scm/url.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ class UrlScm(Scm):
# different file modes!). But it shouldn't make a difference on Windows.
EXTRACTORS = {
"tar" : [
(True, "tar", ["-x", "--no-same-owner", "--no-same-permissions", "-f", "{}"], "--strip-components={}"),
(isWin32, "python", ["-m", "tarfile", "-e", "{}"], None),
(True, "tar", ["-x", "--no-same-owner", "--no-same-permissions", "-f", "{}"], "--strip-components={}"),
],
"gzip" : [
(True, "gunzip", ["-kf", "{}"], None),
Expand All @@ -172,8 +172,8 @@ class UrlScm(Scm):
(True, "7z", ["x", "-y", "{}"], None),
],
"zip" : [
(True, "unzip", ["-o", "{}"], None),
(isWin32, "python", ["-m", "zipfile", "-e", "{}", "."], None),
(True, "unzip", ["-o", "{}"], None),
],
}

Expand Down

0 comments on commit 48651e9

Please sign in to comment.