Commit affad4fc authored by Fabian Affolter's avatar Fabian Affolter
Browse files

python312Packages.datauri: refactor

parent 7c68fc6d
Loading
Loading
Loading
Loading
+17 −7
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchFromGitHub
, setuptools
, pydantic
, pytestCheckHook
, pythonOlder
, setuptools
, typing-extensions
}:

buildPythonPackage rec {
  pname = "datauri";
  version = "2.1.1";
  format = "pyproject";
  pyproject = true;

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "fcurella";
@@ -18,12 +22,12 @@ buildPythonPackage rec {
    hash = "sha256-+R1J4IjJ+Vf/+V2kiZyIyAqTAgGLTMJjGePyVRuO5rs=";
  };

  nativeBuildInputs = [
  build-system = [
    setuptools
  ];

  pythonImportsCheck = [
    "datauri"
  dependencies = [
    typing-extensions
  ];

  nativeCheckInputs = [
@@ -31,13 +35,19 @@ buildPythonPackage rec {
    pytestCheckHook
  ];

  pythonImportsCheck = [
    "datauri"
  ];

  disabledTests = [
    "test_pydantic" # incompatible with pydantic v2
    # Test is incompatible with pydantic >=2
    "test_pydantic"
  ];

  meta = with lib; {
    description = "Data URI manipulation made easy.";
    description = "Module for Data URI manipulation";
    homepage = "https://github.com/fcurella/python-datauri";
    changelog = "https://github.com/fcurella/python-datauri/releases/tag/v${version}";
    license = licenses.unlicense;
    maintainers = with maintainers; [ yuu ];
  };