CellProfiler / CellProfiler-plugins

Community-contributed and experimental CellProfiler modules.
http://plugins.cellprofiler.org/
56 stars 67 forks source link

Module names must match file/class names for plugins to work from compiled binary #165

Open hinerm opened 1 year ago

hinerm commented 1 year ago

These three elements must all match for a plugin module to be discovered:

image

It seems that these items can be different when building CP from source. But the modules will not be created correctly (they complain about not being able to find core CP imports, e.g. CP-core Module).

To reproduce:

  1. Create a simple module with these 3 elements not matching (it was sufficient to add an underscore _ to the file name, but be otherwise equal)
  2. Build CP from source
  3. Run CP and point it at the CP-plugins directory with aforementioned module
  4. Restart and run CP > plugin should be discovered ok
  5. Install a binary CP distribution
  6. run CP from the binary > plugin is not discovered (they reuse the same configured plugins directory)

Suspect line of code is here in CP-core plugins.py.

Tested on Windows with case-insensitive files. Didn't test on case-sensitive OS, e.g. on Mac.