1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 requests,
7}:
8
9buildPythonPackage rec {
10 pname = "pyosf";
11 version = "1.0.5";
12 format = "setuptools";
13
14 disabled = pythonOlder "3.7";
15
16 src = fetchFromGitHub {
17 owner = "psychopy";
18 repo = pname;
19 rev = "refs/tags/v${version}";
20 hash = "sha256-Yhb6HSnLdFzWouse/RKZ8SIbMia/hhD8TAovdqmvd7o=";
21 };
22
23 postPatch = ''
24 substituteInPlace setup.py \
25 --replace "'pytest-runner', " ""
26 '';
27
28 preBuild = "export HOME=$TMP";
29
30 propagatedBuildInputs = [ requests ];
31
32 # Tests require network access
33 doCheck = false;
34
35 pythonImportsCheck = [ "pyosf" ];
36
37 meta = with lib; {
38 description = "Pure Python library for simple sync with Open Science Framework";
39 homepage = "https://github.com/psychopy/pyosf";
40 changelog = "https://github.com/psychopy/pyosf/releases/tag/v${version}";
41 license = licenses.mit;
42 maintainers = with maintainers; [ bcdarwin ];
43 };
44}