Comments (7)
Hi @huysentr
Not sure what is the issue with conan install --format=json > mygraph.json
.
All the application messages in Conan 2 is directed to stderr
, so they don't interfere with stdout
and the above works fine.
from conan.
I'm working in someone elses python code, and I can only modify the command, but not redirect its output. If this is the only way I will have to modify the library, no problem, it might just interfere with the approval of my PR.
from conan.
But Conan recipes are the thing running others code, via self.run()
, see https://docs.conan.io/2/reference/conanfile/running_and_output.html#running-commands.
The self.run()
already by default sends the output to stderr
, so this shouldn't be a problem either. Conan 2 even redirects the print()
default to stderr
.
In theory it shouldn't be necessary to modify others code.
from conan.
I'm not sure I'm following.
The code I'm working on has an API to run a command, inside that the library of that API I see process= subprocess.Popen( cmd, stdout = None, stderr = None)
I can pass the cmd to this API, but not modify those things, I'm passing a conan install command. (I can modify those things ofc, but that's a different step)
from conan.
Ok, I think I understand now, thanks for the explanations.
So there is a Python dependency (from pip install
package or something similar, I guess?) and that library is internally doing a Popen without redirecting the streams.
Yes, I am afraid this is something that would need some provision inside that Python library code. The usual approach when some Python code is managing subprocess is to use some configurable redirection/pipe or passing stream handlers, so the library can operate without polluting the caller standard streams (for example if the caller wants for some reason to silently execute that functionality). Conan operates on the assumption that it is possible to redirect the output of the subprocesses that it is launching, directly or indirectly within recipes.
If the code is doing stdout = None, stderr = None
then it seems there is little to do, so it would be necessary to adapt that code.
from conan.
Hi @huysentr
Did you manage to get it working updating the library? Any further question?
Thanks for the feedback.
from conan.
Closing as resolved, feel free to re-open or create new tickets as necessary, thanks for the feedback.
from conan.
Related Issues (20)
- [not-bug] "conan list" prints letter Z instead of a last digit when printing dependency versions e.g. "zlib/1.3.Z" HOT 2
- [question] "recommended flow" for updating a dependency in a lockfile without pulling other dependencies? HOT 5
- [bug] Wrong paths to profiles in docker runner HOT 1
- [bug] conan inspect is not showing requirements HOT 4
- [question] How to validate Options of a Dependency Package in conan v1 HOT 10
- [question] Conan SSL Errors With Artifactory HOT 4
- [question] How to properly "evolve" lockfiles? HOT 12
- [question] Migrating custom generator + user_info to Conan 2.0 HOT 3
- [question] cpp_info in editable mode HOT 1
- Building Qt 6.5.3 fails using conan 2.1.0 and 2.5.0 HOT 5
- [question] Conan 'home' with CI/CD Runners HOT 3
- [question] How to access `package_folder` in an extension command with settings/profiles HOT 3
- conan not working properly when using GNUInstallDirs HOT 3
- [question] combination of several conan configurations HOT 2
- [bug] building QT 6.5.3 under WSL2, conan builds/installs a "cmake" that fails to run. HOT 3
- [bug] `conan list -r` do not list packages HOT 3
- [bug] Remote login variables not working in docker runner
- [bug] inconsistent `-f` options HOT 1
- [question] Adding test_package which automatically sets up environment for run-time linkage to tested reference HOT 1
- [question] How can I set config `conan config set core.upload:parallel 10` in conan v2? 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.