Solved Makefile question - port needs python for building only

I'm working on a port that's built in GO. However, before packaging the compiled port and its data files, I need to run a python script on those data files to "transform" them. Once this scripts is done executing (using ${PYTHON_CMD}) and the files are properly transformed, they're automatically included in the final package. When the port is installed, there shouldn't by any dependencies; the port can run on its own (so, no need for python at this point). The way I'm currently building the port is by adding "python" as a value under USES in my Makefile. This works great, but makes python a dependency for my port after it's been packaged (i.e. when you install the port from package and not from source). Is there any way that I can make python a dependency only for the build and not after?
 
Thank you both! I was able to solve it thanks to your help. I was trying it the old fashion way using the dependencies, but was missing the PYTHON_CMD variable. Using the arguments for the Python USES macro was even simpler!

Makefile:
USES=        gmake go python:build
 
Back
Top