(self)
| 20 | |
| 21 | class install(install): |
| 22 | def run(self): |
| 23 | super().run() |
| 24 | import py_compile |
| 25 | |
| 26 | import hy # for compile hooks |
| 27 | |
| 28 | for path in set(self.get_outputs()): |
| 29 | if path.endswith(".hy"): |
| 30 | py_compile.compile( |
| 31 | path, |
| 32 | invalidation_mode=py_compile.PycInvalidationMode.CHECKED_HASH, |
| 33 | ) |
| 34 | |
| 35 | setup( |
| 36 | name=PKG, |