nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at r-updates 62 lines 1.3 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 replaceVars, 6 marisa-cpp, 7 cython, 8 setuptools, 9 pytestCheckHook, 10 hypothesis, 11}: 12 13buildPythonPackage rec { 14 pname = "marisa-trie"; 15 version = "1.3.1"; 16 pyproject = true; 17 18 src = fetchFromGitHub { 19 owner = "pytries"; 20 repo = "marisa-trie"; 21 tag = version; 22 hash = "sha256-7T0V5levh9xjWmjJdFix0p8L3lZhfurikSWMI7Hotbs="; 23 }; 24 25 patches = [ 26 (replaceVars ./unvendor-marisa.patch { 27 marisa = lib.getDev marisa-cpp; 28 }) 29 ]; 30 31 build-system = [ 32 cython 33 setuptools 34 ]; 35 36 buildInputs = [ 37 marisa-cpp 38 ]; 39 40 nativeCheckInputs = [ 41 pytestCheckHook 42 hypothesis 43 ]; 44 45 disabledTestPaths = [ 46 # Don't test packaging 47 "tests/test_packaging.py" 48 ]; 49 50 pythonImportsCheck = [ "marisa_trie" ]; 51 52 meta = { 53 description = "Static memory-efficient Trie-like structures for Python based on marisa-trie C++ library"; 54 longDescription = '' 55 There are official SWIG-based Python bindings included in C++ library distribution. 56 This package provides alternative Cython-based pip-installable Python bindings. 57 ''; 58 homepage = "https://github.com/kmike/marisa-trie"; 59 changelog = "https://github.com/pytries/marisa-trie/blob/${src.tag}/CHANGES.rst"; 60 license = lib.licenses.mit; 61 }; 62}