Hi,
I am pretty new to Python and open-source development. I am trying to implement a feature on a hash function, which will interface between the C code and the Python. As such, I have been making changes to SHA512.py, as well as the hash_sha2_template.c that it interacts with. I make some changes, and then run
pip install -e /path/to/my/local/fork
in a separate venv, where I am doing my testing. This works perfectly well for the Python modifications, but any C code changes I make aren't reflected as changes in the venv.
If I totally remove the directory from my computer, and then reinstall the fork, the changes take effect. This made me think that it was something to do with the build tool (the pip command runs `setup.py develop`, under the hood) so I started going through and checking what was changed upon the build, and I found the symbol (.so) and object files (.o) it creates. Deleting them causes the pip command to then work correctly, but I have been having trouble automating this as a delete-and-then-rebuild script to run before I run any tests on my changes.
Moreover, this seems really contrived. I am sure there is a better way to pass an argument to the pip command, or make some simple change to setup.py, which will allow me to develop in an easy way where I can simply recompile the C code when appropriate.
I have also tried some pip subcommands like --no-cache-dir, but it didn't help. I'd really appreciate any help you could offer me about how to try and get this working correctly. Let me know if there is any more information I can provide. Thanks!