1{ buildPythonPackage, lib, fetchPypi, isPy27
2, odfpy
3, openpyxl
4, pandas
5, setuptools-scm
6, pytest
7, pytest-cov
8, pyyaml
9, unicodecsv
10, xlrd
11, xlwt
12}:
13
14buildPythonPackage rec {
15 pname = "tablib";
16 version = "3.1.0";
17 disabled = isPy27;
18
19 src = fetchPypi {
20 inherit pname version;
21 sha256 = "d64c9f6712918a3d90ec5d71b44b8bab1083e3609e4844ad2be80eb633e097ed";
22 };
23
24 nativeBuildInputs = [ setuptools-scm ];
25 propagatedBuildInputs = [ xlwt openpyxl pyyaml xlrd odfpy ];
26 checkInputs = [ pytest pytest-cov unicodecsv pandas ];
27
28 # test_tablib needs MarkupPy, which isn't packaged yet
29 checkPhase = ''
30 pytest --ignore tests/test_tablib.py
31 '';
32
33 meta = with lib; {
34 description = "Format-agnostic tabular dataset library";
35 homepage = "https://python-tablib.org";
36 license = licenses.mit;
37 };
38}