Skip to content

Instantly share code, notes, and snippets.

@MechCoder
Last active August 29, 2015 14:00
Show Gist options
  • Save MechCoder/11349640 to your computer and use it in GitHub Desktop.
Save MechCoder/11349640 to your computer and use it in GitHub Desktop.
Setup cblas
from numpy.distutils.system_info import get_info
import os
from os.path import join
import numpy
def configuration():
from numpy.distutils.misc_util import Configuration
blas_info = get_info('blas_opt', 0)
blas_info.pop('libraries', None)
# I don't have cblas and use a posix machine.
cblas_libs = ['cblas', 'm']
config = Configuration('CyPractise')
config.add_extension('hello', sources=['hello.c'],
libraries=cblas_libs,
include_dirs=[join(os.getcwd(), 'cblas'),
numpy.get_include()])
return config
if __name__ == '__main__':
from numpy.distutils.core import setup
setup(**configuration().todict())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment