2020-12-03 08:41:04 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2023-07-15 17:15:38 +00:00
|
|
|
, pythonOlder
|
2020-12-03 08:41:04 +00:00
|
|
|
, requests
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyosf";
|
|
|
|
version = "1.0.5";
|
2023-07-15 17:15:38 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-12-03 08:41:04 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "psychopy";
|
|
|
|
repo = pname;
|
2023-07-15 17:15:38 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-Yhb6HSnLdFzWouse/RKZ8SIbMia/hhD8TAovdqmvd7o=";
|
2020-12-03 08:41:04 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "'pytest-runner', " ""
|
|
|
|
'';
|
|
|
|
|
2020-12-03 08:41:04 +00:00
|
|
|
preBuild = "export HOME=$TMP";
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
|
|
|
# Tests require network access
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"pyosf"
|
|
|
|
];
|
2020-12-03 08:41:04 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Pure Python library for simple sync with Open Science Framework";
|
2023-07-15 17:15:38 +00:00
|
|
|
homepage = "https://github.com/psychopy/pyosf";
|
|
|
|
changelog = "https://github.com/psychopy/pyosf/releases/tag/v${version}";
|
2020-12-03 08:41:04 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ bcdarwin ];
|
|
|
|
};
|
|
|
|
}
|