Conan: How to get list of all available options for given package

Created on 10 May 2017  路  7Comments  路  Source: conan-io/conan

How to get list of all available options for given package (e.q. OpenSSL/1.0.2k@lasote/stable). I am interested in options like these:

[options]
OpenSSL:386=False
OpenSSL:no_asm=False
OpenSSL:no_bf=False
OpenSSL:no_cast=False
OpenSSL:no_des=False
OpenSSL:no_dh=False
OpenSSL:no_dsa=False
OpenSSL:no_electric_fence=False
OpenSSL:no_hmac=False
OpenSSL:no_md2=False
OpenSSL:no_md5=False
OpenSSL:no_mdc2=False
OpenSSL:no_rc2=False
OpenSSL:no_rc4=False
OpenSSL:no_rc5=False
OpenSSL:no_rsa=False
OpenSSL:no_sha=False
OpenSSL:no_sse2=False
OpenSSL:no_threads=False
OpenSSL:no_zlib=False
OpenSSL:shared=False
OpenSSL:zlib_dynamic=False

question

Most helpful comment

Well it was in 2017, but inspect was released in Conan 1.8 (10/2018), so now you can:

conan inspect -a options -r bincrafters qt/5.12.0@bincrafters/stable

All 7 comments

Currently, the way to know the options is to check the conanfile.py. It can be inspected in conan.io. You can also directly download the conanfile.py from Artifactory to read it.

Also, this quick trick will list you the list of options:

$ conan install OpenSSL/1.0.2k@lasote/stable -o OpenSSL:dummy=dummy
ERROR: OpenSSL/1.0.2k@lasote/stable: 'options.dummy' doesn't exist
Possible options are ['no_asm', 'no_rsa', 'no_cast', 'no_hmac', 'no_sse2', 'no_zlib', 'shared', 'no_electric_fence', 'no_threads', 'no_md5', 'no_md2', '386', 'no_des', 'no_mdc2', 'no_sha', 'no_dsa', 'zlib_dynamic', 'no_dh', 'no_bf', 'no_rc2', 'no_rc5', 'no_rc4']

Maybe an easier way to read the conanfile of a package from the client could be provided, but not sure about the value/complexity ratio of this feature.

Got it. As far as I understood there are no description of these options.

Conan doesn't model any description of the options, it is up to package creators to properly document them in the recipe. They will be typically direct maps to the build system of the library being packaged, in this case, I guess they should be documented in OpenSSL.

Thanks.

You are welcome. Just re-open if you later consider than the UX for this use case is bad enough for a specific feature that will allow easier listing of the conanfile.py, and we will consider possible solutions. Thanks!

I think this feature should probably be added. As a point where this matters, the conan-qt package's conanfile.py creates several options programmatically. The names of the options do not appear in the conanfile.py at all.

Well it was in 2017, but inspect was released in Conan 1.8 (10/2018), so now you can:

conan inspect -a options -r bincrafters qt/5.12.0@bincrafters/stable

Was this page helpful?
0 / 5 - 0 ratings