summaryrefslogtreecommitdiff
path: root/gnu/packages/python-xyz.scm
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2021-12-08 23:44:48 +0100
committerRicardo Wurmus <rekado@elephly.net>2021-12-09 11:17:45 +0100
commit3cd37c94bd92091d72c7437e1b250417ce297a6f (patch)
tree95c79c8a52a707bf54a5a01ff8c87a8d909ff391 /gnu/packages/python-xyz.scm
parentb69156ef3055bd1bd1cfd6da2c45356403d22226 (diff)
gnu: python2-matplotlib: Fix mpl_toolkits module.
* gnu/packages/python-xyz.scm (python2-matplotlib)[arguments]: Add phase 'create-init-file; restore 'sanity-check phase.
Diffstat (limited to 'gnu/packages/python-xyz.scm')
-rw-r--r--gnu/packages/python-xyz.scm9
1 files changed, 8 insertions, 1 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index e8e6cb20a8..96a77d8b58 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -6379,8 +6379,15 @@ toolkits.")
(invoke "unzip"
(assoc-ref inputs "jquery-ui")
"-d" dir))))
+ ;; Without this file mpl_toolkits cannot be imported.
+ (add-after 'install 'create-init-file
+ (lambda* (#:key outputs #:allow-other-keys)
+ (with-output-to-file
+ (string-append
+ (assoc-ref outputs "out")
+ "/lib/python2.7/site-packages/mpl_toolkits/__init__.py")
+ (lambda _ (display "")))))
(delete 'fix-and-disable-failing-tests)
- (delete 'sanity-check) ; This fails because mpl_toolkits is not an actual module
(delete 'check))))) ; These tests weren't run the the past.
;; Make sure to use special packages for Python 2 instead
;; of those automatically rewritten by package-with-python2.