Skip to content

Commit

Permalink
Add all the subpackages for each microservice
Browse files Browse the repository at this point in the history
update docstring for setup_dependencies
  • Loading branch information
amaltaro committed Dec 13, 2022
1 parent 9a47ce4 commit 94192d4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 13 deletions.
11 changes: 6 additions & 5 deletions setup_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ def walk_dep_tree(system):
statics that the system depends on.
system is a dict containing:
{'packages': ['Package'],
'systems':['foo'],
'statics': ['bar']}
{'bin': ['bin_script_A'],
'packages': ['package_name_A'],
'modules': ['module_name_A'],
'systems':['system_name_A'],
'statics': ['non_python_statics_A']}
"""
packages = set()
statics = set()
Expand Down Expand Up @@ -153,13 +155,12 @@ def things_to_build(command, pypi=False):

# and the corresponding source directories and files
package_src_dirs = []
module_src_files = []
for package in dependency_tree['packages']:
# Need to recurse packages
recurse = package.endswith('+')
print(package, recurse)
package = package.rstrip('+')
src_path = '%s/src/python/%s' % (get_path_to_wmcore_root(), package.replace('.','/'))
src_path = '%s/src/python/%s' % (get_path_to_wmcore_root(), package.replace('.', '/'))
package_src_dirs.extend(list_packages([src_path], recurse))
return package_src_dirs, dependency_tree['modules']

Expand Down
28 changes: 20 additions & 8 deletions setup_dependencies.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
#!/usr/bin/env python
"""
Manage dependancies by declaring systems here.
A system can depend on packages or other systems.
If a package ends with a + include all subpackages.
This data structure is consumed by the setup_build.py script, in order to add
the required packages to each of the WMCore systems.
It contains the name of the systems that can be built out of the WMCore
repository, and their list of dependencies, which can be:
* bin: list with the name of executable scripts available in the root bin/ area
* packages: list with the name of a WMCore python packages (i.e. a directory
containing an __init__.py file)
* note that if it's suffixed with the '+' sign, subpackages will also be
recursively searched and added to the final system
* modules: list with the name of specific modules (a .py file) to be added.
* statics: list with the name of files classified as statics, e.g. css, templates,
javascript, etc.
* systems: list with WMCore system aliases (i.e., like a meta-package that can
be used by multiple WMCore systems).
"""
dependencies = {
'wmc-rest': {
Expand Down Expand Up @@ -129,23 +141,23 @@
'statics': [],
},
'reqmgr2ms-unmerged': {
'packages': ['WMCore.MicroService.MSUnmerged'],
'packages': ['WMCore.MicroService.MSUnmerged+'],
'systems': ['reqmgr2ms-core'],
},
'reqmgr2ms-output': {
'packages': ['WMCore.MicroService.MSOutput'],
'packages': ['WMCore.MicroService.MSOutput+'],
'systems': ['reqmgr2ms-core'],
},
'reqmgr2ms-transferor': {
'packages': ['WMCore.MicroService.MSTransferor'],
'packages': ['WMCore.MicroService.MSTransferor+'],
'systems': ['reqmgr2ms-core'],
},
'reqmgr2ms-monitor': {
'packages': ['WMCore.MicroService.MSMonitor'],
'packages': ['WMCore.MicroService.MSMonitor+'],
'systems': ['reqmgr2ms-core'],
},
'reqmgr2ms-rulecleaner': {
'packages': ['WMCore.MicroService.MSRuleCleaner'],
'packages': ['WMCore.MicroService.MSRuleCleaner+'],
'systems': ['reqmgr2ms-core'],
},
'global-workqueue': {
Expand Down

0 comments on commit 94192d4

Please sign in to comment.