|
1 | 1 | __author__ = 'desultory' |
2 | | -__version__ = '1.0.0' |
| 2 | +__version__ = '1.0.1' |
3 | 3 |
|
4 | 4 | from pathlib import Path |
5 | 5 |
|
@@ -38,6 +38,15 @@ def deploy_dependencies(self): |
38 | 38 | self._copy(dependency) |
39 | 39 |
|
40 | 40 |
|
| 41 | +def deploy_copies(self): |
| 42 | + """ |
| 43 | + Copiues everything from self.config_dict['copies'] into the build directory |
| 44 | + """ |
| 45 | + for copy_name, copy_parameters in self.config_dict['copies'].items(): |
| 46 | + self.logger.debug("[%s] Copying: %s" % (copy_name, copy_parameters)) |
| 47 | + self._copy(copy_parameters['source'], copy_parameters['destination']) |
| 48 | + |
| 49 | + |
41 | 50 | def deploy_symlinks(self): |
42 | 51 | """ |
43 | 52 | Creates symlinks for all symlinks in self.config_dict['symlinks'] |
@@ -98,10 +107,24 @@ def _process_dependencies_multi(self, dependency): |
98 | 107 | self['dependencies'].append(dependency) |
99 | 108 |
|
100 | 109 |
|
| 110 | +def _process_copies_multi(self, copy_name, copy_parameters): |
| 111 | + """ |
| 112 | + Processes a copy from the copies parameter |
| 113 | + Ensures the source and target are defined in the parameters. |
| 114 | + """ |
| 115 | + self.logger.debug("[%s] Processing copy: %s" % (copy_name, copy_parameters)) |
| 116 | + if 'source' not in copy_parameters: |
| 117 | + raise ValueError("[%s] No source specified" % copy_name) |
| 118 | + if 'destination' not in copy_parameters: |
| 119 | + raise ValueError("[%s] No target specified" % copy_name) |
| 120 | + |
| 121 | + self['copies'][copy_name] = copy_parameters |
| 122 | + |
| 123 | + |
101 | 124 | def _process_symlinks_multi(self, symlink_name, symlink_parameters): |
102 | 125 | """ |
103 | 126 | Processes a symlink, |
104 | | - Ensuures the source and target are defined in the parameters. |
| 127 | + Ensures the source and target are defined in the parameters. |
105 | 128 | """ |
106 | 129 | self.logger.debug("[%s] Processing symlink: %s" % (symlink_name, symlink_parameters)) |
107 | 130 | if 'source' not in symlink_parameters: |
|
0 commit comments