python3Packages.craft-platforms: init at 0.1.1
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
annotated-types,
|
||||
distro,
|
||||
fetchFromGitHub,
|
||||
nix-update-script,
|
||||
pytest-check,
|
||||
pytestCheckHook,
|
||||
pythonOlder,
|
||||
setuptools,
|
||||
setuptools-scm,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "craft-platforms";
|
||||
version = "0.1.1";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.10";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "canonical";
|
||||
repo = "craft-platforms";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-KzskmSw7NsH1CAYjPf2281Ob71Jd6AhWxtp5tR3IqyU=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace craft_platforms/__init__.py --replace-fail "dev" "${version}"
|
||||
'';
|
||||
|
||||
build-system = [
|
||||
setuptools
|
||||
setuptools-scm
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
annotated-types
|
||||
distro
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
pytest-check
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "craft_platforms" ];
|
||||
|
||||
pytestFlagsArray = [ "tests/unit" ];
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
meta = {
|
||||
description = "Manage platforms and architectures for charm applications";
|
||||
homepage = "https://github.com/canonical/craft-platforms";
|
||||
changelog = "https://github.com/canonical/craft-platforms/releases/tag/${version}";
|
||||
license = lib.licenses.lgpl3Only;
|
||||
maintainers = with lib.maintainers; [ jnsgruk ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
@@ -2567,6 +2567,8 @@ self: super: with self; {
|
||||
|
||||
craft-parts = callPackage ../development/python-modules/craft-parts { };
|
||||
|
||||
craft-platforms = callPackage ../development/python-modules/craft-platforms { };
|
||||
|
||||
craft-providers = callPackage ../development/python-modules/craft-providers { };
|
||||
|
||||
craft-store = callPackage ../development/python-modules/craft-store { };
|
||||
|
||||
Reference in New Issue
Block a user