diff options
| author | Marius Bakke <mbakke@fastmail.com> | 2020-03-15 13:30:11 +0100 |
|---|---|---|
| committer | Marius Bakke <mbakke@fastmail.com> | 2020-03-15 15:09:06 +0100 |
| commit | 3987715415532aea14c179650bac331ec436882c (patch) | |
| tree | c9e5d0da9c3945a9b190c6659dd1e6f8e9abd8a1 /gnu/packages/python-science.scm | |
| parent | 382550f0be8f0023068dbd7005f0a29efeeea455 (diff) | |
gnu: python2-pandas: Fix build with Python 2.7.17.
While at it, fix the inheritance.
* gnu/packages/python-science.scm (python2-pandas): Use INHERIT instead of
PACKAGE/INHERIT.
[source](modules, snippet): New fields.
Diffstat (limited to 'gnu/packages/python-science.scm')
| -rw-r--r-- | gnu/packages/python-science.scm | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index 8dcc6e77e64..4b3db6d5e09 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | ;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com> | 4 | ;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com> |
| 5 | ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com> | 5 | ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com> |
| 6 | ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> | 6 | ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> |
| 7 | ;;; Copyright © 2016, 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com> | 7 | ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com> |
| 8 | ;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr> | 8 | ;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr> |
| 9 | ;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com> | 9 | ;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com> |
| 10 | ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org> | 10 | ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org> |
| @@ -277,12 +277,21 @@ doing practical, real world data analysis in Python.") | |||
| 277 | (define-public python2-pandas | 277 | (define-public python2-pandas |
| 278 | (let ((pandas (package-with-python2 | 278 | (let ((pandas (package-with-python2 |
| 279 | (strip-python2-variant python-pandas)))) | 279 | (strip-python2-variant python-pandas)))) |
| 280 | (package/inherit | 280 | (package |
| 281 | pandas | 281 | (inherit pandas) |
| 282 | (version "0.24.2") | 282 | (version "0.24.2") |
| 283 | (source (origin | 283 | (source (origin |
| 284 | (method url-fetch) | 284 | (method url-fetch) |
| 285 | (uri (pypi-uri "pandas" version)) | 285 | (uri (pypi-uri "pandas" version)) |
| 286 | (sha256 | 286 | (sha256 |
| 287 | (base32 | 287 | (base32 |
| 288 | "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag"))))))) | 288 | "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag")) |
| 289 | (modules '((guix build utils))) | ||
| 290 | (snippet | ||
| 291 | '(begin | ||
| 292 | ;; Adjust for renamed error message in Python 2.7.17. Taken | ||
| 293 | ;; from <https://github.com/pandas-dev/pandas/pull/29294>. | ||
| 294 | (substitute* "pandas/io/parsers.py" | ||
| 295 | (("if 'NULL byte' in msg:") | ||
| 296 | "if 'NULL byte' in msg or 'line contains NUL' in msg:")) | ||
| 297 | #t))))))) | ||
