Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

python312Packages.carbon: patch cf.readfp

- refactor
- add pythonImportsCheck

+28 -10
+28 -10
pkgs/development/python-modules/carbon/default.nix
··· 1 { 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 twisted, 6 - whisper, 7 txamqp, 8 - cachetools, 9 urllib3, 10 - nixosTests, 11 }: 12 13 buildPythonPackage rec { 14 pname = "carbon"; 15 version = "1.1.10"; 16 - format = "setuptools"; 17 18 src = fetchPypi { 19 inherit pname version; ··· 21 }; 22 23 # Carbon-s default installation is /opt/graphite. This env variable ensures 24 - # carbon is installed as a regular python module. 25 GRAPHITE_NO_PREFIX = "True"; 26 27 - propagatedBuildInputs = [ 28 twisted 29 - whisper 30 txamqp 31 - cachetools 32 urllib3 33 ]; 34 35 passthru.tests = { 36 inherit (nixosTests) graphite; 37 }; 38 39 meta = with lib; { 40 - homepage = "http://graphiteapp.org/"; 41 description = "Backend data caching and persistence daemon for Graphite"; 42 maintainers = with maintainers; [ 43 offline 44 basvandijk 45 ]; 46 - license = licenses.asl20; 47 }; 48 }
··· 1 { 2 lib, 3 buildPythonPackage, 4 + cachetools, 5 fetchPypi, 6 + nixosTests, 7 + pytestCheckHook, 8 + pythonOlder, 9 + setuptools, 10 twisted, 11 txamqp, 12 urllib3, 13 + whisper, 14 }: 15 16 buildPythonPackage rec { 17 pname = "carbon"; 18 version = "1.1.10"; 19 + pyproject = true; 20 + 21 + disabled = pythonOlder "3.10"; 22 23 src = fetchPypi { 24 inherit pname version; ··· 26 }; 27 28 # Carbon-s default installation is /opt/graphite. This env variable ensures 29 + # carbon is installed as a regular Python module. 30 GRAPHITE_NO_PREFIX = "True"; 31 32 + postPatch = '' 33 + substituteInPlace setup.py \ 34 + --replace-fail "cf.readfp(f, 'setup.cfg')" "cf.read(f, 'setup.cfg')" 35 + ''; 36 + 37 + build-system = [ setuptools ]; 38 + 39 + dependencies = [ 40 + cachetools 41 twisted 42 txamqp 43 urllib3 44 + whisper 45 ]; 46 47 + # Tests are not shipped with PyPI 48 + doCheck = false; 49 + 50 passthru.tests = { 51 inherit (nixosTests) graphite; 52 }; 53 54 + pythonImportsCheck = [ "carbon" ]; 55 + 56 meta = with lib; { 57 description = "Backend data caching and persistence daemon for Graphite"; 58 + homepage = "https://github.com/graphite-project/carbon"; 59 + changelog = "https://github.com/graphite-project/carbon/releases/tag/${version}"; 60 + license = licenses.asl20; 61 maintainers = with maintainers; [ 62 offline 63 basvandijk 64 ]; 65 }; 66 }