depot/third_party/nixpkgs/pkgs/development/python-modules/craft-store/default.nix
Default email 472aeafc57 Project import generated by Copybara.
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
2024-10-04 18:56:33 +02:00

75 lines
1.5 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
nix-update-script,
setuptools,
setuptools-scm,
pytest-check,
pytest-mock,
pydantic,
pyyaml,
pytestCheckHook,
keyring_24,
macaroonbakery,
overrides,
pyxdg,
requests,
requests-toolbelt,
}:
buildPythonPackage rec {
pname = "craft-store";
version = "3.0.2";
pyproject = true;
src = fetchFromGitHub {
owner = "canonical";
repo = "craft-store";
rev = "refs/tags/${version}";
hash = "sha256-l8WnuaMJN4/nZRkWoU6omgbd4hKR2m7YC+YVcvAqzcA=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail "setuptools==" "setuptools>="
'';
build-system = [ setuptools-scm ];
dependencies = [
keyring_24
macaroonbakery
overrides
pydantic
pyxdg
requests
requests-toolbelt
];
pythonRelaxDeps = [ "macaroonbakery" ];
pythonImportsCheck = [ "craft_store" ];
nativeCheckInputs = [
pydantic
pytest-check
pytest-mock
pytestCheckHook
pyyaml
];
pytestFlagsArray = [ "tests/unit" ];
passthru.updateScript = nix-update-script { };
meta = {
description = "Interfaces for communicating with Canonical Stores (e.g. Snap Store)";
homepage = "https://github.com/canonical/craft-store";
changelog = "https://github.com/canonical/craft-store/releases/tag/${version}";
license = lib.licenses.lgpl3Only;
maintainers = with lib.maintainers; [ jnsgruk ];
platforms = lib.platforms.linux;
};
}