This commit is contained in:
Jean-Francois Dockes 2020-12-25 17:20:43 +01:00
parent 53edd7b213
commit ee1e84b2f3

View File

@ -24,12 +24,24 @@ import sys
import rclexecm
import os
# We can use two different unrar python modules. Either python-rarfile
# which is a wrapper over the the unrar command line, or python-unrar
# which is a ctypes wrapper of the unrar lib. Python-rarfile is the
# one commonly packaged on linux. Their interfaces is similar. Note
# that python-unrar uses forward slashes in internal file paths while
# python-rarfile uses backslashes (ipaths are opaque anyway).
# We can use two different unrar python modules. Either python3-rarfile
# which is a wrapper over the the unrar command line, or python3-unrar
# which is a ctypes wrapper of the unrar lib.
#
# Python3-rarfile is the one commonly packaged on linux.
#
# Python3-unrar needs the libunrar library, built from unrar source
# code (https://www.rarlab.com/rar_add.htm), which is not packaged on
# Debian or Fedora, probably because of licensing issues. It is
# packaged as libunrar5 on Ubuntu, and there are Fedora packages on
# RPM Fusion, and it's probably easy to build the Ubuntu package on
# Debian. Python-unrar works much better and is the right choice if
# the licensing is not an issue.
#
# The interfaces is similar, but python-unrar uses forward slashes
# in internal file paths while python-rarfile uses backslashes (ipaths
# are opaque anyway).
using_unrar = False
try:
from unrar import rarfile