opencensus: init at 0.11.0

update hash

use python.sitePackage

add pythonImportsCheck
This commit is contained in:
Bill Huang 2022-10-04 15:19:19 +08:00
parent 3b6e2eb683
commit e48936d8c4
No known key found for this signature in database
GPG Key ID: AFBF50389B764045

View File

@ -0,0 +1,55 @@
{ buildPythonPackage
, fetchPypi
, lib
, python
, unittestCheckHook
, google-api-core
}:
let
opencensus-context = buildPythonPackage rec {
pname = "opencensus-context";
version = "0.1.3";
checkInputs = [ unittestCheckHook ];
src = fetchPypi {
inherit pname version;
sha256 = "sha256-oDEIw8ENjIC7Xd9cih8DMWH6YZcqmRf5ubOhhRfwCIw=";
};
};
in
buildPythonPackage rec {
pname = "opencensus";
version = "0.11.0";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-AmIWq6uJ2U2FBJLz3GWVAFXsT4QRX6bHvq/7pEo0bkI=";
};
buildInputs = [
# opencensus-context is embedded in opencensus
opencensus-context
];
propagatedBuildInputs = [
google-api-core
];
postInstall = ''
ln -sf ${opencensus-context}/${python.sitePackages}/opencensus/common/runtime_context \
$out/${python.sitePackages}/opencensus/common/
'';
checkInputs = [ unittestCheckHook ];
pythonImportsCheck = [ "opencensus" ];
meta = with lib; {
description = "A stats collection and distributed tracing framework";
homepage = "https://github.com/census-instrumentation/opencensus-python";
license = licenses.asl20;
maintainers = with maintainers; [ billhuang ];
};
}