Fix 7z unpacking when only p7zip with /usr/bin/7zr is installed.

This commit is contained in:
Bastian Kleineidam 2016-01-09 20:25:26 +01:00
parent bd91cce07e
commit 1d121c4c79
5 changed files with 63 additions and 5 deletions

View File

@ -1,3 +1,8 @@
1.11 (released xx.xx.216)
* Fix 7z unpacking when only p7zip with /usr/bin/7zr is installed.
1.10 (released 10.12.2015) 1.10 (released 10.12.2015)
* Added support for VHD (Virtual Hard Disk) archives with 7z. * Added support for VHD (Virtual Hard Disk) archives with 7z.

View File

@ -196,7 +196,7 @@ ArchivePrograms = {
'create': ('compress',), 'create': ('compress',),
}, },
'7z': { '7z': {
None: ('7z', '7za'), None: ('7z', '7za', '7zr'),
}, },
'rar': { 'rar': {
None: ('rar',), None: ('rar',),
@ -277,6 +277,7 @@ ArchivePrograms = {
ProgramModules = { ProgramModules = {
'7z': 'p7zip', '7z': 'p7zip',
'7za': 'p7azip', '7za': 'p7azip',
'7zr': 'p7rzip',
'uncompress.real': 'uncompress', 'uncompress.real': 'uncompress',
'dpkg-deb': 'dpkg', 'dpkg-deb': 'dpkg',
'extract_chmlib': 'chmlib', 'extract_chmlib': 'chmlib',

View File

@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
# Copyright (C) 2016 Bastian Kleineidam
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""Archive commands for the 7zr program.
7zr is a light executable supporting only the 7z archive format.
"""
from .p7zip import \
extract_7z, \
list_7z, \
test_7z, \
create_7z

View File

@ -23,9 +23,6 @@ if not hasattr(sys, "version_info") or sys.version_info < (2, 7, 0, "final", 0):
raise SystemExit("This program requires Python 2.7 or later.") raise SystemExit("This program requires Python 2.7 or later.")
import os import os
import re import re
import shutil
import glob
import subprocess
from setuptools import setup from setuptools import setup
from distutils.core import Distribution from distutils.core import Distribution
from distutils.command.install_lib import install_lib from distutils.command.install_lib import install_lib
@ -33,7 +30,7 @@ from distutils import util
from distutils.file_util import write_file from distutils.file_util import write_file
AppName = "patool" AppName = "patool"
AppVersion = "1.10" AppVersion = "1.11"
MyName = "Bastian Kleineidam" MyName = "Bastian Kleineidam"
MyEmail = "bastian.kleineidam@web.de" MyEmail = "bastian.kleineidam@web.de"

View File

@ -0,0 +1,30 @@
# -*- coding: utf-8 -*-
# Copyright (C) 2010-2015 Bastian Kleineidam
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from . import ArchiveTest
from .. import needs_program
class Test7zr (ArchiveTest):
program = '7zr'
@needs_program(program)
def test_7zr (self):
self.archive_commands('t .7z')
@needs_program('file')
@needs_program(program)
def test_7z_file (self):
self.archive_commands('t.7z.foo', skip_create=True)