1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pythonOlder
5, requests
6}:
7
8buildPythonPackage rec {
9 pname = "pyosf";
10 version = "1.0.5";
11 format = "setuptools";
12
13 disabled = pythonOlder "3.7";
14
15 src = fetchFromGitHub {
16 owner = "psychopy";
17 repo = pname;
18 rev = "refs/tags/v${version}";
19 hash = "sha256-Yhb6HSnLdFzWouse/RKZ8SIbMia/hhD8TAovdqmvd7o=";
20 };
21
22 postPatch = ''
23 substituteInPlace setup.py \
24 --replace "'pytest-runner', " ""
25 '';
26
27 preBuild = "export HOME=$TMP";
28
29 propagatedBuildInputs = [
30 requests
31 ];
32
33 # Tests require network access
34 doCheck = false;
35
36 pythonImportsCheck = [
37 "pyosf"
38 ];
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}