Unverified Commit 5e57e4ec authored by Toma's avatar Toma Committed by GitHub
Browse files

python312Packages.loopy: 2024.1 -> 2025.1 (#404179)

parents c31d6cf2 7585a995
Loading
Loading
Loading
Loading
+45 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  hatchling,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "constantdict";
  version = "2025.1.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "matthiasdiener";
    repo = "constantdict";
    tag = "v${version}";
    hash = "sha256-M3duCafyJk/W3KIqP43ErXr/EfCj6/Sin6eCaaxyI5g=";
  };

  build-system = [
    hatchling
  ];

  pythonImportsCheck = [
    "constantdict"
  ];

  # Assumes that unpickling a pickled dict in a different Python process will result in a different hash.
  # This doesn't seem to work in the Nix sandbox but works fine in a normal environment.
  disabledTests = [
    "test_pickle_hash"
  ];

  nativeCheckInputs = [ pytestCheckHook ];

  meta = {
    homepage = "https://matthiasdiener.github.io/constantdict";
    downloadPage = "https://github.com/matthiasdiener/constantdict";
    description = "Immutable dictionary class for Python, implemented as a thin layer around Python's builtin dict class";
    changelog = "https://github.com/matthiasdiener/constantdict/releases/tag/${src.tag}";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ qbisi ];
  };
}
+43 −27
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  buildPythonPackage,
  codepy,
  cgen,
  colorama,
  pythonOlder,
  fetchFromGitHub,
  writableTmpDirAsHomeHook,

  # build-system
  hatchling,

  # dependencies
  pytools,
  pymbolic,
  genpy,
  immutables,
  numpy,
  cgen,
  islpy,
  codepy,
  colorama,
  mako,
  numpy,
  pymbolic,
  pyopencl,
  pyrsistent,
  pythonOlder,
  pytools,
  setuptools,
  constantdict,
  typing-extensions,

  # optional-dependencies
  pyopencl,
  fparser,
  ply,
}:

buildPythonPackage rec {
  pname = "loopy";
  version = "2024.1";
  version = "2025.1";
  pyproject = true;

  disabled = pythonOlder "3.8";
  disabled = pythonOlder "3.10";

  src = fetchFromGitHub {
    owner = "inducer";
    repo = "loopy";
    tag = "v${version}";
    hash = "sha256-mU8vXEPR88QpJpzXZlZdDhMtlwIx5YpeYhXU8Vw2T9g=";
    hash = "sha256-3Ebnje+EBw2Jdp2xLqffWx592OoUrSdRDXQkw6FpEzc=";
    fetchSubmodules = true; # submodule at `loopy/target/c/compyte`
  };

  build-system = [ setuptools ];
  build-system = [ hatchling ];

  nativeBuildInputs = [ writableTmpDirAsHomeHook ];

  dependencies = [
    codepy
    cgen
    colorama
    pytools
    pymbolic
    genpy
    immutables
    numpy
    cgen
    islpy
    codepy
    colorama
    mako
    numpy
    pymbolic
    pyopencl
    pyrsistent
    pytools
    constantdict
    typing-extensions
  ];

  postConfigure = ''
    export HOME=$(mktemp -d)
  '';
  optional-dependencies = {
    pyopencl = [
      pyopencl
    ];
    fortran = [
      fparser
      ply
    ];
  };

  pythonImportsCheck = [ "loopy" ];

@@ -64,6 +79,7 @@ buildPythonPackage rec {
  meta = {
    description = "Code generator for array-based code on CPUs and GPUs";
    homepage = "https://github.com/inducer/loopy";
    changelog = "https://github.com/inducer/loopy/releases/tag/${src.tag}";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ tomasajt ];
  };
+2 −0
Original line number Diff line number Diff line
@@ -2803,6 +2803,8 @@ self: super: with self; {
  consonance = callPackage ../development/python-modules/consonance { };
  constantdict = callPackage ../development/python-modules/constantdict { };
  constantly = callPackage ../development/python-modules/constantly { };
  construct = callPackage ../development/python-modules/construct { };