mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-10 22:30:59 +00:00
Split package into top-level Python library.
We need to propagate it just like any other package, otherwise
dependents cannot detect it during installation.
The __init__.py collide since it uses old-style namespaces so we get rid
of those. In the future we may need to extend the namespaces.
This was enough for my dependency opencensus-ext-azure.
Having it as a top-level Python is just common practice; there is no
good reason not to.
(cherry picked from commit b615ba8a5f)
40 lines
781 B
Nix
40 lines
781 B
Nix
{ buildPythonPackage
|
|
, fetchPypi
|
|
, lib
|
|
, unittestCheckHook
|
|
, google-api-core
|
|
, opencensus-context
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "opencensus";
|
|
version = "0.11.0";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "sha256-AmIWq6uJ2U2FBJLz3GWVAFXsT4QRX6bHvq/7pEo0bkI=";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
google-api-core
|
|
opencensus-context
|
|
];
|
|
|
|
pythonNamespaces = [
|
|
"opencensus.common"
|
|
];
|
|
|
|
doCheck = false; # No tests in sdist
|
|
|
|
pythonImportsCheck = [
|
|
"opencensus.common"
|
|
];
|
|
|
|
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 ];
|
|
};
|
|
}
|