1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 lxml,
6 pytestCheckHook,
7 pythonOlder,
8 fetchpatch,
9 setuptools,
10}:
11
12buildPythonPackage rec {
13 pname = "tableaudocumentapi";
14 version = "0.11";
15
16 pyproject = true;
17 build-system = [ setuptools ];
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchPypi {
22 inherit pname version;
23 hash = "sha256-g6V1UBf+P21FcZkR3PHoUmdmrQwEvjdd1VKhvNmvOys=";
24 };
25 patches = [
26 # distutils has been removed since python 3.12
27 # see https://github.com/tableau/document-api-python/pull/255
28 (fetchpatch {
29 name = "no-distutils.patch";
30 url = "https://github.com/tableau/document-api-python/pull/255/commits/59280bbe073060d1249e6404e11303ed6faa84f6.patch";
31 hash = "sha256-mjIF9iP1BQXvqkS0jYNTm8otkhSKLj2b2iHSMZ2K0iI=";
32 })
33 ];
34
35 dependencies = [ lxml ];
36
37 nativeCheckInputs = [ pytestCheckHook ];
38
39 pythonImportsCheck = [ "tableaudocumentapi" ];
40
41 # ModuleNotFoundError: No module named 'test.assets'
42 doCheck = false;
43
44 meta = with lib; {
45 description = "Python module for working with Tableau files";
46 homepage = "https://github.com/tableau/document-api-python";
47 changelog = "https://github.com/tableau/document-api-python/releases/tag/v${version}";
48 license = licenses.mit;
49 maintainers = [ ];
50 };
51}