Unverified Commit 38e15cc8 authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

python312Packages.dalle-mini: fix build (#380962)

parents 618624ae ac650b63
Loading
Loading
Loading
Loading
+21 −5
Original line number Diff line number Diff line
@@ -3,13 +3,17 @@
  buildPythonPackage,
  fetchPypi,
  fetchpatch,

  # dependencies
  einops,
  emoji,
  flax,
  ftfy,
  jax,
  jaxlib,
  orbax-checkpoint,
  pillow,
  pydantic,
  transformers,
  unidecode,
  wandb,
@@ -18,7 +22,7 @@
buildPythonPackage rec {
  pname = "dalle-mini";
  version = "0.1.5";
  format = "setuptools";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
@@ -34,14 +38,26 @@ buildPythonPackage rec {
    })
  ];

  propagatedBuildInputs = [
  pythonRelaxDeps = [
    "transformers"
    "jax"
    "flax"
  ];

  pythonRemoveDeps = [
    "orbax"
  ];

  dependencies = [
    einops
    emoji
    flax
    ftfy
    jax
    jaxlib
    orbax-checkpoint
    pillow
    pydantic
    transformers
    unidecode
    wandb
@@ -51,10 +67,10 @@ buildPythonPackage rec {

  pythonImportsCheck = [ "dalle_mini" ];

  meta = with lib; {
  meta = {
    description = "Generate images from a text prompt";
    homepage = "https://github.com/borisdayma/dalle-mini";
    license = licenses.asl20;
    maintainers = with maintainers; [ r-burns ];
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ r-burns ];
  };
}
+37 −26
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  buildPythonPackage,
  decorator,
  fetchFromGitHub,

  # build-system
  setuptools,

  # dependencies
  decorator,
  imageio,
  imageio-ffmpeg,
  matplotlib,
  numpy,
  proglog,
  python-dotenv,
  pytest-timeout,
  pytestCheckHook,
  pythonOlder,
  requests,
  tqdm,

  # optional-dependencies
  matplotlib,
  scikit-image,
  scikit-learn,
  scipy,
  setuptools,
  tqdm,
  yt-dlp,

  # tests
  pytest-timeout,
  pytestCheckHook,
}:

buildPythonPackage rec {
@@ -26,8 +34,6 @@ buildPythonPackage rec {
  version = "2.1.2";
  pyproject = true;

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "Zulko";
    repo = "moviepy";
@@ -69,7 +75,8 @@ buildPythonPackage rec {

  pythonImportsCheck = [ "moviepy" ];

  disabledTests = [
  disabledTests =
    [
      # stalls
      "test_doc_examples"
      # video orientation mismatch, 0 != 180
@@ -82,6 +89,10 @@ buildPythonPackage rec {
      # Failed: DID NOT RAISE <class 'OSError'>
      "test_ffmpeg_resize"
      "test_ffmpeg_stabilize_video"
    ]
    ++ lib.optionals stdenv.hostPlatform.isDarwin [
      # Failed: Timeout >30.0s
      "test_issue_1682"
    ];

  disabledTestPaths = [
@@ -93,11 +104,11 @@ buildPythonPackage rec {
    "tests/test_videotools.py"
  ];

  meta = with lib; {
  meta = {
    description = "Video editing with Python";
    homepage = "https://zulko.github.io/moviepy/";
    changelog = "https://github.com/Zulko/moviepy/blob/${src.tag}/CHANGELOG.md";
    license = licenses.mit;
    changelog = "https://github.com/Zulko/moviepy/blob/v${version}/CHANGELOG.md";
    license = lib.licenses.mit;
    maintainers = [ ];
  };
}