Skip to content

Commit

Permalink
python312Packages.glean-sdk: 52.7.0 -> 60.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
pyrox0 committed Jul 28, 2024
1 parent 7eb271d commit 98527f7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 38 deletions.
56 changes: 21 additions & 35 deletions pkgs/development/python-modules/glean-sdk/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,55 +2,41 @@
stdenv,
lib,
buildPythonPackage,
cargo,
cffi,
fetchPypi,
fetchFromGitHub,
glean-parser,
iso8601,
lmdb,
pkg-config,
pytest-localserver,
pytestCheckHook,
python,
pythonOlder,
rustc,
rustPlatform,
semver,
setuptools-rust,
setuptools,
}:

buildPythonPackage rec {
pname = "glean-sdk";
version = "52.7.0";
format = "setuptools";
version = "60.4.0";
pyproject = true;

disabled = pythonOlder "3.6";

src = fetchPypi {
inherit pname version;
hash = "sha256-sLjdGHiS7Co/oA9gQyAFkD14tAYjmwjWcPr4CRrzw/0=";
src = fetchFromGitHub {
owner = "mozilla";
repo = "glean";
rev = "v${version}";
hash = "sha256-C3wQdxPNBPQN6eUK6Vq0bA6Wpqb28e9BTBf7c/hTQxU=";
};

cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-5TlgWcLmjklxhtDbB0aRF71iIRTJwetFj1Jii1DGdvU=";
hash = "sha256-XqOCHnvM64kZNifU5Wt/bFAvyRVy28ozWSwlvm/sMk8=";
};

nativeBuildInputs = [
cargo
pkg-config
rustc
build-system = [
rustPlatform.cargoSetupHook
setuptools-rust
rustPlatform.maturinBuildHook
setuptools
];

buildInputs = [ lmdb ];

propagatedBuildInputs = [
cffi
dependencies = [
glean-parser
iso8601
semver
];

Expand All @@ -59,23 +45,23 @@ buildPythonPackage rec {
pytestCheckHook
];

pytestFlagsArray = [ "glean-core/python/tests" ];

disabledTests = [
# RuntimeError: No ping received.
"test_client_activity_api"
"test_flipping_upload_enabled_respects_order_of_events"
# A warning causes this test to fail
"test_get_language_tag_reports_the_tag_for_the_default_locale"
];

postInstallCheck = lib.optionalString stdenv.hostPlatform.isElf ''
readelf -a $out/${python.sitePackages}/glean/libglean_ffi.so | grep -F 'Shared library: [liblmdb.so'
'';

pythonImportsCheck = [ "glean" ];

meta = with lib; {
meta = {
broken = stdenv.isDarwin;
description = "Telemetry client libraries and are a part of the Glean project";
homepage = "https://mozilla.github.io/glean/book/index.html";
license = licenses.mpl20;
maintainers = with maintainers; [ melling ];
license = lib.licenses.mpl20;
maintainers = with lib.maintainers; [ melling ];
};
}
4 changes: 1 addition & 3 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4962,9 +4962,7 @@ self: super: with self; {

glean-parser = callPackage ../development/python-modules/glean-parser { };

glean-sdk = callPackage ../development/python-modules/glean-sdk {
inherit (pkgs) lmdb;
};
glean-sdk = callPackage ../development/python-modules/glean-sdk { };

glfw = callPackage ../development/python-modules/glfw { };

Expand Down

0 comments on commit 98527f7

Please sign in to comment.