IQ.Pilot Release Commit @ b6534c0
This commit is contained in:
17
artifacts/package_sources/panda/setup.py
Normal file
17
artifacts/package_sources/panda/setup.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import os
|
||||
import platform
|
||||
import subprocess
|
||||
|
||||
from setuptools import setup
|
||||
from setuptools.command.build_py import build_py
|
||||
|
||||
|
||||
class BuildPyWithFirmware(build_py):
|
||||
def run(self):
|
||||
if not getattr(self, "editable_mode", False) and platform.system() != "Windows":
|
||||
subprocess.check_call(["scons", f"-j{os.cpu_count() or 1}", "board/obj"], cwd=os.path.dirname(os.path.abspath(__file__)))
|
||||
super().run()
|
||||
os.unlink(os.path.join(self.build_lib, "panda", "setup.py"))
|
||||
|
||||
|
||||
setup(cmdclass={"build_py": BuildPyWithFirmware})
|
||||
Reference in New Issue
Block a user