Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at master 1.6 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pybind11, 6 setuptools, 7 pytestCheckHook, 8 tzdata, 9 python, 10 pkgs, 11}: 12 13buildPythonPackage rec { 14 pname = "pyorc"; 15 version = "0.10.0"; 16 pyproject = true; 17 18 src = fetchFromGitHub { 19 owner = "noirello"; 20 repo = "pyorc"; 21 tag = "v${version}"; 22 hash = "sha256-2w3Qh6g+Yg+D10kTow9YR6B6FhQ+z2DvgDy5GtYxH4g="; 23 }; 24 25 postPatch = '' 26 substituteInPlace pyproject.toml \ 27 --replace-fail \ 28 '"pybind11>2.6.0,<3.0"' \ 29 '"pybind11>2.6.0"' 30 ''; 31 32 build-system = [ 33 pybind11 34 setuptools 35 ]; 36 37 env = { 38 PYORC_SKIP_ORC_BUILD = "true"; 39 }; 40 41 buildInputs = [ 42 pkgs.lz4 43 pkgs.protobuf_31 44 pkgs.snappy 45 pkgs.zlib 46 pkgs.zstd 47 pkgs.apache-orc 48 ]; 49 50 preCheck = '' 51 # provide timezone data, works only on linux 52 export TZDIR=${tzdata}/${python.sitePackages}/tzdata/zoneinfo 53 54 substituteInPlace "tests/compare/test_writer_cmp.py" \ 55 --replace-fail "deps/bin/orc-contents" "orc-contents" 56 57 substituteInPlace "tests/compare/test_reader_cmp.py" \ 58 --replace-fail "deps/bin/orc-metadata" "orc-metadata" 59 60 mkdir -p deps 61 ln -s "${pkgs.apache-orc.src}/examples" "deps/" 62 ''; 63 64 pythonImportsCheck = [ 65 "pyorc" 66 ]; 67 68 nativeCheckInputs = [ 69 pytestCheckHook 70 pkgs.apache-orc 71 ]; 72 73 meta = { 74 changelog = "https://github.com/noirello/pyorc/blob/${version}/CHANGELOG.rst"; 75 description = "Python module for Apache ORC file format"; 76 homepage = "https://github.com/noirello/pyorc"; 77 license = lib.licenses.asl20; 78 maintainers = [ ]; 79 }; 80}