英文:
How python swig wrappers were generated without any source files in my case?
问题
I was researching using C++ in Python with SWIG. I came across this repo. I installed as recommended with python -m pip install tesseract-robotics
. I expected it to download C++ source code, generate .cpp
files from .i
files and only then build .dll
s. But, it seems it only installed _packageX.pyd
, packageX.py
and corresponding .dll
file for each package.
How this even possible? Doesn't SWIG need the .i
and C++ source files to generate the code to build for a specific platform? Or, was all this built somewhere on the cloud (maybe even in https://pypi.org/) and pip install
did not actually build anything, but just downloaded pre-built platform-specific .dll
and .py
files?
英文:
I was researching using C++ in Python with SWIG. I came across this repo. I installed as recommended with python -m pip install tesseract-robotics
. I expected it to download C++ source code, generate .cpp
files from .i
files and only then build .dll
s. But, it seems it only installed _packageX.pyd
, packageX.py
and corresponding .dll
file for each package.
How this even possible? Doen't SWIG needs the .i
and C++ source files to generate the code to build for specific platform? Or, was all this built somewhere on the cloud (maybe even in https://pypi.org/) and pip install
did not actually build anything, but just downloaded pre-built platfrom specific .dll
and .py
files?
答案1
得分: 0
根据user17732522的评论提到,tesseract-robotics的本地组件已编译并打包成Python轮子。这些预编译的轮子适用于Windows和最新的Linux x64版本,适用于Python 3.7及更高版本。为此包编译所有内容非常复杂,不应该期望用户能够完成。
如果您有兴趣查看其工作方式,可以在以下GitHub工作流程中找到进行编译的详细信息:https://github.com/tesseract-robotics/tesseract_python/blob/master/.github/workflows/wheels.yml
英文:
As mentioned in user17732522's comment, the tesseract-robotics native components are compiled and packed into Python wheels. These precompiled wheels are available for Windows and recent Linux x64 releases, for Python 3.7 and greater. Compiling everything for this package is extremely complicated, and is not something a user can be expected to accomplish.
The GitHub workflow that does the compilation can be found here if you are interested in seeing how it works: https://github.com/tesseract-robotics/tesseract_python/blob/master/.github/workflows/wheels.yml
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论