breezy-mouse-20493
04/11/2023, 9:12 PMf2py
modulehappy-kitchen-89482
04/11/2023, 11:17 PMbreezy-mouse-20493
04/11/2023, 11:24 PMfrom numpy.distutils.core import (setup, Extension)
my_c_extension = Extension('my_c_module', sources=['my_c_code.c'])
my_fortran_extension = Extension('my_fortran_module', sources=['my_fortran_code.f'])
setup(
...
ext_modules=[my_c_extension, my_fortran_extension],
...
)
happy-kitchen-89482
04/12/2023, 5:27 AMpython_distribution
target for this setup.py and have python_sources
targets with (inferred or explicit) dependencies on that python_distribution
then Pants will build the wheel from the setup.py and ensure that it's on the sys.path when you run tests etc.breezy-mouse-20493
04/13/2023, 4:30 PM