summaryrefslogtreecommitdiff
path: root/archivers/py-rarfile
diff options
context:
space:
mode:
authoradam <adam@pkgsrc.org>2022-10-14 11:48:48 +0000
committeradam <adam@pkgsrc.org>2022-10-14 11:48:48 +0000
commitd520bcdbc4ce6bc7b9e2f3a6e6b9b330246919a7 (patch)
treee0615ce7e3798a5f5a6f66fc23e684db63146a9c /archivers/py-rarfile
parent44aa73adb118a81bbfd7a6ecb66b6fe75d4e9947 (diff)
downloadpkgsrc-d520bcdbc4ce6bc7b9e2f3a6e6b9b330246919a7.tar.gz
py-rarfile: updated to 4.0
rarfile v4.0 Main goals are: Increased zipfile-compatibility, thus also achieving smaller difference between RAR3 and RAR5 archives. Implement RarFile.extract on top of RarFile.open instead using unrar x directly, thus making maintenance of alternative backends more manageable. Negative aspect of that is that there are features that internal extract code does not support - hard links, NTFS streams and junctions. Breaking changes: Directory names will have "/" appended. RarFile.extract operates only on single entry, so when used on directory it will create directory but not extract files under it. RarFile.extract/RarFile.extractall/RarFile.testrar will not launch special unrar command line, instead they are implemented on top of RarFile.open. Keyword args in top-level APIs were renamed to match zipfile: RarFile(rarfile) -> RarFile(file) RarFile.setpassword(password) -> .setpassword(pwd) RarFile.getinfo(fname) -> .getinfo(name) RarFile.open(fname, mode, psw) -> .open(name, mode, pwd) RarFile.read(fname, psw) -> .read(name, pwd) PATH_SEP cannot be changed from "/". New features: RarFile.extract will return final sanitized filename for target file. RarInfo.is_dir is now preferred spelling of isdir(). Old method kept as alias. New RarInfo.is_file and RarInfo.is_symlink methods. Only one of ~RarInfo.is_file, ~RarInfo.is_dir or ~RarInfo.is_symlink can be True. RarFile.printdir has file argument for output. RarFile.__iter__ loops over RarInfo entries. RAR3: throw NeedFirstVolume exception with current volume number, like RAR5 does. Nanosecond timestamp support. Visible as nsdatetime instance. Minimal CLI when run as script: python3 -m rarfile Skip old file versions in versioned archive. Cleanups: Use PBKDF2 implementation from hashlib. Improve test coverage.
Diffstat (limited to 'archivers/py-rarfile')
-rw-r--r--archivers/py-rarfile/Makefile7
-rw-r--r--archivers/py-rarfile/distinfo8
2 files changed, 8 insertions, 7 deletions
diff --git a/archivers/py-rarfile/Makefile b/archivers/py-rarfile/Makefile
index 1fdac255d79..d7f9cb099eb 100644
--- a/archivers/py-rarfile/Makefile
+++ b/archivers/py-rarfile/Makefile
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.4 2022/01/04 20:52:31 wiz Exp $
+# $NetBSD: Makefile,v 1.5 2022/10/14 11:48:48 adam Exp $
-DISTNAME= rarfile-3.3
+DISTNAME= rarfile-4.0
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
-PKGREVISION= 1
CATEGORIES= archivers python
MASTER_SITES= ${MASTER_SITE_PYPI:=r/rarfile/}
@@ -15,5 +14,7 @@ DEPENDS+= bsdtar-[0-9]*:../../archivers/bsdtar
USE_LANGUAGES= # none
+PYTHON_VERSIONS_INCOMPATIBLE= 27
+
.include "../../lang/python/egg.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/archivers/py-rarfile/distinfo b/archivers/py-rarfile/distinfo
index d76a03dae61..80579fa42ba 100644
--- a/archivers/py-rarfile/distinfo
+++ b/archivers/py-rarfile/distinfo
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.5 2021/10/26 09:57:14 nia Exp $
+$NetBSD: distinfo,v 1.6 2022/10/14 11:48:48 adam Exp $
-BLAKE2s (rarfile-3.3.tar.gz) = b3fa891037a2c1e3b26b57ee223f689ee0293be5a31b71b37ed6b980f9c22f84
-SHA512 (rarfile-3.3.tar.gz) = 6c66efae84d960bdda09e4d379744ebca7f5e280dcdc287183e22e7e633bbfd9b25f0672910e0ae80f4434b336aee6aa1036325786cbf82639bcff11ee34a02d
-Size (rarfile-3.3.tar.gz) = 135373 bytes
+BLAKE2s (rarfile-4.0.tar.gz) = 731fe846cf39764dbe058353d9bb5e346cdc241f5c003beb370726de59826acb
+SHA512 (rarfile-4.0.tar.gz) = 05e15acd749564288d4f069970ac196344c33fd2710e918b84afe4c388aa364a17c63f86577037524336e3a022f6db2c8619f9b526f89e00753a8ab0d89263d4
+Size (rarfile-4.0.tar.gz) = 148026 bytes