summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChad Voegele2017-01-04 18:07:36 -0600
committerChad Voegele2017-01-04 18:07:36 -0600
commit4ad4d9790aa9088402481d92e54e22cfc06d0d3d (patch)
treeb763be8b1dad3b2b5a4ebf7ffe915ac0678c4f62
parent25c0c89f9ddbbd341ada8e5c739dbd87c158f7f2 (diff)
downloadaur-python-spams-svn.tar.gz
Get Python include path automatically.
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD5
-rw-r--r--python-spams.patch15
3 files changed, 16 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ecf7f1d3223..64990de8d93 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,8 @@
# Generated by mksrcinfo v8
-# Sun Apr 24 13:37:28 UTC 2016
+# Thu Jan 5 00:07:20 UTC 2017
pkgbase = python-spams-svn
pkgdesc = Optimization toolbox for solving various sparse estimation problems with Python interface
- pkgver = 20160424
+ pkgver = 20170104
pkgrel = 1
url = http://spams-devel.gforge.inria.fr/
arch = i686
@@ -12,7 +12,7 @@ pkgbase = python-spams-svn
depends = python-scipy
source = python-spams.patch
source = svn+svn://scm.gforge.inria.fr/svnroot/spams-devel/trunk
- md5sums = 4d3ea03f84ff1878d8c19d79e7149fb7
+ md5sums = 6a34cc994d2563c497fa4e4478ac6b10
md5sums = SKIP
pkgname = python-spams-svn
diff --git a/PKGBUILD b/PKGBUILD
index ac86b56181c..4c0539fff6d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
# Contributor: Chad Voegele
pkgname=python-spams-svn
-pkgver=20160424
+pkgver=20170104
pkgrel=1
arch=('i686' 'x86_64')
license=('GPL3')
@@ -13,8 +13,7 @@ depends=('python-scipy')
makedepends=('swig')
source=("python-spams.patch"
"svn+svn://scm.gforge.inria.fr/svnroot/spams-devel/trunk")
-
-md5sums=('4d3ea03f84ff1878d8c19d79e7149fb7'
+md5sums=('6a34cc994d2563c497fa4e4478ac6b10'
'SKIP')
build() {
diff --git a/python-spams.patch b/python-spams.patch
index dd7c7fa45ac..4784767758f 100644
--- a/python-spams.patch
+++ b/python-spams.patch
@@ -19,8 +19,8 @@ diff -Naur trunka/swig/python/mkpy trunk/swig/python/mkpy
-INC="-I. -Ispams/linalg -Ispams/prox -Ispams/decomp -Ispams/dictLearn -I/usr/include/python2.7/"
-INC_PYTHON=-I/usr/include/python2.6
-+INC="-I. -Ispams/linalg -Ispams/prox -Ispams/decomp -Ispams/dictLearn -I/usr/include/python3.5m/"
-+INC_PYTHON=-I/usr/include/python3.5m
++INC_PYTHON=$(python -c "from distutils.sysconfig import get_python_inc; print('-I'+get_python_inc())")
++INC="-I. -Ispams/linalg -Ispams/prox -Ispams/decomp -Ispams/dictLearn ${INC_PYTHON}"
XCCFLAGS=""
XLINKFLAGS=""
# on MacOS, use following definition instead.
@@ -90,12 +90,19 @@ diff -Naur trunka/swig/python/py_typemaps.i trunk/swig/python/py_typemaps.i
diff -Naur trunka/swig/python/setup.py.in trunk/swig/python/setup.py.in
--- trunka/swig/python/setup.py.in 2016-04-24 08:33:27.342411134 -0500
+++ trunk/swig/python/setup.py.in 2016-04-24 08:34:03.125869367 -0500
-@@ -7,7 +7,7 @@
+@@ -1,13 +1,14 @@
+ import os
+ #os.environ['DISTUTILS_DEBUG'] = "1"
+ from distutils.core import setup, Extension
++from distutils.sysconfig import get_python_inc
+ import distutils.util
+ import numpy
+
# includes numpy : package numpy.distutils , numpy.get_include()
# python setup.py build --inplace
# python setup.py install --prefix=dist,
-incs = ['.'] + map(lambda x: os.path.join('spams',x),[ 'linalg', 'prox', 'decomp', 'dictLearn']) + [numpy.get_include()] + ['/usr/include/python2.7/']
-+incs = ['.'] + [os.path.join('spams',x) for x in [ 'linalg', 'prox', 'decomp', 'dictLearn']] + [numpy.get_include()] + ['/usr/include/python3.5m/']
++incs = ['.'] + [os.path.join('spams',x) for x in [ 'linalg', 'prox', 'decomp', 'dictLearn']] + [numpy.get_include()] + [get_python_inc()]
osname = distutils.util.get_platform()
cc_flags = ['-fPIC', '-fopenmp']