Commit 5620bda6 authored by Fabian Affolter's avatar Fabian Affolter Committed by Bjørn Forsman
Browse files

python311Packages.construct: refactor

- update ordering
- run nixpkgs-fmt
parent b7cedafe
Loading
Loading
Loading
Loading
+35 −11
Original line number Diff line number Diff line
{ lib, stdenv, buildPythonPackage, fetchFromGitHub, pythonOlder
, pytestCheckHook, pytest-benchmark, numpy, arrow, ruamel-yaml
, lz4, cloudpickle
{ lib
, stdenv
, arrow
, buildPythonPackage
, cloudpickle
, fetchFromGitHub
, lz4
, numpy
, pytest-benchmark
, pytestCheckHook
, pythonOlder
, ruamel-yaml
, setuptools
}:

buildPythonPackage rec {
  pname = "construct";
  version = "2.10.68";
  pyproject = true;

  disabled = pythonOlder "3.6";

  # no tests in PyPI tarball
  src = fetchFromGitHub {
    owner  = pname;
    repo   = pname;
    rev    = "v${version}";
    owner = "construct";
    repo = "construct";
    rev = "refs/tags/v${version}";
    hash = "sha256-bp/YyRFP0rrBHPyhiqnn6o1iC5l61oedShZ2phGeqaw=";
  };

  # not an explicit dependency, but it's imported by an entrypoint
  nativeBuildInputs = [
    setuptools
  ];

  propagatedBuildInputs = [
    # Not an explicit dependency, but it's imported by an entrypoint
    lz4
  ];

  nativeCheckInputs = [ pytestCheckHook numpy arrow ruamel-yaml cloudpickle ];
  nativeCheckInputs = [
    pytestCheckHook
    numpy
    arrow
    ruamel-yaml
    cloudpickle
  ];

  pythonImportsCheck = [
    "construct"
  ];

  disabledTests = [ "test_benchmarks" ] ++ lib.optionals stdenv.isDarwin [ "test_multiprocessing" ];
  disabledTests = [
    "test_benchmarks"
  ] ++ lib.optionals stdenv.isDarwin [
    "test_multiprocessing"
  ];

  meta = with lib; {
    description = "Powerful declarative parser (and builder) for binary data";