New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] "--raw <attribute>" still checks "python_requries" #6437
Comments
Hi @tharilya The case of python_requires is different, specially the ones that you are using. A recipe cannot be evaluated at all if the python_requires are not evaluated. As you might extend/inherit the recipe, you really need to fetch, parse, and apply that other recipe, in order to see the current one. Please provide an example of a python_requires that actually exists. Does in that case affect the output? Also note that the python_requires have changed syntax: https://docs.conan.io/en/latest/extending/python_requires.html This might help a bit to alleviate some problems, but still you should consider them as part of the recipe, not as a "library" dependency, so they should exist and be available in order to be able to use/inspect/consume a recipe. |
Hi @memsharded It's working with an existing python_requires
example of existing python require (everything is working, as written above) conan new a_pkg/1.33.7@aUser/aChannel
conan install .
sed -i '2i from conans import python_requires' conanfile.py
sed -i '3i python_requires(\"pybind11/2.2.2@conan/stable\")' conanfile.py
conan inspect . --raw name Example 2 (new syntax) conan new a_pkg/1.33.7@aUser/aChannel
conan install .
sed -i '16i\ \ \ \ python_requires = \"pybind11/2.2.2@conan/stable\"' conanfile.py
conan inspect . --raw name Not working with non existent ones ... Is this behavior intended? If no, here is the complete terminal from the docker-container: Steps to reproduce: docker run -it --rm conanio/gcc9
conan new a_pkg/1.33.7@aUser/aChannel
conan install .
sed -i '16i \ \ \ \ python_requires = \"non-existent/version@user/channel\"' conanfile.py
conan inspect . --raw name Complete-Log from Docker-Container:
|
Yes, totally expected. So yes, I would say this is not a bug, it is expected behavior. |
Ok, thank you for the explanations and the fast response. Kind Regards |
Hi,
I think ran into 'nearly the same' issue, like #5656 & #5702. This time with "python_requries".
Usecase:
I want to read the "name" and the "version" attribute of a conan-file without downloading / having issues with the dependencies. So I tried it with the "--raw" argument. But in case of dependencies of python-requires, I get errors.
Are these intended?
Environment Details (include every applicable attribute)
Linux ba53e1572d47 4.9.184-linuxkit #1 SMP Tue Jul 2 22:58:16 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
nothin selected
Conan version 1.21.1
Python 3.7.5
Steps to reproduce (Include if Applicable)
(environment is the docker-container from conan-io gcc9
3.1.
conan inspect . --raw name
works at this momentLogs (Executed commands with output) (Include/Attach if Applicable)
Log-Msg:
The text was updated successfully, but these errors were encountered: