From d6572b7c222a087236f56ddb4f19fb9d36dcaf5f Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Sun, 14 Jul 2024 01:39:30 +0200 Subject: [PATCH 1/4] python312Packages.bpylist2: init at 3.0.3 python312Packages.bpylist2: 3.0.3 -> 4.1.1 bpylist fix bpylist2 --- .../python-modules/bpylist2/default.nix | 39 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 41 insertions(+) create mode 100644 pkgs/development/python-modules/bpylist2/default.nix diff --git a/pkgs/development/python-modules/bpylist2/default.nix b/pkgs/development/python-modules/bpylist2/default.nix new file mode 100644 index 000000000000..7becd01e194b --- /dev/null +++ b/pkgs/development/python-modules/bpylist2/default.nix @@ -0,0 +1,39 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + poetry-core, + pytestCheckHook, +}: + +buildPythonPackage { + pname = "bpylist2"; + version = "4.1.1"; + pyproject = true; + + src = fetchFromGitHub { + owner = "parabolala"; + repo = "bpylist2"; + rev = "ddb89e0b0301c6b298de6469221d99b5fe127b58"; + hash = "sha256-OBwDQZL5++LZgpQM96tmplAh1Pjme3KGSNFTKqKUn00="; + }; + + build-system = [ poetry-core ]; + + pythonImportsCheck = [ "bpylist2" ]; + nativeCheckInputs = [ pytestCheckHook ]; + + postPatch = '' + substituteInPlace setup.cfg \ + --replace-fail "--pycodestyle" "" \ + --replace-fail "--pylint --pylint-rcfile=pylint.rc" "" \ + --replace-fail "--mypy" "" + ''; + + meta = { + description = "Parse and Generate binary plists and NSKeyedArchiver archives"; + license = lib.licenses.mit; + homepage = "https://github.com/parabolala/bpylist2"; + maintainers = with lib.maintainers; [ sigmanificient ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c0342015c5ae..d0e3154ae2ac 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1769,6 +1769,8 @@ self: super: with self; { bpycv = callPackage ../development/python-modules/bpycv {}; + bpylist2 = callPackage ../development/python-modules/bpylist2 { }; + bpython = callPackage ../development/python-modules/bpython { }; bqplot = callPackage ../development/python-modules/bqplot { }; From 21bf36dd0038eecabe8f8180a1ec9e7dd3b1c9e0 Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Sun, 14 Jul 2024 02:33:58 +0200 Subject: [PATCH 2/4] python312Packages.rich-theme-manager: init at 0.11.0 --- .../rich-theme-manager/default.nix | 34 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/development/python-modules/rich-theme-manager/default.nix diff --git a/pkgs/development/python-modules/rich-theme-manager/default.nix b/pkgs/development/python-modules/rich-theme-manager/default.nix new file mode 100644 index 000000000000..f465b77b6ef6 --- /dev/null +++ b/pkgs/development/python-modules/rich-theme-manager/default.nix @@ -0,0 +1,34 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + poetry-core, + rich, + pytestCheckHook, +}: + +buildPythonPackage rec { + pname = "rich-theme-manager"; + version = "0.11.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "RhetTbull"; + repo = "rich_theme_manager"; + rev = "refs/tags/v${version}"; + hash = "sha256-nSNG+lWOPmh66I9EmPvWqbeceY/cu+zBpgVlDTNuHc0="; + }; + + build-system = [ poetry-core ]; + dependencies = [ rich ]; + + pythonImportsCheck = [ "rich_theme_manager" ]; + nativeCheckInputs = [ pytestCheckHook ]; + + meta = { + description = "Define custom styles and themes for use with rich"; + license = lib.licenses.mit; + homepage = "https://github.com/RhetTbull/rich_theme_manager"; + maintainers = with lib.maintainers; [ sigmanificient ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d0e3154ae2ac..97bcf2f3274b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -13573,6 +13573,8 @@ self: super: with self; { rich-rst = callPackage ../development/python-modules/rich-rst { }; + rich-theme-manager = callPackage ../development/python-modules/rich-theme-manager { }; + ring-doorbell = callPackage ../development/python-modules/ring-doorbell { }; rio-tiler = callPackage ../development/python-modules/rio-tiler { }; From 72a0348acbb6fb79d778efc9cbed98aa407747e3 Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Sun, 14 Jul 2024 02:40:23 +0200 Subject: [PATCH 3/4] python312Packages.strpdatetime: init at 0.3.0 fix description strpdatetime fix strpdatetime --- .../python-modules/strpdatetime/default.nix | 39 +++++++++++++++++++ .../strpdatetime/fix-locale.patch | 10 +++++ pkgs/top-level/python-packages.nix | 2 + 3 files changed, 51 insertions(+) create mode 100644 pkgs/development/python-modules/strpdatetime/default.nix create mode 100644 pkgs/development/python-modules/strpdatetime/fix-locale.patch diff --git a/pkgs/development/python-modules/strpdatetime/default.nix b/pkgs/development/python-modules/strpdatetime/default.nix new file mode 100644 index 000000000000..f7e758bd1c3f --- /dev/null +++ b/pkgs/development/python-modules/strpdatetime/default.nix @@ -0,0 +1,39 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + poetry-core, + textx, + pytestCheckHook, +}: + +buildPythonPackage rec { + pname = "strpdatetime"; + version = "0.3.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "RhetTbull"; + repo = "strpdatetime"; + rev = "v${version}"; + hash = "sha256-eb3KJCFRkEt9KEP1gMQYuP50qXqItrexJhKvtJDHl9o="; + }; + + build-system = [ poetry-core ]; + + dependencies = [ textx ]; + pythonRelaxDeps = [ "textx" ]; + + patches = [ ./fix-locale.patch ]; + + pythonImportsCheck = [ "strpdatetime" ]; + nativeCheckInputs = [ pytestCheckHook ]; + + meta = { + description = "Parse strings into Python datetime objects"; + license = lib.licenses.psfl; + changelog = "https://github.com/RhetTbull/strpdatetime/blob/${src.rev}/CHANGELOG.md"; + homepage = "https://github.com/RhetTbull/strpdatetime"; + maintainers = with lib.maintainers; [ sigmanificient ]; + }; +} diff --git a/pkgs/development/python-modules/strpdatetime/fix-locale.patch b/pkgs/development/python-modules/strpdatetime/fix-locale.patch new file mode 100644 index 000000000000..d79bd63c6655 --- /dev/null +++ b/pkgs/development/python-modules/strpdatetime/fix-locale.patch @@ -0,0 +1,10 @@ +diff --git a/tests/test_strpdatetime.py b/tests/test_strpdatetime.py +index 6c371d6..a3d0232 100644 +--- a/tests/test_strpdatetime.py ++++ b/tests/test_strpdatetime.py +@@ -44,5 +44,4 @@ TEST_DATA = [ + @pytest.mark.parametrize("string, format, expected", TEST_DATA) + def test_datetime_strptime(string, format, expected): + """Test datetime_strptime""" +- locale.setlocale(locale.LC_ALL, "en_US.UTF-8") + assert strpdatetime(string, format) == expected diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 97bcf2f3274b..70b851d268fb 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -14923,6 +14923,8 @@ self: super: with self; { striprtf = callPackage ../development/python-modules/striprtf { }; + strpdatetime = callPackage ../development/python-modules/strpdatetime { }; + structlog = callPackage ../development/python-modules/structlog { }; stubserver = callPackage ../development/python-modules/stubserver { }; From ad5e2db9a67bf1a6b906f9343042b0d54790edc6 Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Sun, 14 Jul 2024 03:45:17 +0200 Subject: [PATCH 4/4] python312Packages.osxphotos: init at 0.68.2 --- .../python-modules/osxphotos/default.nix | 112 ++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 114 insertions(+) create mode 100644 pkgs/development/python-modules/osxphotos/default.nix diff --git a/pkgs/development/python-modules/osxphotos/default.nix b/pkgs/development/python-modules/osxphotos/default.nix new file mode 100644 index 000000000000..b62e22d256aa --- /dev/null +++ b/pkgs/development/python-modules/osxphotos/default.nix @@ -0,0 +1,112 @@ +{ + stdenv, + lib, + buildPythonPackage, + fetchFromGitHub, + setuptools, + + bitmath, + bpylist2, + click, + mako, + more-itertools, + objexplore, + packaging, + pathvalidate, + pip, + ptpython, + pytimeparse2, + pyyaml, + requests, + rich-theme-manager, + rich, + shortuuid, + strpdatetime, + tenacity, + textx, + toml, + wrapt, + wurlitzer, + xdg-base-dirs, + + pytestCheckHook, + pytest-mock, +}: + +buildPythonPackage rec { + pname = "osxphotos"; + version = "0.68.2"; + pyproject = true; + + src = fetchFromGitHub { + owner = "RhetTbull"; + repo = "osxphotos"; + rev = "refs/tags/v${version}"; + hash = "sha256-iPeidbPoF0AG6TJDWloXwpwzJ4oWEglKVLp2yywnyZs="; + }; + + build-system = [ setuptools ]; + dependencies = [ + bitmath + bpylist2 + click + mako + more-itertools + objexplore + packaging + pathvalidate + pip + ptpython + pytimeparse2 + pyyaml + requests + rich-theme-manager + rich + shortuuid + strpdatetime + tenacity + textx + toml + wrapt + wurlitzer + xdg-base-dirs + ]; + + pythonRelaxDeps = [ + "mako" + "more-itertools" + "objexplore" + "textx" + ]; + + pythonImportsCheck = [ "osxphotos" ]; + nativeCheckInputs = [ + pytestCheckHook + pytest-mock + ]; + + preCheck = '' + export HOME=$(mktemp -d) + ''; + + disabledTestPaths = [ "tests/test_comments.py" ]; + disabledTests = [ + "test_iphoto_info" + "test_from_to_date_tz" + "test_function_url" + "test_get_local_tz" + "test_datetime_naive_to_local" + "test_from_to_date_tz" + "test_query_from_to_date_alt_location" + "test_query_function_url" + ]; + + meta = { + description = "Export photos from Apple's macOS Photos app and query the Photos library database to access metadata about images"; + homepage = "https://github.com/RhetTbull/osxphotos"; + changelog = "https://github.com/RhetTbull/osxphotos/blob/${src.rev}/CHANGELOG.md"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ sigmanificient ]; + broken = stdenv.isDarwin; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 70b851d268fb..40134610e7c2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9598,6 +9598,8 @@ self: super: with self; { ossfs = callPackage ../development/python-modules/ossfs { }; + osxphotos = callPackage ../development/python-modules/osxphotos { }; + ots-python = callPackage ../development/python-modules/ots-python { }; outcome = callPackage ../development/python-modules/outcome { };