[clblas] 68/125: Updated setup.py file to add appropriate paths for 64-bit and Linux

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Fri May 29 06:57:23 UTC 2015


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch master
in repository clblas.

commit a731a5ca8c9d220fa705e087432dd4ab0f1e91d7
Author: Kent Knox <kent.knox at amd>
Date:   Tue May 13 10:50:01 2014 -0500

    Updated setup.py file to add appropriate paths for 64-bit and Linux
---
 src/wrappers/python/README.txt |  2 +-
 src/wrappers/python/setup.py   | 13 ++++++++++++-
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/wrappers/python/README.txt b/src/wrappers/python/README.txt
index 0a8a961..10c3cf8 100644
--- a/src/wrappers/python/README.txt
+++ b/src/wrappers/python/README.txt
@@ -9,7 +9,7 @@ Dependencies:
 3.  Cython from http://cython.org/, ( 0.18 minimum )
 4.  OpenCL runtime, such as AMD's catalyst package ( AMD v2.9 SDK tested )
 
-NOTE:  This has only been tested with 32-bit python on windows
+NOTE:  This has been tested with 32-bit python on windows & 64-bit on OpenSUSE
 
 NOTE:  Only sgemm has been wrapped as proof-of-concept
 
diff --git a/src/wrappers/python/setup.py b/src/wrappers/python/setup.py
index b87aa95..7092714 100644
--- a/src/wrappers/python/setup.py
+++ b/src/wrappers/python/setup.py
@@ -19,6 +19,7 @@ from distutils.extension import Extension
 from Cython.Distutils import build_ext
 from os import path, environ
 import argparse
+import platform
 
 def main():
    parser = argparse.ArgumentParser(description='Set up the pyclBLAS extension module')
@@ -70,12 +71,22 @@ def main():
      print( "or pass the command line option --clBlasRoot" )
      exit( )
 
+   # 64bit and 32bit have different library paths
+   if( platform.architecture( )[0] == '64bit' ):
+     libraryPath = 'lib64'
+   else:
+     libraryPath = 'lib'
+
+   # Windows and linux have different library paths
+   if( platform.system( ) == 'Windows' ):
+     libraryPath = path.join( libraryPath, 'import' )
+
    module = [
      Extension( name = 'pyclBLAS',
                sources = ['pyclBLAS.pyx'],
                include_dirs = [ path.join( clRootPath, 'include' ),
                                 path.join( clBlasRootPath, 'include' ) ],
-               library_dirs = [ path.join( clBlasRootPath, 'lib', 'import' ) ],
+               library_dirs = [ path.join( clBlasRootPath, libraryPath ) ],
                libraries=['clBLAS'] )
    ]
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/clblas.git



More information about the debian-science-commits mailing list