about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorJonathan Ringer <jonringer117@gmail.com>2020-10-06 01:22:51 -0700
committerJon <jonringer@users.noreply.github.com>2020-10-07 00:57:56 -0700
commit8a75ad4925b405d231a2425a567b12df6c6eaca3 (patch)
treee6004cb999c8100d779fe92dadfa03f3176534a9 /pkgs
parentb489e3b3acea30e73fd127379be8115feeef1765 (diff)
python3Packages.rarfile: 3.0 -> 4.0
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/rarfile/default.nix18
1 files changed, 9 insertions, 9 deletions
diff --git a/pkgs/development/python-modules/rarfile/default.nix b/pkgs/development/python-modules/rarfile/default.nix
index 024d043c471b8..6502d9f4ae6a6 100644
--- a/pkgs/development/python-modules/rarfile/default.nix
+++ b/pkgs/development/python-modules/rarfile/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildPythonPackage, fetchFromGitHub, pytest, nose, libarchive, glibcLocales
+{ stdenv, buildPythonPackage, fetchFromGitHub, pytestCheckHook, nose, libarchive, glibcLocales, isPy27
 # unrar is non-free software
 , useUnrar ? false, unrar
 }:
@@ -6,17 +6,19 @@
 assert useUnrar -> unrar != null;
 assert !useUnrar -> libarchive != null;
 
-buildPythonPackage {
+buildPythonPackage rec {
   pname = "rarfile";
-  version = "3.0";
+  version = "4.0";
+  disabled = isPy27;
 
   src = fetchFromGitHub {
     owner = "markokr";
     repo = "rarfile";
-    rev = "rarfile_3_0";
-    sha256 = "07yliz6p1bxzhipnrgz133gl8laic35gl4rqfay7f1vc384ch7sn";
+    rev = "v${version}";
+    sha256 = "0gpriqkvcb6bsccvq8b099xjv5fkjs0d7g4636d5jphy417jxk5m";
   };
-  buildInputs = [ pytest nose glibcLocales ];
+
+  checkInputs = [ pytestCheckHook nose glibcLocales ];
 
   prePatch = ''
     substituteInPlace rarfile.py \
@@ -31,9 +33,7 @@ buildPythonPackage {
   # the tests only work with the standard unrar package
   doCheck = useUnrar;
   LC_ALL = "en_US.UTF-8";
-  checkPhase = ''
-    py.test test -k "not test_printdir"
-  '';
+  pythonImportsCheck = [ "rarfile" ];
 
   meta = with stdenv.lib; {
     description = "RAR archive reader for Python";