python3.pkgs.tinycss: fix build (#53831)
The build was broken by the python 3.7 switch, which caused an incompatible change in the way cython generates files: https://github.com/Kozea/tinycss/issues/17 This is solved by removing the pre-generated file and re-generating it at build time.
This commit is contained in:
parent
768d876394
commit
6359e9baf0
|
@ -3,6 +3,7 @@
|
||||||
, fetchPypi
|
, fetchPypi
|
||||||
, pytest
|
, pytest
|
||||||
, python
|
, python
|
||||||
|
, cython
|
||||||
, cssutils
|
, cssutils
|
||||||
, isPyPy
|
, isPyPy
|
||||||
}:
|
}:
|
||||||
|
@ -18,6 +19,17 @@ buildPythonPackage rec {
|
||||||
|
|
||||||
checkInputs = [ pytest ];
|
checkInputs = [ pytest ];
|
||||||
propagatedBuildInputs = [ cssutils ];
|
propagatedBuildInputs = [ cssutils ];
|
||||||
|
nativeBuildInputs = [
|
||||||
|
cython
|
||||||
|
];
|
||||||
|
|
||||||
|
preBuild = ''
|
||||||
|
# Force cython to re-generate this file. If it is present, cython will
|
||||||
|
# think it is "up to date" even though it was generated with an older,
|
||||||
|
# incompatible version of cython. See
|
||||||
|
# https://github.com/Kozea/tinycss/issues/17.
|
||||||
|
rm tinycss/speedups.c
|
||||||
|
'';
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
py.test $out/${python.sitePackages}
|
py.test $out/${python.sitePackages}
|
||||||
|
|
Loading…
Reference in New Issue