Fix errors when building clean

This commit is contained in:
Robert Taylor 2022-12-02 19:30:53 +00:00 committed by Jean-Paul Chaput
parent ebabf1e988
commit 424c61d6a4
1 changed files with 5 additions and 2 deletions

View File

@ -5,7 +5,7 @@ import subprocess
import sys import sys
import sysconfig import sysconfig
from distutils.version import LooseVersion from distutils.version import LooseVersion
from distutils.dir_util import copy_tree from distutils.dir_util import copy_tree, remove_tree
from typing import Any, Dict from typing import Any, Dict
from setuptools.command.build_ext import build_ext from setuptools.command.build_ext import build_ext
@ -90,7 +90,10 @@ class ExtensionBuilder(build_ext):
subprocess.check_call(["cmake", "--debug-find", "--trace-redirect=build.cmake.trace", "--trace-expand", ext.sourcedir] + cmake_args, cwd=build_dir, env=env) subprocess.check_call(["cmake", "--debug-find", "--trace-redirect=build.cmake.trace", "--trace-expand", ext.sourcedir] + cmake_args, cwd=build_dir, env=env)
subprocess.check_call(["cmake", "--build", "."] + build_args, cwd=build_dir) subprocess.check_call(["cmake", "--build", "."] + build_args, cwd=build_dir)
subprocess.check_call(["cmake", "--install", ".", "--prefix", extdir] + install_args, cwd=build_dir) subprocess.check_call(["cmake", "--install", ".", "--prefix", extdir] + install_args, cwd=build_dir)
copy_tree(os.path.join(extdir, "bin"), "Coriolis/data/bin") if os.path.exists(os.path.join(extdir, "bin")):
copy_tree(os.path.join(extdir, "bin"), os.path.join(extdir,"data/bin"))
remove_tree(os.path.join(extdir, "bin"))
def build(setup_kwargs: Dict[str, Any]) -> None: def build(setup_kwargs: Dict[str, Any]) -> None:
cmake_modules = [ cmake_modules = [