diff --git a/caiman/caimanmanager.py b/caiman/caimanmanager.py index 2f9a28b7d..bddc349f0 100755 --- a/caiman/caimanmanager.py +++ b/caiman/caimanmanager.py @@ -72,6 +72,9 @@ def do_install_to(targdir: str, inplace: bool = False, force: bool = False) -> N shutil.copy(stdmovie, os.path.join(targdir, 'example_movies')) for extrafile in extra_files: shutil.copy(extrafile, targdir) + if 'CAIMAN_RELEASE' in os.environ: + with open(os.path.join(targdir, 'RELEASE'), 'w') as verfile_fh: + print(f"Version:{caiman.__version__}", file=verfile_fh) print("Installed " + targdir) diff --git a/caiman/utils/utils.py b/caiman/utils/utils.py index d6aa077af..d450682ac 100644 --- a/caiman/utils/utils.py +++ b/caiman/utils/utils.py @@ -675,7 +675,7 @@ def get_caiman_version() -> tuple[str, str]: for line in sfh: if ':' in line: # expect a line like "Version:1.3" _, version = line.rstrip().split(':') - return 'RELF', version + return 'RELEASE', version # Attempt: 'FILE' # Right now this samples the utils directory