diff options
author | Fabian Affolter <mail@fabian-affolter.ch> | 2024-01-19 08:59:34 +0100 |
---|---|---|
committer | Fabian Affolter <mail@fabian-affolter.ch> | 2024-01-19 08:59:34 +0100 |
commit | 72badb5bef437ab8adcdaea2be3fba85ef07f013 (patch) | |
tree | 294ebc37a2e73fe85a855749f86ba8d2005fc03a /pkgs/development/python-modules/betterproto | |
parent | b956688fd10ea185762356ff5f5c7bec935b20de (diff) |
python311Packages.betterproto: refactor
Diffstat (limited to 'pkgs/development/python-modules/betterproto')
-rw-r--r-- | pkgs/development/python-modules/betterproto/default.nix | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/pkgs/development/python-modules/betterproto/default.nix b/pkgs/development/python-modules/betterproto/default.nix index f17fabec994f3..38d69c6f83268 100644 --- a/pkgs/development/python-modules/betterproto/default.nix +++ b/pkgs/development/python-modules/betterproto/default.nix @@ -13,6 +13,7 @@ , pytestCheckHook , pytest-asyncio , pytest-mock +, typing-extensions , tomlkit , grpcio-tools }: @@ -20,21 +21,25 @@ buildPythonPackage rec { pname = "betterproto"; version = "2.0.0b6"; - format = "pyproject"; - disabled = pythonOlder "3.7"; + pyproject = true; + + disabled = pythonOlder "3.9"; src = fetchFromGitHub { owner = "danielgtaylor"; repo = "python-betterproto"; - rev = "v.${version}"; + rev = "refs/tags/v.${version}"; hash = "sha256-ZuVq4WERXsRFUPNNTNp/eisWX1MyI7UtwqEI8X93wYI="; }; - nativeBuildInputs = [ poetry-core ]; + nativeBuildInputs = [ + poetry-core + ]; propagatedBuildInputs = [ grpclib python-dateutil + typing-extensions ]; passthru.optional-dependencies.compiler = [ @@ -43,16 +48,18 @@ buildPythonPackage rec { isort ]; - pythonImportsCheck = [ "betterproto" ]; - nativeCheckInputs = [ + grpcio-tools pydantic - pytestCheckHook pytest-asyncio pytest-mock + pytestCheckHook tomlkit - grpcio-tools - ] ++ passthru.optional-dependencies.compiler; + ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); + + pythonImportsCheck = [ + "betterproto" + ]; # The tests require the generation of code before execution. This requires # the protoc-gen-python_betterproto script from the package to be on PATH. @@ -63,13 +70,14 @@ buildPythonPackage rec { ''; meta = with lib; { - description = "Clean, modern, Python 3.6+ code generator & library for Protobuf 3 and async gRPC"; + description = "Code generator & library for Protobuf 3 and async gRPC"; longDescription = '' This project aims to provide an improved experience when using Protobuf / gRPC in a modern Python environment by making use of modern language features and generating readable, understandable, idiomatic Python code. ''; homepage = "https://github.com/danielgtaylor/python-betterproto"; + changelog = "https://github.com/danielgtaylor/python-betterproto/blob/v.${version}/CHANGELOG.md"; license = licenses.mit; maintainers = with maintainers; [ nikstur ]; }; |