Source

mana-core-pyjobtransformscore / cmt / requirements

Full commit
package PyJobTransformsCore
author Martin Woudstra <Martin.Woudstra@cern.ch>

use AtlasPolicy AtlasPolicy-01-* 

use AtlasPython AtlasPython-* External -no_auto_imports
# for some python tools
#use AthenaCommon AthenaCommon-02-* Control -no_auto_imports

apply_pattern declare_python_modules files="*.py"

# Pattern to declare python jobtransforms.
# Each jobtransform normally has 2 components:
#    - The python script (*_trf.py) defining the trf
#    - The corresponding skeleton joboptions file(s)
# The pattern  takes 2 arguments:
# trfs = list of jobtransforms, by default taken from ../scripts
#        It will be installed in the Installarea/${trfs_installdir}.
# jo = list of skeleton joboptions files belonging to the jobtransforms (usually one).
#      By default taken from ../share
#       It will be installed in the Installarea/${trfs_installdir}/jobOptions
#
macro expand_files_cmd expand_files.py

apply_pattern declare_scripts files=expand_files.py

macro trfs_installdir 'trfs'

pattern declare_jobtransforms \
	apply_pattern generic_declare_for_link kind=trfs_exe files='-s=../scripts <trfs>' prefix=share/bin ; \
	apply_pattern generic_declare_for_link kind=trfs_pyt files='-s=../scripts <trfs>' prefix=python/<package> ; \
	apply_pattern generic_declare_for_link kind=trfs_jop files='-s=../share <jo>'     prefix=jobOptions/<package> ; \
	macro <package>_jobtransforms "`${expand_files_cmd} -r=$(<PACKAGE>ROOT) -d=<package> -s=../scripts <trfs>`" ; \
	macro_append all_jobtransforms " ${<package>_jobtransforms} "


# the use of CMTINSTALLAREA macro below is not documented anywhere, but it works.
# Doing the path* and set* commands outside of a cmtpath_pattern does not work, since the
# one in AtlasPolicy removes everything I set here, and is apparently called after the
# 'normal' path* and set* commands.
#cmtpath_pattern \
#	path_remove  PYTHONPATH "/$(trfs_installdir)" ; \
#	path_remove  PATH  "/$(trfs_installdir)" ; \
#	set_remove   JOBOPTSEARCHPATH "/$(trfs_installdir)/jobOptions"

#cmtpath_pattern \
#	path_prepend PYTHONPATH "$(CMTINSTALLAREA)/$(trfs_installdir)" ; \
#	path_prepend PATH "$(CMTINSTALLAREA)/$(trfs_installdir)" ; \
#	set_prepend  JOBOPTSEARCHPATH ",$(CMTINSTALLAREA)/$(trfs_installdir)/jobOptions"