diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/smartypants/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/smartypants/default.nix | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/smartypants/default.nix b/nixpkgs/pkgs/development/python-modules/smartypants/default.nix index 0e5ef76927e4..5094287fcfaf 100644 --- a/nixpkgs/pkgs/development/python-modules/smartypants/default.nix +++ b/nixpkgs/pkgs/development/python-modules/smartypants/default.nix @@ -1,16 +1,19 @@ { lib , buildPythonPackage +, python , fetchFromGitHub +, fetchpatch2 , isPyPy +, setuptools , docutils , pygments , pytestCheckHook }: -buildPythonPackage rec { +buildPythonPackage (rec { version = "2.0.1"; - format = "setuptools"; pname = "smartypants"; + disabled = isPyPy; src = fetchFromGitHub { @@ -37,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 + ]; + }) +) |