-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Q & A: call flow. #139
Comments
Those two executables in the scripts folder are automatically created by pip for the console scripts entry points (https://setuptools.pypa.io/en/latest/userguide/entry_point.html#console-scripts) listed in https://github.com/nightlark/swig-pypi/blob/bbcf58eff/pyproject.toml#L46-L48 and essentially just call the underlying Python module/function name listed in the entry point. The swig4.0 entry point was added to address an issue with CMake searching for a program named swig4.0 (#120). What you described is correct, calling the swig.exe in the scripts folder (after ensuring it is in the env path by e.g. activating the virtual environment) then calls the swig function in the swig Python module (https://github.com/nightlark/swig-pypi/blob/main/src/swig/__init__.py), which is a simple Python script that calls the actual swig.exe file (with SWIG_LIB being set using the env argument). Side note regarding virtual environments: I've often started to recommend using |
Thanks for clarification and suggestion! |
closing this topic. |
Hello,
This is just Q & A, sorry that I might have overlooked some document somewhere, but I have been searching for a while.
I noticed that after "pip install swig", there will be several swig.exe there (I'm using virtual python env):
\python39\scripts\swig.exe
\python39\scripts\swig4.0.exe
\python39\site-packages\swig\data\bin\swig.exe <= (this is the same one from swigwin4.2.1.zip)
Could you share what's the purpose of those 2 more different swig.exe in scripts folder?
It seems like we are supposedly to call swig.exe from scripts folder (by default only scripts folder in the env path) and somehow it will call to bin folder swig.exe to work with SWIG_LIB, but I'm not sure how to achieve this so would like to understand it for education of myself.
Thanks!
The text was updated successfully, but these errors were encountered: