Unverified Commit 94451b16 authored by Fabian Affolter's avatar Fabian Affolter Committed by GitHub
Browse files

Merge pull request #170267 from fabaff/pilkit-fix

python3Packages.pilkit: 2.0 -> unstable-2022-02-17
parents 56d6727b 559f41b0
Loading
Loading
Loading
Loading
+17 −13
Original line number Diff line number Diff line
{ lib, python3Packages, ffmpeg }:
{ lib
, python3
, ffmpeg
}:

python3Packages.buildPythonApplication rec {
  version = "2.2";
python3.pkgs.buildPythonApplication rec {
  pname = "sigal";
  version = "2.3";
  format = "setuptools";

  src = python3Packages.fetchPypi {
  src = python3.pkgs.fetchPypi {
    inherit version pname;
    sha256 = "sha256-49XsNdZuicsiYJZuF1UdqMA4q33Ly/Ug/Hc4ybJKmPo=";
    hash = "sha256-4Zsb/OBtU/jV0gThEYe8bcrb+6hW+hnzQS19q1H409Q=";
  };

  disabled = !(python3Packages.pythonAtLeast "3.6");

  propagatedBuildInputs = with python3Packages; [
  propagatedBuildInputs = with python3.pkgs; [
    # install_requires
    jinja2
    markdown
@@ -29,15 +31,17 @@ python3Packages.buildPythonApplication rec {

  checkInputs = [
    ffmpeg
  ] ++ (with python3Packages; [
  ] ++ (with python3.pkgs; [
    pytestCheckHook
  ]);

  makeWrapperArgs = [ "--prefix PATH : ${ffmpeg}/bin" ];
  makeWrapperArgs = [
    "--prefix PATH : ${lib.makeBinPath [ ffmpeg ]}"
  ];

  meta = with lib; {
    description = "Yet another simple static gallery generator";
    homepage    = "http://sigal.saimon.org/en/latest/index.html";
    homepage = "http://sigal.saimon.org/";
    license = licenses.mit;
    maintainers = with maintainers; [ domenkozar matthiasbeyer ];
  };
+29 −17
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchPypi
, pillow
, nose_progressive
, nose
, fetchFromGitHub
, mock
, blessings
, pillow
, pytestCheckHook
, pythonOlder
}:

buildPythonPackage rec {
  pname = "pilkit";
  version = "2.0";
  version = "unstable-2022-02-17";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchPypi {
    inherit pname version;
    sha256 = "ddb30c2f0198a147e56b151476c3bb9fe045fbfd5b0a0fa2a3148dba62d1559f";
  src = fetchFromGitHub {
    owner = "matthewwithanm";
    repo = pname;
    rev = "09ffa2ad33318ae5fd3464655c14c7f01ffc2097";
    hash = "sha256-jtnFffKr0yhSv2jBmXzPa6iP2r41MbmGukfmnvgABhk=";
  };

  preConfigure = ''
    substituteInPlace setup.py --replace 'nose==1.2.1' 'nose'
  '';
  buildInputs = [
    pillow
  ];

  # tests fail, see https://github.com/matthewwithanm/pilkit/issues/9
  doCheck = false;
  checkInputs = [
    mock
    pytestCheckHook
  ];

  buildInputs = [ pillow nose_progressive nose mock blessings ];
  postPatch = ''
    substituteInPlace tox.ini \
      --replace " --cov --cov-report term-missing:skip-covered" ""
  '';

  pythonImportsCheck = [
    "pilkit"
  ];

  meta = with lib; {
    homepage = "https://github.com/matthewwithanm/pilkit/";
    description = "A collection of utilities and processors for the Python Imaging Libary";
    homepage = "https://github.com/matthewwithanm/pilkit/";
    license = licenses.bsd0;
    maintainers = with maintainers; [ domenkozar ];
  };

}