Commit ace65753 authored by Romain Casati's avatar Romain Casati
Browse files

Compiling process fails when error in requirejs optimize (usefull for typo).

parent d73ea644
......@@ -2,7 +2,7 @@ all: build
clean:
python3 setup.py clean --all
rm -rf notebook/static/basthon-kernel/ notebook/version
rm -rf notebook/static/basthon-kernel/ notebook/version notebook/static/*/js/main.min.js
version:
echo $$(date -d @$$(git log -1 --format="%at") +%Y/%m/%d_%H:%M:%S)_kernel_$$(pip3 show basthon-kernel | grep Version | cut -f2 -d' ') > notebook/version
......
......@@ -23,7 +23,7 @@ from distutils import log
from distutils.cmd import Command
from fnmatch import fnmatch
from glob import glob
from multiprocessing.pool import ThreadPool
from concurrent.futures import ThreadPoolExecutor as ThreadPool
from subprocess import check_call
if sys.platform == 'win32':
......@@ -565,9 +565,11 @@ class CompileJS(Command):
self.run_command('jsdeps')
env = os.environ.copy()
env['PATH'] = npm_path
pool = ThreadPool()
pool.map(self.build_main, self.apps)
pool.map(self.build_jstranslation, glob('notebook/i18n/??_??'))
with ThreadPool() as pool:
for r in pool.map(self.build_main, self.apps):
print(r)
for r in pool.map(self.build_jstranslation, glob('notebook/i18n/??_??')):
print(r)
# update package data in case this created new files
update_package_data(self.distribution)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment