breezy-mouse-20493
04/11/2023, 9:12 PMf2py
modulehappy-kitchen-89482
04/11/2023, 11:17 PMhappy-kitchen-89482
04/11/2023, 11:18 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],
...
)
breezy-mouse-20493
04/11/2023, 11:25 PMbreezy-mouse-20493
04/11/2023, 11:37 PMbreezy-mouse-20493
04/11/2023, 11:37 PMhappy-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.happy-kitchen-89482
04/12/2023, 5:28 AMbreezy-mouse-20493
04/13/2023, 4:30 PMbreezy-mouse-20493
04/13/2023, 4:31 PM