1{
2 lib,
3 buildPythonPackage,
4 defusedxml,
5 fetchPypi,
6 packaging,
7 pytestCheckHook,
8 pythonOlder,
9 pythonRelaxDepsHook,
10 requests,
11 requests-mock,
12 setuptools,
13 versioneer,
14}:
15
16buildPythonPackage rec {
17 pname = "tableauserverclient";
18 version = "0.30";
19 pyproject = true;
20
21 disabled = pythonOlder "3.7";
22
23 src = fetchPypi {
24 inherit pname version;
25 hash = "sha256-MIE6V84xLEbgmTwvP6jQC0H//gBnMTO1sowL1HIMbpQ=";
26 };
27
28 postPatch = ''
29 # Remove vendorized versioneer
30 rm versioneer.py
31 '';
32
33 pythonRelaxDeps = [ "urllib3" ];
34
35 nativeBuildInputs = [
36 setuptools
37 pythonRelaxDepsHook
38 versioneer
39 ];
40
41 propagatedBuildInputs = [
42 defusedxml
43 requests
44 packaging
45 ];
46
47 nativeCheckInputs = [
48 requests-mock
49 pytestCheckHook
50 ];
51
52 # Tests attempt to create some file artifacts and fails
53 doCheck = false;
54
55 pythonImportsCheck = [ "tableauserverclient" ];
56
57 meta = with lib; {
58 description = "Module for working with the Tableau Server REST API";
59 homepage = "https://github.com/tableau/server-client-python";
60 changelog = "https://github.com/tableau/server-client-python/releases/tag/v${version}";
61 license = licenses.mit;
62 maintainers = with maintainers; [ ];
63 };
64}