1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 requests, 7 pytestCheckHook, 8 pyyaml, 9}: 10 11buildPythonPackage rec { 12 version = "3.1.0"; 13 pname = "conjure-python-client"; 14 pyproject = true; 15 16 src = fetchFromGitHub { 17 owner = "palantir"; 18 repo = "conjure-python-client"; 19 tag = "${version}"; 20 hash = "sha256-dfoP0/v0yFAyBo4wADDGGTggVuFBoG53e5WTBvKQaS0="; 21 }; 22 23 # https://github.com/palantir/conjure-python-client/blob/3.0.0/setup.py#L57 24 postPatch = '' 25 echo '__version__ = "${version}"' > ./conjure_python_client/_version.py 26 ''; 27 28 build-system = [ setuptools ]; 29 30 dependencies = [ requests ]; 31 32 nativeCheckInputs = [ 33 pytestCheckHook 34 pyyaml 35 ]; 36 37 # some tests depend on a code generator that isn't available in nixpkgs 38 # https://github.com/palantir/conjure-python-client/blob/3.0.0/CONTRIBUTING.md?plain=1#L23 39 disabledTestPaths = [ 40 "test/conjure/test_conjure_repr.py" 41 "test/integration_test" 42 "test/serde/test_decode_union.py" 43 ]; 44 45 pythonImportsCheck = [ "conjure_python_client" ]; 46 47 meta = { 48 description = "Python client and JSON encoders for use with generated Conjure clients"; 49 homepage = "https://github.com/palantir/conjure-python-client"; 50 changelog = "https://github.com/palantir/conjure-python-client/releases/tag/${version}"; 51 license = lib.licenses.asl20; 52 maintainers = with lib.maintainers; [ alkasm ]; 53 }; 54}