diff --git a/pkgs/applications/misc/mozphab/default.nix b/pkgs/applications/misc/mozphab/default.nix index 4c7bd07f6eeb3d8..6a08104129821a4 100644 --- a/pkgs/applications/misc/mozphab/default.nix +++ b/pkgs/applications/misc/mozphab/default.nix @@ -57,6 +57,14 @@ python3.pkgs.buildPythonApplication rec { export HOME=$(mktemp -d) ''; + disabledTests = [ + # AttributeError: 'called_once' is not a valid assertion. + "test_commit" + # AttributeError: 'not_called' is not a valid assertion. + "test_finalize_no_evolve" + "test_patch" + ]; + disabledTestPaths = [ # codestyle doesn't matter to us "tests/test_style.py" diff --git a/pkgs/development/python-modules/glean-parser/default.nix b/pkgs/development/python-modules/glean-parser/default.nix index 8196b35ce3637db..c36ca579afe94ca 100644 --- a/pkgs/development/python-modules/glean-parser/default.nix +++ b/pkgs/development/python-modules/glean-parser/default.nix @@ -8,43 +8,39 @@ jinja2, jsonschema, pytestCheckHook, - pythonOlder, pyyaml, setuptools, setuptools-scm, - yamllint, }: buildPythonPackage rec { pname = "glean-parser"; - version = "14.1.2"; - format = "setuptools"; - - disabled = pythonOlder "3.8"; + version = "14.3.0"; + pyproject = true; src = fetchPypi { pname = "glean_parser"; inherit version; - hash = "sha256-OL59Tg+rD4M0DjQnkU4IqGMcf6sIioxg6bVDyrbqgww="; + hash = "sha256-tI1kMCn7gksLdq2ytKAOiKSd5OxHmsnFrdUsUR6b5IE="; }; postPatch = '' substituteInPlace setup.py \ - --replace "pytest-runner" "" \ - --replace "MarkupSafe>=1.1.1,<=2.0.1" "MarkupSafe>=1.1.1" + --replace-fail "pytest-runner" "" ''; - nativeBuildInputs = [ setuptools-scm ]; + build-system = [ + setuptools + setuptools-scm + ]; - propagatedBuildInputs = [ + dependencies = [ appdirs click diskcache jinja2 jsonschema pyyaml - setuptools - yamllint ]; nativeCheckInputs = [ pytestCheckHook ]; @@ -63,12 +59,12 @@ buildPythonPackage rec { pythonImportsCheck = [ "glean_parser" ]; - meta = with lib; { + meta = { description = "Tools for parsing the metadata for Mozilla's glean telemetry SDK"; mainProgram = "glean_parser"; homepage = "https://github.com/mozilla/glean_parser"; changelog = "https://github.com/mozilla/glean_parser/blob/v${version}/CHANGELOG.md"; - license = licenses.mpl20; + license = lib.licenses.mpl20; maintainers = [ ]; }; } diff --git a/pkgs/development/python-modules/glean-sdk/default.nix b/pkgs/development/python-modules/glean-sdk/default.nix index 6a577a000f60b77..5dea3e4736652ef 100644 --- a/pkgs/development/python-modules/glean-sdk/default.nix +++ b/pkgs/development/python-modules/glean-sdk/default.nix @@ -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 ]; @@ -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 ]; }; } diff --git a/pkgs/development/python-modules/python-hglib/default.nix b/pkgs/development/python-modules/python-hglib/default.nix index 528316240c0a2fd..71e9bd7318ea46b 100644 --- a/pkgs/development/python-modules/python-hglib/default.nix +++ b/pkgs/development/python-modules/python-hglib/default.nix @@ -1,24 +1,42 @@ { lib, buildPythonPackage, - fetchPypi, + fetchzip, mercurial, - nose, + pytestCheckHook, + fetchpatch2, + setuptools, }: buildPythonPackage rec { pname = "python-hglib"; version = "2.6.2"; - format = "setuptools"; + pyproject = true; - src = fetchPypi { - inherit pname version; - hash = "sha256-sYvR7VPJDuV9VxTWata7crZOkw1K7KmDCJLAi7KNpgg="; + src = fetchzip { + url = "https://repo.mercurial-scm.org/python-hglib/archive/${version}.tar.gz"; + hash = "sha256-UXersegqJ9VAxy4Kvpb2IiOJfQbWryeeaGvwiR4ncW8="; }; + patches = [ + (fetchpatch2 { + name = "remove-nose.patch"; + excludes = [ "heptapod-ci.yml" ]; + url = "https://repo.mercurial-scm.org/python-hglib/raw-rev/8341f2494b3fc1c0d9ee55fa4487c0ac82f64d2a"; + hash = "sha256-4gicVCAH94itxHY0l8ek0L/RVhUrw2lMbbnENbWrV6U="; + }) + (fetchpatch2 { + name = "fix-tests.patch"; + url = "https://repo.mercurial-scm.org/python-hglib/raw-rev/a2afbf236ca86287e72f54e1248413625d1bc405"; + hash = "sha256-T/yKJ8cMMOBVk24SXwyPOoD321S1fZEIunaPJAxI0KI="; + }) + ]; + + build-system = [ setuptools ]; + nativeCheckInputs = [ mercurial - nose + pytestCheckHook ]; preCheck = '' @@ -28,10 +46,10 @@ buildPythonPackage rec { pythonImportsCheck = [ "hglib" ]; - meta = with lib; { + meta = { description = "Library with a fast, convenient interface to Mercurial. It uses Mercurial’s command server for communication with hg"; homepage = "https://www.mercurial-scm.org/wiki/PythonHglibs"; - license = licenses.mit; + license = lib.licenses.mit; maintainers = [ ]; }; } diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 78c8b7c6b76be91..58b2f56152b07af 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4972,9 +4972,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 { };