Unverified Commit 49a820ea authored by Vladimír Čunát's avatar Vladimír Čunát
Browse files

python311Packages.smartypants: avoid rebuild

This keeps 3.12 from 876379f8 but reverts 3.11 to avoid the rebuilds:
   8933 x86_64-darwin
  21912 x86_64-linux
parent 3affb60f
Loading
Loading
Loading
Loading
+22 −15
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, python
, fetchFromGitHub
, fetchpatch2
, isPyPy
@@ -9,10 +10,9 @@
, pytestCheckHook
}:

buildPythonPackage rec {
buildPythonPackage (rec {
  version = "2.0.1";
  pname = "smartypants";
  pyproject = true;

  disabled = isPyPy;

@@ -23,19 +23,6 @@ buildPythonPackage rec {
    sha256 = "00p1gnb9pzb3svdq3c5b9b332gsp50wrqqa39gj00m133zadanjp";
  };

  patches = [
    (fetchpatch2 {
      # https://github.com/leohemsted/smartypants.py/pull/21
      name = "smartypants-3.12-compat.patch";
      url = "https://github.com/leohemsted/smartypants.py/commit/ea46bf36343044a7a61ba3acce4a7f188d986ec5.patch";
      hash = "sha256-9lsiiZKFFKHLy7j3y9ff4gt01szY+2AHpWPAKQgKwZg=";
    })
  ];

  nativeBuildInputs = [
    setuptools
  ];

  nativeCheckInputs = [
    docutils
    pygments
@@ -53,3 +40,23 @@ buildPythonPackage rec {
    maintainers = with maintainers; [ dotlambda ];
  };
}
  # FIXME: just avoiding large rebuild, we'll revert this commit
  // (if lib.versionOlder python.version "3.12" then {
    format = "setuptools";
  } else {
    pyproject = true;

    patches = [
      (fetchpatch2 {
        # https://github.com/leohemsted/smartypants.py/pull/21
        name = "smartypants-3.12-compat.patch";
        url = "https://github.com/leohemsted/smartypants.py/commit/ea46bf36343044a7a61ba3acce4a7f188d986ec5.patch";
        hash = "sha256-9lsiiZKFFKHLy7j3y9ff4gt01szY+2AHpWPAKQgKwZg=";
      })
    ];

    nativeBuildInputs = [
      setuptools
    ];
  })
)