|
|
|
@ -1,14 +1,26 @@ |
|
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, cython, zlib, pandas, readstat }: |
|
|
|
|
{ lib |
|
|
|
|
, buildPythonPackage |
|
|
|
|
, cython |
|
|
|
|
, fetchFromGitHub |
|
|
|
|
, pandas |
|
|
|
|
, python |
|
|
|
|
, pythonOlder |
|
|
|
|
, readstat |
|
|
|
|
, zlib |
|
|
|
|
}: |
|
|
|
|
|
|
|
|
|
buildPythonPackage rec { |
|
|
|
|
pname = "pyreadstat"; |
|
|
|
|
version = "1.1.9"; |
|
|
|
|
format = "setuptools"; |
|
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7"; |
|
|
|
|
|
|
|
|
|
src = fetchFromGitHub { |
|
|
|
|
owner = "Roche"; |
|
|
|
|
repo = "pyreadstat"; |
|
|
|
|
rev = "v${version}"; |
|
|
|
|
sha256 = "16aa16ybh3ikmlxsg8zm19x9k6r4gpd0sxqagv318w76jjyw1nrs"; |
|
|
|
|
hash = "sha256-OtvAvZTmcBTGfgp3Ddp9JJuZegr1o6c7rTMOuLwJSpk="; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
nativeBuildInputs = [ |
|
|
|
@ -24,11 +36,26 @@ buildPythonPackage rec { |
|
|
|
|
pandas |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
meta = { |
|
|
|
|
homepage = "https://github.com/Roche/pyreadstat"; |
|
|
|
|
pythonImportsCheck = [ |
|
|
|
|
"pyreadstat" |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
preCheck = '' |
|
|
|
|
export HOME=$(mktemp -d); |
|
|
|
|
''; |
|
|
|
|
|
|
|
|
|
checkPhase = '' |
|
|
|
|
runHook preCheck |
|
|
|
|
|
|
|
|
|
${python.interpreter} tests/test_basic.py |
|
|
|
|
|
|
|
|
|
runHook postCheck |
|
|
|
|
''; |
|
|
|
|
|
|
|
|
|
meta = with lib; { |
|
|
|
|
description = "Python package to read SAS, SPSS and Stata files into pandas data frames using the readstat C library"; |
|
|
|
|
license = lib.licenses.asl20; |
|
|
|
|
maintainers = with lib.maintainers; [ swflint ]; |
|
|
|
|
homepage = "https://github.com/Roche/pyreadstat"; |
|
|
|
|
license = licenses.asl20; |
|
|
|
|
maintainers = with maintainers; [ swflint ]; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|