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