python310Packages.cython: Force regeneration of generated code in sdists
Lots of python packages seem to ship their source distributions with generated code. In recent cython versions there is a way to force a regeneration of these files and using it sounds generally sounds like a good thing. If it turns out, that this causes problems on individual packages, setting `dontForceRegenCython` will prevent the regeneration. Added in 3.0.0a11 and backported to 2.9.34, so both cython versions we ship right now support this flag.
This commit is contained in:
parent
6498700070
commit
c8ece5516e
2 changed files with 7 additions and 0 deletions
|
@ -74,6 +74,10 @@ in buildPythonPackage rec {
|
|||
doCheck = false;
|
||||
# doCheck = !stdenv.isDarwin;
|
||||
|
||||
# force regeneration of generated code in source distributions
|
||||
# https://github.com/cython/cython/issues/5089
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
meta = {
|
||||
changelog = "https://github.com/cython/cython/blob/${version}/CHANGES.rst";
|
||||
description = "An optimising static compiler for both the Python programming language and the extended Cython programming language";
|
||||
|
|
3
pkgs/development/python-modules/Cython/setup-hook.sh
Normal file
3
pkgs/development/python-modules/Cython/setup-hook.sh
Normal file
|
@ -0,0 +1,3 @@
|
|||
if [ -z "${dontForceRegenCython-}"]; then
|
||||
export CYTHON_FORCE_REGEN=1
|
||||
fi
|
Loading…
Reference in a new issue