requirements 2.73 KB
Newer Older
Graeme Stewart's avatar
Graeme Stewart committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package PyJobTransforms

use AtlasPolicy         AtlasPolicy-*
use AtlasPython         AtlasPython-*          External -no_auto_imports
use AtlasPyFwdBwdPorts  *                      External -no_auto_imports

apply_pattern declare_python_modules files="*.py"

# default directory in current package to look for trf's.
macro tfs_dir '../scripts'

apply_pattern declare_scripts files="${expand_files_cmd} find_*.py -s=../python"
apply_pattern generic_declare_for_link kind=runtime files='-s=../share *.db' prefix=share name=trf

# Pattern to declare python job transforms.
# Each job transform normally has 2 components:
#    - The python script (*_tf.py), defining the trf
#    - The corresponding skeleton job options file (at least for athena transforms)
# The pattern  takes 2 arguments:
# tfs = list of job transforms, by default taken from ../scripts
#       These scripts will be installed in InstallArea/share/bin
# jo = list of skeleton joboptions files belonging to the job transforms
#      By default taken from ../share
#      These will be installed in the Installarea/jobOptions/<package>
#
pattern declare_job_transforms \
        private ; \
    apply_pattern generic_declare_for_link kind=tfs_exe files='-s=${tfs_dir} <tfs>' prefix=share/bin ; \
    apply_pattern generic_declare_for_link kind=tfs_pyt files='-s=${tfs_dir} <tfs>' prefix=python/<package> ; \
    apply_pattern generic_declare_for_link kind=tfs_jop files='-s=../share <jo>'     prefix=jobOptions/<package> ; \
    macro <package>_job_transforms "`${expand_files_cmd} -r=$(<PACKAGE>ROOT) -d=<package> -s=${tfs_dir} <tfs>`" ; \
        apply_pattern install_python_init ; \
        macro_append <package>_python_init_dependencies " install_tfs_pyt " ; \
        end_private ; \
    macro_append all_job_transforms " ${<package>_job_transforms}"
    
# For sample/utility tfs we need to do this after the pattern def
apply_pattern declare_job_transforms tfs='*_tf.py' jo='*.py'

# RTT tests
apply_pattern generic_declare_for_link kind=test files='-s=../test test_*.py' prefix=share/JobTransforms/test
macro PyJobTransforms_TestConfiguration "../test/PyJobTransforms_TestConfiguration.xml"
apply_pattern declare_runtime_extras extras="../test/PyJobTransforms_TestConfiguration.xml"

# Now make sure we generate the signature file with transform arguments in it
## DEPRECATED
#apply_pattern generic_declare_for_link kind=json files="../share/$(package)Signatures.json" prefix=share/JobTransforms
#
#private
#action makeTrfSignatures "../scripts/makeTrfSignatures.py --output ../share/$(package)Signatures.json"
#macro_append makeTrfSignatures_dependencies " install_tfs_jop install_python_modules "
#macro_append all_dependencies " makeTrfSignatures "
#macro_append check_install_json_dependencies " makeTrfSignatures "