htm.core icon indicating copy to clipboard operation
htm.core copied to clipboard

Python setup.py develop broken

Open breznak opened this issue 5 years ago • 6 comments

I think the develop mode is broken, as it links to build/Release/distr/src while the changes should be "live" on source files. Intention of 'develop' py install is that you can make changes to the python files and the package (is linked) will immediately reflect that.

breznak avatar Oct 09 '19 09:10 breznak

from pip list

htm.core (2.0.22, /mnt/store/devel/HTM/htm-community/nupic.cpp/build/Release/distr/src)

breznak avatar Oct 09 '19 10:10 breznak

@dkeeney could you look at this, please? I've recently struggeled with some py code until I realized I was working on an outdated code.

breznak avatar Oct 27 '19 18:10 breznak

PR #747 may fix this. There is a change to setup.py which does a touch of htm.core/bindings/py/cpp_src/CMakeFiles.txt which causes the configure step to re-run before a build. That results in the files being copied into distr/src. There may be a better way to do this but this seems to work without too much additional time for a build.

It still requires at least one of the expansion libs to be deleted before it will build. We might want to remove the step that looks for each of the expansion libs before deciding to call CMake.

dkeeney avatar Nov 07 '19 23:11 dkeeney

Thanks!

It still requires at least one of the expansion libs to be deleted before it will build. We might want to remove the step that looks for each of the expansion libs before deciding to call CMake.

if that would not slow down the build process too much, we should do this.

The idea of develop is to allow changes to py-only files to be appplied without calling anything. I'm not sure if we can still achieve that in which case we could just remove the develop call.

breznak avatar Nov 08 '19 10:11 breznak

Hmmm, I think what is happening is that the develop call is re-packaging the .py code that is already in htm.core/Release/distr/src, not the .py code that might have changed. Somehow we need to copy that code again.

dkeeney avatar Nov 08 '19 14:11 dkeeney

So if this will work, i can call something like 'python develop install --user --force' and pyfiles will be reflected immediately?

Since now, i was deleting "distr" folder every time and running 'python install --user --force'

Zbysekz avatar Nov 11 '19 10:11 Zbysekz