Skip to content

Conda build fixes#133

Open
lgsmith wants to merge 2 commits into
GrossfieldLab:mainfrom
lgsmith:conda-build-fixes
Open

Conda build fixes#133
lgsmith wants to merge 2 commits into
GrossfieldLab:mainfrom
lgsmith:conda-build-fixes

Conversation

@lgsmith
Copy link
Copy Markdown
Contributor

@lgsmith lgsmith commented May 15, 2026


name: conda-build-fixes
about: Ran into small issue when working with pyloos, where two different odd interactions meant my rerunning of the script installed a stale version of pyloos into my mamba env, even though that's what I was wrenching on. These fixes would have prevented me from having this issue.
title: Stale pyloos cache, and silent failure.
labels: build
assignees: ''

Didn't make an issue, just proposing this fix.

Changes proposed in this pull request

  • Check for 'build' based cmake build. If so, instead of emitting a warning just clear the CMakeCache.txt so that it gets built afresh.
  • If the build fails, emit a warning and stop there.
  • Tee the output from the build into a logfile, to make it easier for multithreaded builds not to blow the error msg offscreen.

@agrossfield
Copy link
Copy Markdown
Member

I like this idea.

@agrossfield
Copy link
Copy Markdown
Member

Wait, I have a question: are you running conda_build.sh in the same repo, with the same conda env? In general, we only expect you to run conda_build.sh the first time, to get all of the dependencies you need. After that, it makes more sense to just run cmake build and cmake install directly

@lgsmith
Copy link
Copy Markdown
Contributor Author

lgsmith commented May 15, 2026 via email

@agrossfield
Copy link
Copy Markdown
Member

You're right, the docs don't make that clear -- they're focused on telling people how to get it build the first time, because relatively few people will need to rebuild it repeatedly, in the same conda environment.

I'll have to think about how to best clarify this -- separating the first setup case from the developer case.

@lgsmith
Copy link
Copy Markdown
Contributor Author

lgsmith commented May 15, 2026

It might be nice to get a pip/uv install command that uses the -e flag, too. That way, if you rebuild the env it'll automatically update the .egg, so your env you're developing in will update.

@lgsmith
Copy link
Copy Markdown
Contributor Author

lgsmith commented May 18, 2026

Do we have a recommended way to build into a new env? Do we have a recommended way to rebuild in the same env after changing something about the loos source?

@agrossfield
Copy link
Copy Markdown
Member

The best way to build into a fresh conda environment is

./conda_build.sh -e fresh-env-to-install-into -j 8 -i

If for some reason you want to reinstall and/or recompile in that tree and environment, the best way is to run cmake directly.

conda activate fresh-env-to-install-into
cmake --build .
cmake --install .

The install step calls pip behind the scenes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants