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