from distutils.core import setup
from distutils.extension import Extension

try:
	from Cython.Distutils import build_ext
except:
	print "Cannot find Cython.distutils.   You may not have cython installed."
	print "Look at http://www.cython.org ."
	sys.exit(1)

import os
GPKhome = '/scratch/gpk/stable'
import gmisclib.Num as Num
Include_dirs = [ '.', Num.get_include(), os.path.join(GPKhome, 'include') ]
LibDirs = [ '.', os.path.join(GPKhome, 'lib'),
		'/usr/local/lib64', '/usr/local/lib' ]

setup(
	name = "bsr_analysis", version='0.3.1',
	description = "ZZZ",
	author = "Greg Kochanski",
	url = "http://kochanski.org/gpk",
	author_email = "gpk@kochanski.org",
	scripts = ['bin/bsr_analysis.py'],
	ext_modules=[ 
		Extension("bsr_analysis_guts",
				["lib/bsr_analysis_guts.pyx", 'lib/lawcjcrk.cpp'],
				include_dirs = Include_dirs,
				library_dirs = LibDirs,
				libraries = ['gpk', 'gsl', 'gslcblas'],
				depends = ['lib/lawcjcrk.h'],
				extra_compile_args=['-g', '-UNDEBUG'],
				# extra_link_args=['-g']
				language = "c++",
				),
		],
	include_dirs = [
			Num.get_include()
			],
	cmdclass = {'build_ext': build_ext},
	license = 'GPL2',
	keywords = "misc",
	platforms = "All",
	classifiers = [
		'License :: OSI Approved :: GNU General Public License (GPL)',
		'Operating System :: OS Independent',
		'Development Status :: 3 - Alpha',
		'Topic :: Scientific/Engineering',
		'Environment :: Console',
		'Intended Audience :: End Users/Desktop',
		'Intended Audience :: Science/Research',
		'Programming Language :: Python',
		# X11
		'Operating System :: OS Independent',
		'Programming Language :: Python',
		],
	long_description = """Long
	"""
	)
