mirror of
https://github.com/chatmail/core.git
synced 2026-04-04 06:22:16 +03:00
This changes the AccountMaker to use pre-generated keys when available, speeding up test runs. As a side-effect we no longer need to compile the integration tests in release mode with debug symbols. Losing debug symbols (-g) means cargo no longer wants to recompile everything all the time too. Tested locally and seems to works.
29 lines
833 B
Python
Executable File
29 lines
833 B
Python
Executable File
#!/usr/bin/env python
|
|
|
|
"""
|
|
setup a python binding development in-place install with cargo debug symbols.
|
|
"""
|
|
|
|
import os
|
|
import subprocess
|
|
import sys
|
|
|
|
if __name__ == "__main__":
|
|
target = os.environ.get("DCC_RS_TARGET")
|
|
if target is None:
|
|
os.environ["DCC_RS_TARGET"] = target = "debug"
|
|
if "DCC_RS_DEV" not in os.environ:
|
|
dn = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|
os.environ["DCC_RS_DEV"] = dn
|
|
|
|
cmd = ["cargo", "build", "-p", "deltachat_ffi"]
|
|
if target == 'release':
|
|
cmd.append("--release")
|
|
subprocess.check_call(cmd)
|
|
subprocess.check_call("rm -rf build/ src/deltachat/*.so" , shell=True)
|
|
|
|
if len(sys.argv) <= 1 or sys.argv[1] != "onlybuild":
|
|
subprocess.check_call([
|
|
sys.executable, "-m", "pip", "install", "-e", "."
|
|
])
|