Hacker News new | ask | show | jobs
by dimatura 3117 days ago
I write in a mix of python and C++ as well. As such, I've also gradually moved towards using conda. What's your dev workflow for the code that's not a dependency like? Specially if the code you're developing is C++. Do you make a conda package of it as you're developing? I've found that too much of a hassle to rebuild. I usually just use CMake with the conda environment dir as the CMAKE_INSTALL_PREFIX.
1 comments

Yeah, that's what I do also. conda-build makes it easier to use your code downstream, but doesn't obviate the need for build scripts in general.

However, if you're using conda, you might be able to at least simplify your build scripts, even though you can't eliminate them.

If you are okay with requiring your users to have conda, then you can exploit that fact to simplify your CMakeLists.txt in some ways. For instance, find_library, etc.. can be replaced with hard-coded links to ${CONDA_PREFIX}/lib/...

(I'm not saying that's necessarily "best practice" for all projects, but it's a nice option to consider, especially in the early phases of development.)

Ah, that's an interesting shortcut.