-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathSetup.py
41 lines (25 loc) · 1.27 KB
/
Setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import subprocess
import sys
import os
from pathlib import Path
def main():
print("Updating the Python environment")
#TODO: Use a venv
#subprocess.call(["poetry", "install"])
print("Updating the C++ environment")
buildPath = Path().absolute() / "Build"
buildPathString = str(buildPath)
conanFilePath = Path().absolute() / "Tools" / "Conan"
conanFilePathString = str(conanFilePath)
#Set the conan remote
subprocess.call(["conan", "remote", "add", "--force", "bincrafters", "https://api.bintray.com/conan/bincrafters/public-conan"])
#Create build directory if it does not exist
if not os.path.exists(buildPath):
os.makedirs(buildPath)
#install conan dependencies
subprocess.call(["conan", "install", conanFilePathString, "-if", buildPathString, "-g", "cmake_multi", "-s", "build_type=Debug", "--build=missing"])
subprocess.call(["conan", "install", conanFilePathString, "-if", buildPathString, "-g", "cmake_multi", "-s", "build_type=Release", "--build=missing"])
#set the package to editable, allowing projects to find it globally via Conan and bypass a remote fetch
subprocess.call(["conan", "editable", "add", conanFilePathString, "SoulEngine/0.0.1@synodic/testing"])
print("Finished setup!")
main()