1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 fetchPypi,
6 pythonOlder,
7
8 # build-system
9 setuptools,
10
11 # tests
12 pandas,
13 pytestCheckHook,
14}:
15
16buildPythonPackage rec {
17 pname = "pyfakefs";
18 version = "5.8.0";
19 pyproject = true;
20
21 disabled = pythonOlder "3.5";
22
23 src = fetchPypi {
24 inherit pname version;
25 hash = "sha256-flRX7jzGcGnTzvbieCJ+z8gL+2HpJbwKTTsK8y0cmc4=";
26 };
27
28 build-system = [ setuptools ];
29
30 pythonImportsCheck = [ "pyfakefs" ];
31
32 nativeCheckInputs = [
33 pandas
34 pytestCheckHook
35 ];
36
37 pytestFlagsArray = [
38 "pyfakefs/tests"
39 ];
40
41 disabledTests =
42 [
43 "test_expand_root"
44 ]
45 ++ (lib.optionals stdenv.hostPlatform.isDarwin [
46 # this test fails on darwin due to case-insensitive file system
47 "test_rename_dir_to_existing_dir"
48 ]);
49
50 meta = with lib; {
51 description = "Fake file system that mocks the Python file system modules";
52 homepage = "https://pyfakefs.org/";
53 changelog = "https://github.com/jmcgeheeiv/pyfakefs/blob/v${version}/CHANGES.md";
54 license = licenses.asl20;
55 maintainers = with maintainers; [ ];
56 };
57}