FreeBSD: Package python3-embed was not found in the pkg-config search path.

On FreeBSD the python3 package contains links to the default Python 3 binaries and development files, it should also contain both the pkg-config files python3.pc and python3-embed.pc but actually omits the second.

As a consequence Pygolo builds fail with the following error:

# pkg-config --cflags  -- python3-embed
Package python3-embed was not found in the pkg-config search path.
Perhaps you should add the directory containing `python3-embed.pc'
to the PKG_CONFIG_PATH environment variable
Package 'python3-embed', required by 'virtual:world', not found
pkg-config: exit status 1

As workaround, specify -tags pyX.Y (where X.Y is your Python version). Example:

$ go test -tags py3.9 ./test
ok  	gitlab.com/pygolo/py/test	0.309s

Upstream issue: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257362.

Edited by Domenico Andreoli