# HG changeset patch # User drewp # Date 1579852781 28800 # Node ID 0e0713fd23e797a275ed8b056019743c5844f25d # Parent 44aae4efedf6d6ea371460cec0e1c4e6f8746eac build: place generated nim in its own dir Ignore-this: 89c9a75595f0465d4efc44ef1b96abd7 darcs-hash:6a695011fe841ce7d6c020ebc33b6099ff26d964 diff -r 44aae4efedf6 -r 0e0713fd23e7 service/iot2/nim.cfg --- a/service/iot2/nim.cfg Thu Jan 23 23:46:34 2020 -0800 +++ b/service/iot2/nim.cfg Thu Jan 23 23:59:41 2020 -0800 @@ -1,3 +1,4 @@ nimcache = "build/nimcache" hint[Processing] = off --d:nimOldCaseObjects \ No newline at end of file +-d:nimOldCaseObjects +path = "build/nim_capn" diff -r 44aae4efedf6 -r 0e0713fd23e7 service/iot2/tasks.py --- a/service/iot2/tasks.py Thu Jan 23 23:46:34 2020 -0800 +++ b/service/iot2/tasks.py Thu Jan 23 23:59:41 2020 -0800 @@ -26,16 +26,16 @@ @task(pre=[py_install]) def py_deps(ctx): - pip_install_ever_ran = SOME_PY_DEP.exists() - pip_install_last_ran = Path(f'{PY_SITE_PACKAGES}/wheel').stat().st_mtime + pip_installed = Path(f'{PY_SITE_PACKAGES}/.pip_last_install') requirements = Path('requirements.txt').stat().st_mtime - if pip_install_ever_ran and pip_install_last_ran > requirements: + if pip_installed.exists() and pip_installed.stat().st_mtime > requirements: return ctx.run(f'{PY_ENV}/bin/pip install ' #f'--quiet ' f'--index-url https://projects.bigasterisk.com/ ' f'--extra-index-url https://pypi.org/simple ' f'-r requirements.txt') + ctx.run(f'touch {str(pip_installed)}') @task(pre=[nim_install]) def nim_deps(ctx): @@ -84,9 +84,10 @@ @task def messages_build_nim(ctx): + Path('build/nim_capn').mkdir(exist_ok=True) ctx.run(f'capnp compile ' f'-o ./build/capnp.nim/capnp/capnpc ' - f'messages.capnp > build/messages.nim') + f'messages.capnp > build/nim_capn/messages.nim') if 0: # maybe esp32 should be done as extra c files in an esphome build,