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.9.2";
19 pyproject = true;
20
21 disabled = pythonOlder "3.5";
22
23 src = fetchPypi {
24 inherit pname version;
25 hash = "sha256-ZsXGzNQJe0hPh4L5pQeP7gUz1GXg2cr1lMkVfVQ4JVM=";
26 };
27
28 build-system = [ setuptools ];
29
30 pythonImportsCheck = [ "pyfakefs" ];
31
32 nativeCheckInputs = [
33 pandas
34 pytestCheckHook
35 ];
36
37 enabledTestPaths = [
38 "pyfakefs/tests"
39 ];
40
41 disabledTests = [
42 "test_expand_root"
43 ]
44 ++ (lib.optionals stdenv.hostPlatform.isDarwin [
45 # this test fails on darwin due to case-insensitive file system
46 "test_rename_dir_to_existing_dir"
47 ]);
48
49 meta = with lib; {
50 description = "Fake file system that mocks the Python file system modules";
51 homepage = "https://pyfakefs.org/";
52 changelog = "https://github.com/jmcgeheeiv/pyfakefs/blob/v${version}/CHANGES.md";
53 license = licenses.asl20;
54 maintainers = with maintainers; [ ];
55 };
56}