Skip to content

Instantly share code, notes, and snippets.

View Sleepingwell's full-sized avatar

Simon Knapp Sleepingwell

  • Canberra, ACT, Australia
View GitHub Profile
@Sleepingwell
Sleepingwell / Makefile
Last active January 12, 2023 03:12
A minimal example of calling a python function via a callback passed to a fortran subroutine.
.PHONY: venv
VENV_PATH=venv
TIMESTAMP_FILE=$(VENV_PATH)/.f2pytest-creation-timestamp
test: venv test.f90
. $(VENV_PATH)/bin/activate && \
python -m numpy.f2py -c test.f90 -m test
venv: $(TIMESTAMP_FILE)