File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 11include *.py *.txt *.rst
22recursive-include mpi4py_fft *.py *.pyx *.pxd fftw_planxfftn.[c,h]
3- recursive-exclude mpi4py_fft fftw[f,l]_xfftn.pyx fftw[f,l]_xfftn.pxd
3+ recursive-exclude mpi4py_fft fftw[f,l]_xfftn.pyx fftw[f,l]_xfftn.pxd
Original file line number Diff line number Diff line change 77import platform
88import sysconfig
99from distutils import ccompiler
10+ from distutils .errors import DistutilsPlatformError
1011from setuptools import setup
1112from setuptools .dist import Distribution
1213from setuptools .extension import Extension
@@ -74,7 +75,9 @@ def get_fftw_libs():
7475 libs [d ].append (tlib )
7576 if os .name == 'posix' :
7677 libs [d ].append ('m' )
77- assert len (libs ) > 0 , "No FFTW libraries found in {}" .format (library_dirs )
78+ if not libs :
79+ message = "No FFTW libraries found in {}" .format (library_dirs )
80+ raise DistutilsPlatformError (message )
7881 return libs
7982
8083def generate_extensions (fftwlibs , force = True ):
@@ -149,7 +152,12 @@ def get_extensions():
149152 ),
150153 ]
151154
152- fftwlibs = get_fftw_libs ()
155+ sdist = 'sdist' in sys .argv
156+ egg_info = 'egg_info' in sys .argv
157+ fftwlibs = (
158+ get_fftw_libs () if not (sdist or egg_info ) else
159+ {d : [] for d in ('float' , 'double' , 'long double' )}
160+ )
153161 for d , libs in fftwlibs .items ():
154162 p = 'fftw' + prec_map [d ] + '_'
155163 ext .append (
You can’t perform that action at this time.
0 commit comments