python3Packages.rarfile: 3.0 -> 4.0
This commit is contained in:
parent
b489e3b3ac
commit
8a75ad4925
|
@ -1,4 +1,4 @@
|
||||||
{ stdenv, buildPythonPackage, fetchFromGitHub, pytest, nose, libarchive, glibcLocales
|
{ stdenv, buildPythonPackage, fetchFromGitHub, pytestCheckHook, nose, libarchive, glibcLocales, isPy27
|
||||||
# unrar is non-free software
|
# unrar is non-free software
|
||||||
, useUnrar ? false, unrar
|
, useUnrar ? false, unrar
|
||||||
}:
|
}:
|
||||||
|
@ -6,17 +6,19 @@
|
||||||
assert useUnrar -> unrar != null;
|
assert useUnrar -> unrar != null;
|
||||||
assert !useUnrar -> libarchive != null;
|
assert !useUnrar -> libarchive != null;
|
||||||
|
|
||||||
buildPythonPackage {
|
buildPythonPackage rec {
|
||||||
pname = "rarfile";
|
pname = "rarfile";
|
||||||
version = "3.0";
|
version = "4.0";
|
||||||
|
disabled = isPy27;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "markokr";
|
owner = "markokr";
|
||||||
repo = "rarfile";
|
repo = "rarfile";
|
||||||
rev = "rarfile_3_0";
|
rev = "v${version}";
|
||||||
sha256 = "07yliz6p1bxzhipnrgz133gl8laic35gl4rqfay7f1vc384ch7sn";
|
sha256 = "0gpriqkvcb6bsccvq8b099xjv5fkjs0d7g4636d5jphy417jxk5m";
|
||||||
};
|
};
|
||||||
buildInputs = [ pytest nose glibcLocales ];
|
|
||||||
|
checkInputs = [ pytestCheckHook nose glibcLocales ];
|
||||||
|
|
||||||
prePatch = ''
|
prePatch = ''
|
||||||
substituteInPlace rarfile.py \
|
substituteInPlace rarfile.py \
|
||||||
|
@ -31,9 +33,7 @@ buildPythonPackage {
|
||||||
# the tests only work with the standard unrar package
|
# the tests only work with the standard unrar package
|
||||||
doCheck = useUnrar;
|
doCheck = useUnrar;
|
||||||
LC_ALL = "en_US.UTF-8";
|
LC_ALL = "en_US.UTF-8";
|
||||||
checkPhase = ''
|
pythonImportsCheck = [ "rarfile" ];
|
||||||
py.test test -k "not test_printdir"
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "RAR archive reader for Python";
|
description = "RAR archive reader for Python";
|
||||||
|
|
Loading…
Reference in a new issue