Fix setup script

Former-commit-id: 4bdcd71e2aaea284eccc4d85bc128110d16c5220
This commit is contained in:
Marek Nečada 2017-05-03 08:30:05 +03:00
parent 0643ff4b3e
commit 8815708e11
1 changed files with 7 additions and 3 deletions

View File

@ -14,21 +14,25 @@ import os
print("You might want to add additional library path to LD_LIBRARY_PATH (especially if you are not using" print("You might want to add additional library path to LD_LIBRARY_PATH (especially if you are not using"
" GNU GSL in your system library path) and if import fails. ") " GNU GSL in your system library path) and if import fails. ")
print(os.environ['LD_LIBRARY_PATH'].split(':')) if(os.environ.has_key("LD_LIBRARY_PATH")):
print(os.environ['LD_LIBRARY_PATH'].split(':'))
qpms_c = Extension('qpms_c', qpms_c = Extension('qpms_c',
sources = ['qpms/qpms_c.pyx','qpms/gaunt.c',#'qpms/gaunt.h','qpms/vectors.h','qpms/translations.h', sources = ['qpms/qpms_c.pyx','qpms/gaunt.c',#'qpms/gaunt.h','qpms/vectors.h','qpms/translations.h',
# FIXME http://stackoverflow.com/questions/4259170/python-setup-script-extensions-how-do-you-include-a-h-file # FIXME http://stackoverflow.com/questions/4259170/python-setup-script-extensions-how-do-you-include-a-h-file
'qpms/translations.c'], 'qpms/translations.c'],
extra_compile_args=['-std=c99','-ggdb','-O3', extra_compile_args=['-std=c99','-ggdb','-O3',
'-DQPMS_COMPILE_PYTHON_EXTENSIONS', # this is required
#'-DQPMS_USE_OMP',
'-DDISABLE_NDEBUG', # uncomment to enable assertions in the modules '-DDISABLE_NDEBUG', # uncomment to enable assertions in the modules
#'-fopenmp',
], ],
libraries=['gsl', 'blas', 'omp'], libraries=['gsl', 'blas', 'omp'],
runtime_library_dirs=os.environ['LD_LIBRARY_PATH'].split(':') runtime_library_dirs=os.environ['LD_LIBRARY_PATH'].split(':') if os.environ.has_key['LD_LIBRARY_PATH'] else []
) )
setup(name='qpms', setup(name='qpms',
version = "0.2.0", version = "0.2.8",
packages=['qpms'], packages=['qpms'],
# setup_requires=['setuptools_cython'], # setup_requires=['setuptools_cython'],
install_requires=['cython>=0.21','quaternion','spherical_functions','py_gmm'], install_requires=['cython>=0.21','quaternion','spherical_functions','py_gmm'],