[+] remove build dir when deploy with force=True
This commit is contained in:
parent
a7c192a51e
commit
e0843e8496
@ -5,7 +5,7 @@ project(
|
||||
).stdout().strip('\n'),
|
||||
# 'online.fxreader.uv',
|
||||
# ['c', 'cpp'],
|
||||
version: '0.1.5.17+27.6',
|
||||
version: '0.1.5.17+27.7',
|
||||
# default_options: [
|
||||
# 'cpp_std=c++23',
|
||||
# # 'prefer_static=true',
|
||||
|
@ -357,6 +357,17 @@ class CLI(abc.ABC):
|
||||
|
||||
extra_args: list[str] = []
|
||||
|
||||
pyproject_build_dir = project.build_dir / 'pyproject'
|
||||
|
||||
if force and pyproject_build_dir.exists():
|
||||
logger.info(
|
||||
dict(
|
||||
pyproject_build_dir=pyproject_build_dir,
|
||||
msg='remove build dir',
|
||||
)
|
||||
)
|
||||
shutil.rmtree(pyproject_build_dir)
|
||||
|
||||
if len(self.third_party_roots) > 0:
|
||||
extra_args.extend(['-Csetup-args=%s' % ('-Dthird_party_roots=%s' % str(o.absolute())) for o in self.third_party_roots])
|
||||
|
||||
@ -368,7 +379,7 @@ class CLI(abc.ABC):
|
||||
'-n',
|
||||
*extra_args,
|
||||
'-Csetup-args=-Dmodes=pyproject',
|
||||
'-Cbuild-dir=%s' % str(project.build_dir / 'pyproject'),
|
||||
'-Cbuild-dir=%s' % str(pyproject_build_dir),
|
||||
'-Csetup-args=-Dinstall_path=%s' % str(project.dest_dir),
|
||||
# '-Cbuild-dir=%s' % str(project.build_dir),
|
||||
str(project.source_dir),
|
||||
@ -378,7 +389,7 @@ class CLI(abc.ABC):
|
||||
if not output_dir is None:
|
||||
cmd.extend(['-o', str(output_dir)])
|
||||
|
||||
logger.info(dict(env=env))
|
||||
logger.info(dict(env=env, cmd=cmd))
|
||||
|
||||
subprocess.check_call(
|
||||
cmd,
|
||||
|
BIN
releases/whl/online_fxreader_pr34-0.1.5.17+27.7-py3-none-any.whl
(Stored with Git LFS)
Normal file
BIN
releases/whl/online_fxreader_pr34-0.1.5.17+27.7-py3-none-any.whl
(Stored with Git LFS)
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user