One common way to create source code on * NIX platforms is to use a configurescript. Under the hood, configure is trying to create a bunch of test programs to determine which libraries are available to you. Then it generates a header file, which is included in the project, which conditionally defines a group of macros so that the programmer can provide an alternative or create a truncated version of the library / program if there is no specific "dependency". Is there anything functionally equivalent with numpy.distutils?
As an example, here is mine setup.py:
from numpy.distutils.misc_util import Configuration
def configuration(parent_package='',top_path=None):
config = Configuration('pyggcm',parent_package,top_path)
config.add_extension('_fortfile',sources=['_fortfile/_fortfile.F90'],
define_macros=[
('FSEEKABLE',1),
('HAVE_STREAM',1)
])
config.add_extension('jrrle',sources=['jrrle/jrrle.f90'])
config.add_scripts(['scripts/ggcm_timehist',
'scripts/ggcm_plasmasheet',
'scripts/ggcm_plot'])
return config
from numpy.distutils.core import setup
setup(configuration=configuration)
FSEEKABLE , Fortran ( fseek ftell GNU). , Fortran ?