Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at domenkozar-patch-1 69 lines 1.7 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, cchardet 5, chardet 6, pandas 7, regex 8, tabview 9, python 10, pytestCheckHook 11}: 12 13buildPythonPackage rec { 14 pname = "clevercsv"; 15 version = "0.7.4"; 16 format = "setuptools"; 17 18 src = fetchFromGitHub { 19 owner = "alan-turing-institute"; 20 repo = "CleverCSV"; 21 rev = "v${version}"; 22 sha256 = "sha256-2OLvVJbqV/wR+Quq0cAlR/vCUe1/Km/nALwfoHD9B+U="; 23 }; 24 25 propagatedBuildInputs = [ 26 cchardet 27 chardet 28 pandas 29 regex 30 tabview 31 ]; 32 33 checkInputs = [ pytestCheckHook ]; 34 35 pythonImportsCheck = [ 36 "clevercsv" 37 "clevercsv.cparser" 38 ]; 39 40 preCheck = '' 41 # by linking the installed version the tests also have access to compiled native libraries 42 rm -r clevercsv 43 ln -s $out/${python.sitePackages}/clevercsv/ clevercsv 44 ''; 45 46 # their ci only runs unit tests, there are also integration and fuzzing tests 47 pytestFlagsArray = [ 48 "./tests/test_unit" 49 ]; 50 51 disabledTestPaths = [ 52 # ModuleNotFoundError: No module named 'wilderness' 53 "tests/test_unit/test_console.py" 54 ]; 55 56 meta = with lib; { 57 description = "CleverCSV is a Python package for handling messy CSV files"; 58 longDescription = '' 59 CleverCSV is a Python package for handling messy CSV files. It provides 60 a drop-in replacement for the builtin CSV module with improved dialect 61 detection, and comes with a handy command line application for working 62 with CSV files. 63 ''; 64 homepage = "https://github.com/alan-turing-institute/CleverCSV"; 65 changelog = "https://github.com/alan-turing-institute/CleverCSV/blob/master/CHANGELOG.md"; 66 license = licenses.mit; 67 maintainers = with maintainers; [ hexa ]; 68 }; 69}