python312Packages.fnllm: 0.0.11 -> 0.0.12 (#364582)
[NixPkgs.git] / pkgs / development / python-modules / craft-archives / default.nix
blobefa3965a41287fd1b0f9d17460d5c81913d315db
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   nix-update-script,
6   launchpadlib,
7   lazr-restfulclient,
8   lazr-uri,
9   overrides,
10   pydantic,
11   python-debian,
12   distro,
13   setuptools-scm,
14   pytest-check,
15   pytest-mock,
16   pytestCheckHook,
19 buildPythonPackage rec {
20   pname = "craft-archives";
21   version = "2.0.2";
23   pyproject = true;
25   src = fetchFromGitHub {
26     owner = "canonical";
27     repo = "craft-archives";
28     rev = "refs/tags/${version}";
29     hash = "sha256-1HEz4d1WLQDDHga7X+V/37n8E7JK/k0z+UDeNEiLOHs=";
30   };
32   postPatch = ''
33     substituteInPlace craft_archives/__init__.py \
34       --replace-fail "dev" "${version}"
36     substituteInPlace pyproject.toml \
37       --replace-fail "setuptools==67.7.2" "setuptools"
38   '';
40   build-system = [ setuptools-scm ];
42   dependencies = [
43     distro
44     launchpadlib
45     lazr-restfulclient
46     lazr-uri
47     overrides
48     pydantic
49     python-debian
50   ];
52   pythonImportsCheck = [ "craft_archives" ];
54   nativeCheckInputs = [
55     pytest-check
56     pytest-mock
57     pytestCheckHook
58   ];
60   pytestFlagsArray = [ "tests/unit" ];
62   passthru.updateScript = nix-update-script { };
64   meta = {
65     description = "Library for handling archives/repositories in Canonical craft applications";
66     homepage = "https://github.com/canonical/craft-archives";
67     changelog = "https://github.com/canonical/craft-archives/releases/tag/${version}";
68     license = lib.licenses.lgpl3Only;
69     maintainers = with lib.maintainers; [ jnsgruk ];
70     platforms = lib.platforms.linux;
71   };