Skip to content

Commit 69a6712

Browse files
committed
Also generate _base/__init__.py, py2 needs it
1 parent 4c1d82e commit 69a6712

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

js/scripts/generate-wrappers.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -948,17 +948,21 @@ function createPythonFiles() {
948948
return mapPromiseFnOverThreeModules(function(relativePath) {
949949
return createPythonWrapper(relativePath).then(function() {
950950
// ensures each dir has empty __init__.py file for proper importing of sub dirs
951-
createPythonModuleInitFile(relativePath);
951+
return createPythonModuleInitFile(relativePath);
952952
});
953953
})
954954
.then(function() {
955955
return mapPromiseFnOverFileList(CUSTOM_CLASSES, function(relativePath) {
956956
return createPythonWrapper(relativePath).then(function() {
957957
// ensures each dir has empty __init__.py file for proper importing of sub dirs
958-
createPythonModuleInitFile(relativePath);
958+
return createPythonModuleInitFile(relativePath);
959959
});
960960
});
961961
})
962+
.then(function() {
963+
// Manually ensure base init file is created
964+
return createPythonModuleInitFile('_base/__init__');
965+
})
962966
.then(function() {
963967
// top level __init__.py file imports *all* pythreejs modules into namespace
964968
return createTopLevelPythonModuleFile();

0 commit comments

Comments
 (0)