We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fyi i had to add 'libs' to library_dirs and include_dirs in setup.py in order for this to build for python.
#!/usr/bin/env python """ setup.py file for SWIG """ from setuptools import Extension, setup, find_packages import distutils.command.build import sysconfig import numpy import os import shutil # Obtain the numpy include directory. This logic works across numpy versions. try: numpy_include = numpy.get_include() except AttributeError: numpy_include = numpy.get_numpy_include() libraries = ['fftw3f'] comp_args = ["/arch:AVX", "/O2", "/openmp"] link_args = [] files2 = ["omp.h", "fftw3.h", "fftw3f.dll", "fftw3f.lib", "libfftw3fmac.a", "libfftw3f_ompmac.a", "libfftw3fl.so", "libfftw3f_ompl.so", "libomp.a" ] files = [ "fcwt.h", "fcwt.cpp" ] files = files + files2 if "macosx" in sysconfig.get_platform() or "darwin" in sysconfig.get_platform(): libraries = ['fftw3fmac', 'fftw3f_ompmac'] comp_args = ["-mavx", "-O3"] link_args = ["-lomp"] if "linux" in sysconfig.get_platform(): libraries = ['fftw3fl', 'fftw3f_ompl'] comp_args = ["-mavx", "-O3"] link_args = ["-lomp"] setup(ext_modules=[ Extension('fcwt._fcwt', sources=[ 'src/fcwt/fcwt.cpp', 'src/fcwt/fcwt_wrap.cxx' ], library_dirs=['src/fcwt', 'src', 'libs'], include_dirs=['src/fcwt', 'src', 'libs', numpy_include], libraries=libraries, extra_compile_args=comp_args, extra_link_args=link_args ) ], packages=find_packages(where='src'), package_dir={'fcwt': 'src/fcwt'}, package_data={'fcwt': files} )
The text was updated successfully, but these errors were encountered:
Thanks for the above update. In addition to this, however, I had to add the following to comp_args for an intel Mac running Ventura 13.2:
comp_args = ["-std=c++17", "-mavx", "-O3"]
This was due to the following error (which happened in a number of places):
error: use of undeclared identifier 'aligned_alloc'; did you mean 'omp_aligned_alloc'?
Sorry, something went wrong.
Add libs folder to setup.py as described by @allmondjoy87 to solve fa…
223af1e
…stlib#21
No branches or pull requests
fyi i had to add 'libs' to library_dirs and include_dirs in setup.py in order for this to build for python.
The text was updated successfully, but these errors were encountered: