Bootstrap cyclic dependencies

Is is possible for a package to have a host dependency to an earlier version of itself.
Specifically, I a working on the cmake-feedstock.
Cmake is built using cmake.
I would like to add an earlier version of cmake as a dependancy.
Putting the dependency in the meta.yaml causes an error about circular dependencies not being allowed.
The current approach is to get a prebuilt version of cmake in the build scripts (or use the system supplied version).
Currently this approach does not checksum the acquired executable (which could be corrected in the script).
Another approach would be to include and use the bootstrap script in the conda package and build with that.

I am looking for some guidance.

I did find a mention of this topic in

bootstrapping: sometimes an older dependency is needed to build a current thing (circular dependencies may require subenvironments also)
sub-environments have been needed for boot-strapping self-hosting compilers. Perhaps discuss/work on this at SciPy

What was the conclusion of this boostrapping discussion?

To break the cycle, we have GitHub - conda-forge/cmake-no-system-feedstock: A conda-smithy repository for cmake-no-system.. This is used in various other places but astonishingly not in the cmake-feedstock.

1 Like

conda-forge does not seem to have the windows version of cmake-no-system

Can you make a recommendation of a feedstock which can server as an exemplary model?

GitHub - conda-forge/libssh2-feedstock: A conda-smithy repository for libssh2. is a good entrypoint. We have used cmake-no-system in the past mostly to bootstrap cross-compiling for non x64 architectures.

I opened an issue.

The example you provided uses the cmake dependency on windows.
I need to experiment some more with the use of cmake-no-system on non-windows.