unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Bonface M. K." <bonfacemunyoki@gmail.com>
To: 44017@debbugs.gnu.org
Subject: [bug#44017] [PATCH] Fix python2-pandas build failure
Date: Thu, 15 Oct 2020 19:59:25 +0300	[thread overview]
Message-ID: <867drr8lxu.fsf@gmail.com> (raw)
In-Reply-To: <86blh38m5y.fsf@gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 79 bytes --]


Find attached patches that address a build failure
regarding python2-pandas.


[-- Attachment #1.2: 0001-gnu-Add-python2-openpyxl.patch --]
[-- Type: text/x-patch, Size: 1757 bytes --]

From ef440e6fe40d707050d4fd057e61535a4e54f3c6 Mon Sep 17 00:00:00 2001
From: BonfaceKilz <bonfacemunyoki@gmail.com>
Date: Thu, 15 Oct 2020 19:39:38 +0300
Subject: [PATCH 1/2] gnu: Add python2-openpyxl.

* gnu/packages/python-xyz.scm (python2-openpyxl): New package.
---
 gnu/packages/python-xyz.scm | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 56c7bb84ab..000061f0a3 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -85,6 +85,7 @@
 ;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
 ;;; Copyright © 2020 Hendursaga <hendursaga@yahoo.com>
 ;;; Copyright © 2020 Malte Frank Gerdes <malte.f.gerdes@gmail.com>
+;;; Copyright © 2020 Kilyungi Bonface Munyoki <bonfacemunyoki@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1666,6 +1667,23 @@ XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
 standard.")
     (license license:expat)))
 
+(define-public python2-openpyxl
+  (let ((base (package-with-python2
+               (strip-python2-variant python-openpyxl))))
+    (package (inherit base)
+             ;; This is the latest version that has python2 support
+             (version "2.6.4")
+             (arguments
+              ;; Has no tests
+              '(#:tests? #f))
+             (source
+              (origin
+                (method url-fetch)
+                (uri (pypi-uri "openpyxl" version))
+                (sha256
+                 (base32
+                  "1qzjj8nwj4dn0mhq1j64f136afiqqb81lvqiikipz3g1g0b80lqx")))))))
+
 (define-public python-eventlet
   (package
     (name "python-eventlet")
-- 
2.28.0


[-- Attachment #1.3: 0002-gnu-python2-pandas-Fix-build-by-using-python2-openpy.patch --]
[-- Type: text/x-patch, Size: 1860 bytes --]

From 4081475706ef75c67d705501077a19d74b72d763 Mon Sep 17 00:00:00 2001
From: BonfaceKilz <bonfacemunyoki@gmail.com>
Date: Thu, 15 Oct 2020 19:42:53 +0300
Subject: [PATCH 2/2] gnu: python2-pandas: Fix build by using
 python2-openpyxl-2.6.4

* gnu/packages/python-science.scm: Import srfi-1.
(python-pandas)[propagated-inputs]: Use python2-openpyxyl
---
 gnu/packages/python-science.scm | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 101c8fb640..2c47177a4a 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -10,6 +10,7 @@
 ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
 ;;; Copyright © 2020 Pierre Langlois <pierre.langlois@gmx.com>
 ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
+;;; Copyright © 2020 Kilyungi Bonface Munyoki <bonfacemunyoki@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -45,7 +46,8 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix utils)
-  #:use-module (guix build-system python))
+  #:use-module (guix build-system python)
+  #:use-module (srfi srfi-1))
 
 (define-public python-scipy
   (package
@@ -407,7 +409,11 @@ doing practical, real world data analysis in Python.")
                     (substitute* "pandas/io/parsers.py"
                       (("if 'NULL byte' in msg:")
                        "if 'NULL byte' in msg or 'line contains NUL' in msg:"))
-                    #t)))))))
+                    #t))))
+      (propagated-inputs
+       `(("python-openpyxl" ,python2-openpyxl)
+         ,@(alist-delete "python-openpyxl"
+                        (package-propagated-inputs pandas)))))))
 
 (define-public python-bottleneck
   (package
-- 
2.28.0


[-- Attachment #1.4: Type: text/plain, Size: 216 bytes --]


-- 
Bonface M. K. <https://www.bonfacemunyoki.com> 
Chief Emacs Mchochezi / Rieng ya software sare
Curator of <https://upbookclub.com> / Twitter: @BonfaceKilz
GPG Key: D4F09EB110177E03C28E2FE1F5BBAE1E0392253F

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 869 bytes --]

  reply	other threads:[~2020-10-15 17:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-15 16:54 [bug#44017] [PATCH] Fix python2-pandas build failure Bonface M. K.
2020-10-15 16:59 ` Bonface M. K. [this message]
2020-10-15 17:36   ` Xavier lenato
2020-10-18 11:38   ` bug#44017: " Efraim Flashner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=867drr8lxu.fsf@gmail.com \
    --to=bonfacemunyoki@gmail.com \
    --cc=44017@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).