Unverified Commit 059d7296 authored by Peder Bergebakken Sundt's avatar Peder Bergebakken Sundt Committed by GitHub
Browse files

Merge pull request #326978 from Sigmanificient/osxphotos

python312Packages.osxphotos: init at 0.68.2; python312Packages.{strpdatetime,rich-theme-manager,objexplore,bpylist2,pycodestyle}: init
parents e2504c34 ad5e2db9
Loading
Loading
Loading
Loading
+39 −0
Original line number Diff line number Diff line
{
  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 ];
  };
}
+112 −0
Original line number Diff line number Diff line
{
  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;
  };
}
+34 −0
Original line number Diff line number Diff line
{
  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 ];
  };
}
+39 −0
Original line number Diff line number Diff line
{
  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 ];
  };
}
+10 −0
Original line number Diff line number Diff line
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
Loading