(project, name, ps, sources)
| 2 | from b2.build.virtual_target import NonScanningAction, FileTarget |
| 3 | |
| 4 | def generate_example(project, name, ps, sources): |
| 5 | |
| 6 | result = [] |
| 7 | for s in sources: |
| 8 | |
| 9 | a = NonScanningAction([s], "common.copy", ps) |
| 10 | |
| 11 | # Create a target to represent the action result. Uses the target name |
| 12 | # passed here via the 'name' parameter and the same type and project as |
| 13 | # the source. |
| 14 | result.append(FileTarget(name, s.type(), project, a)) |
| 15 | |
| 16 | return result |