mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-30 08:45:25 +00:00
11 lines
351 B
Python
11 lines
351 B
Python
import compileall
|
|
import os
|
|
|
|
root = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir))
|
|
compileall.compile_dir(os.path.join(root, 'src', 'python'), legacy=True, optimize=2)
|
|
with open(os.path.join(root, 'src', 'resources.qrc'), 'r+b') as f:
|
|
data = f.read()
|
|
data = data.replace(b'.py<', b'.pyc<')
|
|
f.seek(0)
|
|
f.write(data)
|