27448383b6
This makes it build for me.
43 lines
1.7 KiB
Text
43 lines
1.7 KiB
Text
$NetBSD: patch-aa,v 1.7 2011/12/18 21:32:08 dholland Exp $
|
|
|
|
- configure compiler for pkgsrc
|
|
- allow BLAS_LIBS to be empty
|
|
- handle extra_link_args correctly
|
|
- accept pkgsrc-reported link args
|
|
|
|
--- setup.py.orig 2010-05-16 12:23:30.000000000 +0000
|
|
+++ setup.py
|
|
@@ -1,5 +1,12 @@
|
|
|
|
import os, os.path, sys, shutil, re, itertools
|
|
+import distutils.sysconfig
|
|
+old_customize_compiler = distutils.sysconfig.customize_compiler
|
|
+def customize_compiler(compiler):
|
|
+ old_customize_compiler(compiler)
|
|
+ compiler.set_executables(linker_so=os.environ['FC'] + ' -shared')
|
|
+distutils.sysconfig.customize_compiler = customize_compiler
|
|
+
|
|
from distutils.command.build_ext import build_ext as _build_ext
|
|
from distutils.command.build import build as _build
|
|
|
|
@@ -130,10 +137,10 @@ class build_ext(_build_ext):
|
|
extra_link_args = get_rconfig(r_home, '--ldflags') +\
|
|
get_rconfig(r_home, 'LAPACK_LIBS',
|
|
allow_empty=True) +\
|
|
- get_rconfig(r_home, 'BLAS_LIBS')
|
|
+ get_rconfig(r_home, 'BLAS_LIBS', allow_empty=True)
|
|
|
|
for e in self.extensions:
|
|
- e.extra_compile_args.extend(extra_link_args)
|
|
+ e.extra_link_args.extend(extra_link_args)
|
|
|
|
def run(self):
|
|
_build_ext.run(self)
|
|
@@ -180,6 +187,7 @@ def get_rconfig(r_home, about, allow_emp
|
|
#sanity check of what is returned into rconfig
|
|
rconfig_m = None
|
|
possible_patterns = ('^(-L.+) (-l.+)$',
|
|
+ '^(-Wl,-R.+) (-L.+) (-l.+)$',
|
|
'^(-l.+)$', # fix for the case -lblas is returned
|
|
'^(-F.+? -framework .+)$', # fix for MacOS X
|
|
'^(-framework .+)$',
|