2017-12-05 19:21:57 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, six
|
|
|
|
, pythonOlder
|
|
|
|
, scandir
|
|
|
|
, glibcLocales
|
2017-12-30 11:25:11 +00:00
|
|
|
, mock
|
2017-12-05 19:21:57 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
if !(pythonOlder "3.4") then null else buildPythonPackage rec {
|
|
|
|
pname = "pathlib2";
|
2017-12-30 11:25:11 +00:00
|
|
|
version = "2.3.0";
|
2017-12-05 19:21:57 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2017-12-30 11:25:11 +00:00
|
|
|
sha256 = "d32550b75a818b289bd4c1f96b60c89957811da205afcceab75bc8b4857ea5b3";
|
2017-12-05 19:21:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ six ] ++ lib.optional (pythonOlder "3.5") scandir;
|
2017-12-30 11:25:11 +00:00
|
|
|
checkInputs = [ glibcLocales ] ++ lib.optional (pythonOlder "3.3") mock;
|
2017-12-05 19:21:57 +00:00
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export LC_ALL="en_US.UTF-8"
|
2018-02-26 11:46:29 +00:00
|
|
|
sed -i test_pathlib2.py -e "s@hasattr(pwd, 'getpwall')@False@"
|
2017-12-05 19:21:57 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "This module offers classes representing filesystem paths with semantics appropriate for different operating systems.";
|
|
|
|
homepage = https://pypi.python.org/pypi/pathlib2/;
|
|
|
|
license = with lib.licenses; [ mit ];
|
|
|
|
};
|
2018-02-26 11:46:29 +00:00
|
|
|
}
|