Skip to content

Commit

Permalink
python3.pkgs.tinycss: fix build
Browse files Browse the repository at this point in the history
The build was broken by the python 3.7 switch, which caused an
incompatible change in the way cython generates files:

Kozea/tinycss#17

This is solved by removing the pre-generated file and re-generating it
at build time.
  • Loading branch information
timokau committed Jan 12, 2019
1 parent a4fa9e8 commit 934fabf
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pkgs/development/python-modules/tinycss/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
, fetchPypi
, pytest
, python
, cython
, cssutils
, isPyPy
}:
Expand All @@ -18,6 +19,17 @@ buildPythonPackage rec {

checkInputs = [ pytest ];
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 = ''
py.test $out/${python.sitePackages}
Expand Down

0 comments on commit 934fabf

Please sign in to comment.