[arch-commits] Commit in python-scipy/trunk (PKGBUILD fix-utf8.patch)

Antonio Rojas arojas at archlinux.org
Sat Jan 5 12:08:02 UTC 2019


    Date: Saturday, January 5, 2019 @ 12:08:01
  Author: arojas
Revision: 420672

Fix encoding errors in scipy.stats

Added:
  python-scipy/trunk/fix-utf8.patch
Modified:
  python-scipy/trunk/PKGBUILD

----------------+
 PKGBUILD       |   13 ++++++++++---
 fix-utf8.patch |   29 +++++++++++++++++++++++++++++
 2 files changed, 39 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-01-05 09:28:21 UTC (rev 420671)
+++ PKGBUILD	2019-01-05 12:08:01 UTC (rev 420672)
@@ -8,7 +8,7 @@
 _name=scipy
 pkgname=('python-scipy' 'python2-scipy')
 pkgver=1.2.0
-pkgrel=1
+pkgrel=2
 pkgdesc="SciPy is open-source software for mathematics, science, and engineering."
 arch=('x86_64')
 url="http://www.scipy.org/"
@@ -16,9 +16,16 @@
 makedepends=('gcc-fortran' 'python-numpy' 'python2-numpy' 'python-setuptools' 'python2-setuptools')
 checkdepends=('python-pytest' 'python2-pytest')
 #source=("https://github.com/scipy/scipy/releases/download/v${pkgver}/scipy-${pkgver}.tar.xz")
-source=("https://pypi.python.org/packages/source/${_name:0:1}/${_name}/${_name}-${pkgver}.tar.gz")
-md5sums=('e57011507865b0b702aff6077d412e03')
+source=("https://pypi.python.org/packages/source/${_name:0:1}/${_name}/${_name}-${pkgver}.tar.gz"
+        fix-utf8.patch)
+md5sums=('e57011507865b0b702aff6077d412e03'
+         '20712d0338980270f5f3edca4b3f17e4')
 
+prepare() {
+  cd scipy-${pkgver}
+  patch -p1 -i ../fix-utf8.patch # Fix unicode issues that prevent importing scipy.stats on py2
+}
+
 build() {
   # required for gfortran
   export LDFLAGS="-Wall -shared"

Added: fix-utf8.patch
===================================================================
--- fix-utf8.patch	                        (rev 0)
+++ fix-utf8.patch	2019-01-05 12:08:01 UTC (rev 420672)
@@ -0,0 +1,29 @@
+From 4a8a35f2c27be9f209cfc6f347e7a57a4a62e693 Mon Sep 17 00:00:00 2001
+From: Eric Larson <larson.eric.d at gmail.com>
+Date: Wed, 19 Dec 2018 10:50:47 -0500
+Subject: [PATCH] FIX: Fix encoding lines
+
+---
+ scipy/stats/_continuous_distns.py   | 1 +
+ scipy/stats/_stats_mstats_common.py | 3 +++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/scipy/stats/_continuous_distns.py b/scipy/stats/_continuous_distns.py
+index 44c05bb7d67..b48d7e7af32 100644
+--- a/scipy/stats/_continuous_distns.py
++++ b/scipy/stats/_continuous_distns.py
+@@ -1,3 +1,4 @@
++# -*- encoding: utf-8 -*-
+ #
+ # Author:  Travis Oliphant  2002-2011 with contributions from
+ #          SciPy Developers 2004-2011
+diff --git a/scipy/stats/_stats_mstats_common.py b/scipy/stats/_stats_mstats_common.py
+index e86c8287b48..be478da1f2a 100644
+--- a/scipy/stats/_stats_mstats_common.py
++++ b/scipy/stats/_stats_mstats_common.py
+@@ -1,3 +1,5 @@
++# -*- encoding: utf-8 -*-
++
+ from collections import namedtuple
+ 
+ import numpy as np



More information about the arch-commits mailing list