Closed nyckmaia closed 2 years ago
Since you "installed" files with a custom script the uninstallation must be custom too :) To make it more straightforward make the stubs a part of your package distribution.
@sizmailov I would like to make it straightforward making the stubs a part of my package distribution.
That was my first question here: https://github.com/sizmailov/pybind11-stubgen/issues/79#issuecomment-1196813093
My doubt is: How can I put the stubs inside my Python package if to generate the stubs is necessary that myPackage
MUST BE already installed in my Python environment?
Could you please help me about how can I generate the stubs before install myPackage
?
The only requirement for pybind11-stubgen
is to be able to import the module. All you need is to make your module available for import.
Probably you would do something along those lines in CI:
MANIFEST.in
I don't have an example script at hand that does all that, so I can't provide you with the exact script with step-by-step instructions. Maybe some of the dependent projects already do something like that, please check.
Sorry for the little help here.
Hi,
After I generate the Python stubs using
pybind11-stubgen
, I installed this stubs using a custom Python script that copies all generated stubs files to inside themyModule
installed directory (which in my case is:~/.local/lib/python3.8/site-packages/myModule/
All works good! No problems.
Problem
Now, if I try to uninstall this package using
pip uninstall myModule
, this command deletes all files inside themyModule
installed directory, but remains the root folder and the copied stubs files.Question
What I need to do to be able to call
pip uninstall myModule
and get all files and theMyModule
root installed directory deleted?Thank you,
My System: