blob: 3a2e44cd937a7dd94b57df0d7dac8329413b15ef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
{
lib,
buildPythonPackage,
cython,
fetchFromGitHub,
narwhals,
pandas,
python,
readstat,
setuptools,
zlib,
}:
buildPythonPackage rec {
pname = "pyreadstat";
version = "1.3.2";
pyproject = true;
src = fetchFromGitHub {
owner = "Roche";
repo = "pyreadstat";
tag = "v${version}";
hash = "sha256-JDs5SxiqSZHVOJTPezq5oIT+Xgp6tz2BytoQ6jb/ZwU=";
};
build-system = [
cython
setuptools
];
buildInputs = [ zlib ];
dependencies = [
narwhals
readstat
pandas
];
pythonImportsCheck = [ "pyreadstat" ];
preCheck = ''
export HOME=$(mktemp -d);
'';
checkPhase = ''
runHook preCheck
${python.interpreter} tests/test_basic.py
runHook postCheck
'';
meta = {
description = "Module to read SAS, SPSS and Stata files into pandas data frames";
homepage = "https://github.com/Roche/pyreadstat";
changelog = "https://github.com/Roche/pyreadstat/blob/${src.tag}/change_log.md";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ swflint ];
};
}
|