The new scripts for building external modules are amazing!
What is the magic to include additional files in a python wheel for an external module using the new scripts?
For example, if I have a project directory
itkFOO
- CMakeLists.txt
- setup.py
- .github/workflows/build-test-package.yml
- src
- include
- wrapping
- extras
How can I include FOOExtras.py in the wheel?
Could perhaps copy to ITK-build/Wrapping/Generators/Python/itk, but Iām guessing that there is a much cleaner way.
Thanks,
Stephen
simon.rit
(Simon Rit)
2
For Python applications, you can use PythonWheelRuntimeLibraries
:
and scripts
in setup.py
They then go to your bin
package directory. I donāt know how to put them where itkExtras.py
goesā¦
1 Like
Thanks! That might be perfect for my use cases.
simon.rit
(Simon Rit)
4
Since I do not want to include applications only, I also found a way to add python files using WRAP_ITK_PYTHON_BINDINGS_INSTALL
:
It seems to work so far. What I now miss is a way to add an initialization line in the module init, e.g.
from FOOExtras.py import *
Any suggestion is welcomeā¦
dzenanz
(Dženan ZukiÄ)
5
@matt.mccormick might have some suggestions?