Comments (5)
Hi @peakschris
I am not sure if I get this one either.
The main problem is that it seems you are trying to use a "local" mechanism, that is the ".conanrc", that is 100% intended to be location-specific and local "per-user-folder" mechanism to implement some global configuration.
I know that this can be set globally with CONAN_USER_HOME, but it is non-trivial to automatically set this environment variable in configuration scripts and have it apply to both current and future shells.
This seems counter intuitive, having to create a file in a specific location so the application can read it to define the equivalent of an env-var looks like overkill to me. How is that simpler than directly creating a CONAN_HOME env-var in the system? Creating env-vars in systems is kind of pretty standard procedure. There are tons of apps that require a XXX_HOME env-var in the first place (defaulting to something like <userhome>/.xxx
if not defined), I mean this is not specific to Conan.
In Windows, that it seems to be your platform it would be just setx CONAN_HOME <yourpath>
, and that will set it for all shells. Maybe I am missing something?
from conan.
What I'm trying to do is to use conan to automatically install some binary packages such as git, python, node and other dev tools onto user's machines. I had thought that we could leverage conan's automations to create pipelines to build these things from source, cache them in our internal artifactory, and automate consumption onto user machines. Since these are global tools, they need to be installed to a global location, regardless of where the user runs the 'install' or 'update' tools from.
Once installed, I was creating symlinks from a known location on path into the appropriate package so that they could be run outside context of conan.
Using envvars is OK, but it's tricky to cover all the cases. setx sets the variable for future shells, but not the current one. bashrc works for bash, but not csh. Setting the envvar from python into the shell that will be active once the python script finishes is impossible.
Maybe conan is over-engineering this problem; maybe I should automate the packaging and push to artifactory and write a regular tool to fetch and extract zipfiles...
I'd be keen to hear your thoughts,
from conan.
What I'm trying to do is to use conan to automatically install some binary packages such as git, python, node and other dev tools onto user's machines. I had thought that we could leverage conan's automations to create pipelines to build these things from source, cache them in our internal artifactory, and automate consumption onto user machines. Since these are global tools, they need to be installed to a global location, regardless of where the user runs the 'install' or 'update' tools from.
But that might be a different angle than what we have been discussed before.
If you want to install them to a global location, isn't this a more regular "system" installation? Have you considered using something like a Conan deployer to install those things in the global location that you want? If the tools are kind of global, it wouldn't be nice for example if some user does conan remove "*" -c
to clean their caches from "libraries", but then all the symlinks pointing to the cache are broken. Looks like the issue might be using a "local" and temporary storage, a "cache" of packages, as a global thing?
Once installed, I was creating symlinks from a known location on path into the appropriate package so that they could be run outside context of conan.
This kind of task might also be nicely automated in a Conan custom command extension.
Maybe conan is over-engineering this problem; maybe I should automate the packaging and push to artifactory and write a regular tool to fetch and extract zipfiles...
Not really, there are a bunch of aspects that still need to be managed, like versioning, updates, different binaries for different platforms, etc. It is way more doable with just tools than general C++ library packages, but still it can get a bit messy to be done manually if it is more than just a very few tools.
I am having a look to letting the recursive look for .conanrc file let reach the root of the filesystem, maybe it is possible to relax that, but still it could be the deployer
approach would fit better?
from conan.
Proposing #16514, no guarantees, but lets check with the team.
from conan.
#16514 was merged, it will be in next 2.5.
Note however the comments above, it sounds there would be better approaches like deployers, custom commands, etc, rather than having this .conanrc
in the filesystem root.
from conan.
Related Issues (20)
- [suggestion] Allow specifying commit hash when installing config from git repository with `conan config install` HOT 3
- [bug] `self.source_folder` varies whether building with `conan create .` or `conan build .`. HOT 2
- [question] Artifactory compatibility between Conan 1 and Conan 2? HOT 6
- [question] alternative solution to Conan 1 alias? HOT 4
- Server side atomic uploads for concurrent uploads
- [question] compatibility strategy for Conan 1 between "Visual Studio" and "msvc"? HOT 3
- [question] How to properly capture SCM in complex scenarios? HOT 1
- [bug] __pycache__ presence violates cached package integrity HOT 10
- [feature] Manifold workspace HOT 6
- [question] Best practices to use Conan in large projects HOT 2
- [bug] VirtualBuildEnv causes compiler to load shared libraries from conan cache? HOT 11
- [question] runtime_deploy copying deps with run=False trait HOT 3
- [question] How to build locally with msys2 HOT 3
- [feature] Better error message when profile defines a tool_require loop by mistake HOT 1
- [bug] conan should not change ownership of files while extracting conan_package.tgz HOT 3
- [question] Undefined zlib references when building Qt
- [question] How to erase values from one profile to the other HOT 3
- [bug] required tool paths gets overridden when using host profiles HOT 3
- [question] CMake no depencency include directories in VS solution HOT 6
- [question] Support for gcc 14 in Conan 1 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from conan.