Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

cmake - No such file or directory: 'build/temp.linux-x86_64-3.6 during setuptools bdist_wheel

I'm building extension with CMake

setup(
...
cmdclass={'build_ext':Cmakebuildclass}
)

where Cmakebuildclass is a custom class. Inside run() function of this class, I'm building the extension It creates a temporary build directory where all artifacts get stored. However, at the end I try to access it but it fails

error: [Errno 2] No such file or directory: 'build/temp.linux-x86_64-3.6
question from:https://stackoverflow.com/questions/65645812/no-such-file-or-directory-build-temp-linux-x86-64-3-6-during-setuptools-bdist

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Temporary build directory [e.g. build/temp.linux-x86_64-3.6] gets deleted once the targets are built.

It's copied over to the lib folder within build generally build/lib.linux-x86_64-3.6/ So use build_lib variable instead of build_temp

For code: https://github.com/python/cpython/blob/e5fe509054183bed9aef42c92da8407d339e8af8/Lib/distutils/command/build_ext.py#L108

Details: https://github.com/python/cpython/blob/e5fe509054183bed9aef42c92da8407d339e8af8/Lib/distutils/command/build_ext.py#L57-L60


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...