Unverified Commit 4385065b authored by Weijia Wang's avatar Weijia Wang Committed by GitHub
Browse files

Merge pull request #313631 from fabaff/pystatgrab-darwin

python312Packages.pystatgrab: refactor
parents 6f7c990b cb2a8487
Loading
Loading
Loading
Loading
+25 −25
Original line number Diff line number Diff line
{ lib
, stdenv
, buildPythonPackage
, cython
, fetchFromGitHub
, libstatgrab
, pkg-config
, pythonOlder
, setuptools
, unittestCheckHook
, wheel
, darwin
{
  lib,
  stdenv,
  buildPythonPackage,
  cython,
  fetchFromGitHub,
  libstatgrab,
  pkg-config,
  pythonOlder,
  setuptools,
  unittestCheckHook,
  wheel,
  darwin,
}:

buildPythonPackage rec {
@@ -26,31 +27,30 @@ buildPythonPackage rec {
    hash = "sha256-0FDhkIK8jy3/SFmCzrl9l4RTeIKDjO0o5UoODx6Wnfs=";
  };

  build-system = [
    setuptools
    wheel
  ];

  nativeBuildInputs = [
    cython
    pkg-config
    setuptools
    wheel
  ];

  buildInputs = [
    libstatgrab
  ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
    IOKit
  ]);
  ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ IOKit ]);

  nativeCheckInputs = [
    unittestCheckHook
  ];
  nativeCheckInputs = [ unittestCheckHook ];

  pythonImportsCheck = [
    "statgrab"
  ];
  pythonImportsCheck = [ "statgrab" ];

  meta = with lib; {
    description = "Python bindings for libstatgrab";
    homepage = "https://github.com/libstatgrab/pystatgrab";
    changelog = "https://github.com/libstatgrab/pystatgrab/blob/PYSTATGRAB_${lib.replaceStrings ["."] ["_"] version}/NEWS";
    changelog = "https://github.com/libstatgrab/pystatgrab/blob/PYSTATGRAB_${
      lib.replaceStrings [ "." ] [ "_" ] version
    }/NEWS";
    license = licenses.lgpl21Only;
    maintainers = with maintainers; [ fab ];
  };