about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTimo Kaufmann <timokau@zoho.com>2019-01-12 11:24:31 +0100
committerRobert Schütz <rschuetz17@gmail.com>2019-01-12 11:24:31 +0100
commit6359e9baf01a7bdc37f18a6eda7b6953e95318f0 (patch)
treea59c273efb3aab46f46e3119caa214bd1b5debae
parent768d8763942e15e4815283494fb633f08a119b53 (diff)
downloadnixlib-6359e9baf01a7bdc37f18a6eda7b6953e95318f0.tar
nixlib-6359e9baf01a7bdc37f18a6eda7b6953e95318f0.tar.gz
nixlib-6359e9baf01a7bdc37f18a6eda7b6953e95318f0.tar.bz2
nixlib-6359e9baf01a7bdc37f18a6eda7b6953e95318f0.tar.lz
nixlib-6359e9baf01a7bdc37f18a6eda7b6953e95318f0.tar.xz
nixlib-6359e9baf01a7bdc37f18a6eda7b6953e95318f0.tar.zst
nixlib-6359e9baf01a7bdc37f18a6eda7b6953e95318f0.zip
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.
-rw-r--r--pkgs/development/python-modules/tinycss/default.nix12
1 files changed, 12 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/tinycss/default.nix b/pkgs/development/python-modules/tinycss/default.nix
index ab6a4183df50..223d778095af 100644
--- a/pkgs/development/python-modules/tinycss/default.nix
+++ b/pkgs/development/python-modules/tinycss/default.nix
@@ -3,6 +3,7 @@
 , fetchPypi
 , pytest
 , python
+, cython
 , cssutils
 , isPyPy
 }:
@@ -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}