summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonid Bloch2017-04-06 11:20:46 +0300
committerLeonid Bloch2017-04-06 11:20:46 +0300
commit419681b12388ba9870d32c77d114167d55fbfc4c (patch)
tree3c7afbea14a4c5a7f148a3978257096f0731e91a
parentb604188eda1d1f61b5dd95d44b02756b95fbb5ac (diff)
downloadaur-419681b12388ba9870d32c77d114167d55fbfc4c.tar.gz
Fix import error when starting fabio_viewer
Also remove git from makedepends (was a remnant from when it was pulled from the repo) and replace with cython - which is needed during the build. Signed-off-by: Leonid Bloch <leonid.bloch@esrf.fr>
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD13
-rw-r--r--pyqt4_qstring_fix.patch17
3 files changed, 30 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f78a8f6aaef..f60ddc6803b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,19 +1,21 @@
pkgbase = python-fabio
pkgdesc = I/O library for images produced by 2D X-ray detectors.
pkgver = 0.4.0
- pkgrel = 1
+ pkgrel = 2
url = http://www.silx.org
arch = any
license = MIT
license = LGPL
license = Apache
- makedepends = git
+ makedepends = cython
depends = python-numpy
depends = python-pillow
depends = python-lxml
optdepends = python-pyqt4: for the fabio_viewer program
source = https://github.com/silx-kit/fabio/archive/v0.4.0.tar.gz
+ source = pyqt4_qstring_fix.patch
sha256sums = ae1f2f979f801524558cac81ec8988d1eadce65b540cdeb46166162ae4788956
+ sha256sums = e10b98cce6465ac055b1b5744417b8ceb2d081ada3b9621f73651d0c2ad4f42b
pkgname = python-fabio
diff --git a/PKGBUILD b/PKGBUILD
index ace17a30126..1e598a894c0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,16 +2,21 @@
# Upstream contact: silx at esrf dot fr
pkgname=python-fabio
pkgver=0.4.0
-pkgrel=1
+pkgrel=2
pkgdesc="I/O library for images produced by 2D X-ray detectors."
arch=('any')
url="http://www.silx.org"
license=('MIT' 'LGPL' 'Apache')
depends=('python-numpy' 'python-pillow' 'python-lxml')
optdepends=('python-pyqt4: for the fabio_viewer program')
-makedepends=('git')
-source=("https://github.com/silx-kit/${pkgname#*-}/archive/v${pkgver}.tar.gz")
-sha256sums=('ae1f2f979f801524558cac81ec8988d1eadce65b540cdeb46166162ae4788956')
+makedepends=('cython')
+source=("https://github.com/silx-kit/${pkgname#*-}/archive/v${pkgver}.tar.gz" "pyqt4_qstring_fix.patch")
+sha256sums=('ae1f2f979f801524558cac81ec8988d1eadce65b540cdeb46166162ae4788956'
+ 'e10b98cce6465ac055b1b5744417b8ceb2d081ada3b9621f73651d0c2ad4f42b')
+
+prepare() {
+ patch -Np1 -i "pyqt4_qstring_fix.patch"
+}
build() {
cd "${pkgname#*-}-${pkgver}"
diff --git a/pyqt4_qstring_fix.patch b/pyqt4_qstring_fix.patch
new file mode 100644
index 00000000000..bd04bb47cf4
--- /dev/null
+++ b/pyqt4_qstring_fix.patch
@@ -0,0 +1,17 @@
+diff -ura src/fabio-0.4.0/scripts/fabio_viewer src_new/fabio-0.4.0/scripts/fabio_viewer
+--- src/fabio-0.4.0/scripts/fabio_viewer 2016-07-15 05:00:21.000000000 -0400
++++ src_new/fabio-0.4.0/scripts/fabio_viewer 2017-04-03 22:30:59.606912706 -0400
+@@ -22,7 +22,12 @@
+ import os
+ import time
+
+-from PyQt4.QtCore import QDir, Qt, QRect, QString, QCoreApplication
++from PyQt4.QtCore import QDir, Qt, QRect, QCoreApplication
++try:
++ from PyQt4.QtCore import QString
++except ImportError:
++ QString = str
++
+ from PyQt4.QtGui import QLabel, QVBoxLayout, QWidget, QSplitter, QListWidget, \
+ QComboBox, QApplication, QStyleFactory, QHBoxLayout, \
+ QTabWidget, QPlainTextEdit, QPushButton, QGroupBox, \