Merge pull request #25486 from apeschar/master

pythonPackages.PyLD: init at 0.7.2

authored by Frederik Rietdijk and committed by GitHub 6eff61d6 d53540dd

+59
+1
lib/maintainers.nix
··· 43 andsild = "Anders Sildnes <andsild@gmail.com>"; 44 aneeshusa = "Aneesh Agrawal <aneeshusa@gmail.com>"; 45 antono = "Antono Vasiljev <self@antono.info>"; 46 apeyroux = "Alexandre Peyroux <alex@px.io>"; 47 ardumont = "Antoine R. Dumont <eniotna.t@gmail.com>"; 48 aristid = "Aristid Breitkreuz <aristidb@gmail.com>";
··· 43 andsild = "Anders Sildnes <andsild@gmail.com>"; 44 aneeshusa = "Aneesh Agrawal <aneeshusa@gmail.com>"; 45 antono = "Antono Vasiljev <self@antono.info>"; 46 + apeschar = "Albert Peschar <albert@peschar.net>"; 47 apeyroux = "Alexandre Peyroux <alex@px.io>"; 48 ardumont = "Antoine R. Dumont <eniotna.t@gmail.com>"; 49 aristid = "Aristid Breitkreuz <aristidb@gmail.com>";
+56
pkgs/development/python-modules/PyLD/default.nix
···
··· 1 + { stdenv, fetchPypi, buildPythonPackage, fetchFromGitHub, python, gnugrep }: 2 + 3 + let 4 + 5 + json-ld = fetchFromGitHub { 6 + owner = "json-ld"; 7 + repo = "json-ld.org"; 8 + rev = "843a70e4523d7cd2a4d3f5325586e726eb1b123f"; 9 + sha256 = "05j0nq6vafclyypxjj30iw898ig0m32nvz0rjdlslx6lawkiwb2a"; 10 + }; 11 + 12 + normalization = fetchFromGitHub { 13 + owner = "json-ld"; 14 + repo = "normalization"; 15 + rev = "aceeaf224b64d6880189d795bd99c3ffadb5d79e"; 16 + sha256 = "125q5rllfm8vg9mz8hn7bhvhv2vqpd86kx2kxlk84smh33l8kbyl"; 17 + }; 18 + 19 + in 20 + 21 + buildPythonPackage rec { 22 + pname = "PyLD"; 23 + version = "0.7.2"; 24 + name = "${pname}-${version}"; 25 + 26 + src = fetchFromGitHub { 27 + owner = "digitalbazaar"; 28 + repo = "pyld"; 29 + rev = "652473f828e9a396d4c1db9addbd294fb7db1797"; 30 + sha256 = "1bmpz4s6j7by6l45wwxy7dn7hmrhxc26kbx2hbfy41x29vbjg6j9"; 31 + }; 32 + 33 + # Unfortunately PyLD does not pass all testcases in the JSON-LD corpus. We 34 + # check for at least a minimum amount of successful tests so we know it's not 35 + # getting worse, at least. 36 + checkPhase = '' 37 + ok_min=401 38 + 39 + if ! ${python.interpreter} tests/runtests.py -d ${json-ld}/test-suite 2>&1 | tee test.out; then 40 + ok_count=$(${gnugrep}/bin/grep -F '... ok' test.out | wc -l) 41 + if [[ $ok_count -lt $ok_min ]]; then 42 + echo "Less than $ok_min tests passed ($ok_count). Failing the build." 43 + exit 1 44 + fi 45 + fi 46 + 47 + ${python.interpreter} tests/runtests.py -d ${normalization}/tests 48 + ''; 49 + 50 + meta = with stdenv.lib; { 51 + description = "Python implementation of the JSON-LD API"; 52 + homepage = "https://github.com/digitalbazaar/pyld"; 53 + license = licenses.bsd3; 54 + maintainers = with maintainers; [ apeschar ]; 55 + }; 56 + }
+2
pkgs/top-level/python-packages.nix
··· 5087 }; 5088 }; 5089 5090 python-jose = callPackage ../development/python-modules/python-jose {}; 5091 5092 pyhepmc = buildPythonPackage rec {
··· 5087 }; 5088 }; 5089 5090 + PyLD = callPackage ../development/python-modules/PyLD { }; 5091 + 5092 python-jose = callPackage ../development/python-modules/python-jose {}; 5093 5094 pyhepmc = buildPythonPackage rec {