conan-io / conan

Conan - The open-source C and C++ package manager
https://conan.io
MIT License
8.1k stars 960 forks source link

[feature] conan install conan #15796

Open p-groarke opened 6 months ago

p-groarke commented 6 months ago

What is your suggestion?

I don't hear about this very often, so let me share our woes with pip install conan and why in my opinion, conan should decouple itself from the most cancerous package manager ever created in the history of mankind :)

If you love pip, stop reading you will get triggered and that's not my intention. However, throughout my entire life, I've never met a single person that likes pip so...

A long long time ago, we were naive and asked c++ devs to pip install conan, as the conan documentation recommends. This does not work for multiple reasons, the first being the conflicting pythons available on dev PCs and how horribly they are all configured. For ex MS Edge python, git bash python (with wrong architectures), MSVC python, any sort of ML tool installed on a dev pc.

You would think senior c++ devs would be able to fix this. We are not. This is a blocker to conan adoption.

Now enter CI, which comes with its pre-installed pip packages that conflict with conan's because (have I mentioned) pip is absolute trash. We cannot use virtual env in that situation (nor can we on dev PCs to be clear), so this would also prevent usage of conan all-together.

The solution is simple, you already support it very well, pre-built conan. Since we've moved to self-contained conan, I haven't heard a single complaint about it. Where before, we had weekly problems and were planning a move to vcpkg.

Fixing The Situation This is what I would do to remedy this problem. I'm sure there are other and better ways, just want to contribute a potential solution.

  1. Conan should only be available as pre-built binaries (installer and self-contained).
  2. Conan should bootstrap itself and manage itself (like most package managers do anyways).
  3. Release conan should be prebuilt.
  4. If a developer wants to work on conan, he or she can conan install conan/2.x -s build_type:Debug.
    • This should pull cpython from conan-center, and everything else required for conan development.
    • This environment should be copied to a local working dir.
    • Conan should pip install its dependencies into that working distribution.
    • The host environment shouldn't be affected. This should work on a computer without python.
  5. Profit, as we stop suffering pip insanity ;)

This has a few nice side effects. One being that the cpython recipe will always be really well debugged (lol). The other that you minimize python versioning woes and can target whichever python version you want, precisely.

I heard pipx is some sort of pipe-dream. I don't understand why we'd rely on some other language's shitty package manager when we already have the best-in-class package manager : conan.

Cheers :)

Have you read the CONTRIBUTING guide?

jacobfriedman commented 5 months ago

Please bump this and make this a TOP priority.

If you have a c++ dependency manager, and you can't manage dependencies of your own manager, then what are you fighting for?

jacobfriedman commented 5 months ago

See https://github.com/conan-io/conan/issues/15184