python3Packages.glean-sdk: relax glean_parser constraint

- Fix execution of tests
- Add missing input
This commit is contained in:
Fabian Affolter 2022-03-26 18:26:30 +01:00
parent 12e7026727
commit 73719073f3

View file

@ -1,22 +1,27 @@
{ lib { lib
, buildPythonPackage , buildPythonPackage
, fetchPypi
, rustPlatform
, rustc
, cargo , cargo
, setuptools-rust
# build inputs
, cffi , cffi
, fetchPypi
, glean-parser , glean-parser
, iso8601
, pytest-localserver
, pytestCheckHook
, pythonOlder
, rustc
, rustPlatform
, setuptools-rust
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "glean-sdk"; pname = "glean-sdk";
version = "44.0.0"; version = "44.0.0";
disabled = pythonOlder "3.6";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "sha256-gzLsBwq3wrFde5cEb5+oFLW4KrwoiZpr22JbJhNr1yk="; hash = "sha256-gzLsBwq3wrFde5cEb5+oFLW4KrwoiZpr22JbJhNr1yk=";
}; };
cargoDeps = rustPlatform.fetchCargoTarball { cargoDeps = rustPlatform.fetchCargoTarball {
@ -26,22 +31,36 @@ buildPythonPackage rec {
}; };
nativeBuildInputs = [ nativeBuildInputs = [
rustc
cargo cargo
setuptools-rust rustc
rustPlatform.cargoSetupHook rustPlatform.cargoSetupHook
setuptools-rust
]; ];
propagatedBuildInputs = [ propagatedBuildInputs = [
cffi cffi
glean-parser glean-parser
iso8601
]; ];
pythonImportsCheck = [ "glean" ]; checkInputs = [
pytest-localserver
pytestCheckHook
];
postPatch = ''
substituteInPlace glean-core/python/setup.py \
--replace "glean_parser==5.0.1" "glean_parser>=5.0.1"
'';
pythonImportsCheck = [
"glean"
];
meta = with lib; { meta = with lib; {
description = "Modern cross-platform telemetry client libraries and are a part of the Glean project"; description = "Telemetry client libraries and are a part of the Glean project";
homepage = "https://mozilla.github.io/glean/book/index.html"; homepage = "https://mozilla.github.io/glean/book/index.html";
license = licenses.mpl20; license = licenses.mpl20;
maintainers = [ maintainers.kvark ]; maintainers = with maintainers; [ kvark ];
}; };
} }