python311Packages.smartypants: avoid rebuild

This keeps 3.12 from 876379f883 but reverts 3.11 to avoid the rebuilds:
   8933 x86_64-darwin
  21912 x86_64-linux
This commit is contained in:
Vladimír Čunát 2024-02-24 09:31:48 +01:00
parent 3affb60f96
commit 49a820eae1
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA

View File

@ -1,5 +1,6 @@
{ 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
];
})
)