Skip to content

Commit 4ba6221

Browse files
NeloopMartin Kruliš
authored andcommitted
Output also *.py files from python compilation, some of the python libraries need source files during execution
1 parent a170cbf commit 4ba6221

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app/helpers/ExerciseConfig/Pipeline/Box/Boxes/Python3CompilationBox.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ public function compile(CompilationParams $params): array {
109109
foreach ($sourceFiles as $sourceFile) {
110110
$pycFilenames[] = pathinfo($sourceFile, PATHINFO_FILENAME) . self::$PYC_EXT;
111111
}
112+
113+
// some python libraries counts on presence of py source files, therefore
114+
// we have to output them too, so they also will be copied from compilation
115+
// folder
116+
$pycFilenames = array_merge($pycFilenames, $sourceFiles);
112117
$this->getOutputPortValue(self::$PYC_FILES_PORT_KEY)->setValue($pycFilenames);
113118

114119
// check if file produced by compilation was successfully created

0 commit comments

Comments
 (0)