From fa49cf159d1130325ac15a191b96e68c2bbc9154 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Thu, 18 Jul 2024 09:57:50 -0700 Subject: [PATCH] python312Packages.icalendar: 5.0.13 -> 6.0.0 Diff: https://github.com/collective/icalendar/compare/refs/tags/v5.0.13...v6.0.0 Changelog: https://github.com/collective/icalendar/blob/v6.0.0/CHANGES.rst --- .../python-modules/icalendar/default.nix | 23 ++++++++++++++----- .../icalendar/no-dynamic-version.patch | 17 ++++++++++++++ 2 files changed, 34 insertions(+), 6 deletions(-) create mode 100644 pkgs/development/python-modules/icalendar/no-dynamic-version.patch diff --git a/pkgs/development/python-modules/icalendar/default.nix b/pkgs/development/python-modules/icalendar/default.nix index 1170485bf39f..e03544ac41d4 100644 --- a/pkgs/development/python-modules/icalendar/default.nix +++ b/pkgs/development/python-modules/icalendar/default.nix @@ -2,17 +2,19 @@ lib, buildPythonPackage, fetchFromGitHub, + replaceVars, pythonOlder, - setuptools, + hatch-vcs, + hatchling, backports-zoneinfo, python-dateutil, - pytz, + tzdata, hypothesis, pytestCheckHook, }: buildPythonPackage rec { - version = "5.0.13"; + version = "6.0.0"; pname = "icalendar"; pyproject = true; @@ -20,14 +22,23 @@ buildPythonPackage rec { owner = "collective"; repo = "icalendar"; rev = "refs/tags/v${version}"; - hash = "sha256-2gpWfLXR4HThw23AWxY2rY9oiK6CF3Qiad8DWHCs4Qk="; + hash = "sha256-eWFDY/pNVfcUk3PfB0vXqh9swuSGtflUw44IMDJI+yI="; }; - build-system = [ setuptools ]; + patches = [ + (replaceVars ./no-dynamic-version.patch { + inherit version; + }) + ]; + + build-system = [ + hatch-vcs + hatchling + ]; dependencies = [ python-dateutil - pytz + tzdata ] ++ lib.optionals (pythonOlder "3.9") [ backports-zoneinfo ]; nativeCheckInputs = [ diff --git a/pkgs/development/python-modules/icalendar/no-dynamic-version.patch b/pkgs/development/python-modules/icalendar/no-dynamic-version.patch new file mode 100644 index 000000000000..4754b6441a5f --- /dev/null +++ b/pkgs/development/python-modules/icalendar/no-dynamic-version.patch @@ -0,0 +1,17 @@ +diff --git a/pyproject.toml b/pyproject.toml +index 9730e46..9834686 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -34,11 +34,7 @@ maintainers = [ + { name="Christian Geier" }, + { name="Jaca", email="vitouejj@gmail.com" }, + ] +-# These attributes are dynamically generated by hatch-vcs +-dynamic = [ +- "urls", +- "version" +-] ++version = "@version@" + description = "iCalendar parser/generator" + readme = { file = "README.rst", content-type = "text/x-rst" } +