Open db4 opened 6 years ago
Yes. Looks like a bug. About passing options, no, you have to iterate/modify or create your builds with the wanted options:
builder = ConanMultiPackager(username="myusername")
builder.add(settings={"arch": "x86", "build_type": "Debug"},
options={}, env_vars={}, build_requires={})
I've been checking it and it is not really a bug, currently it admits only a profile name (not a path) that has to be in the profiles folder of the local cache. It will require some time to make it work.
While it was slightly inconvenient for me to get profiles and CPT figured out in an enterprise environment, I found it crucial to minimize the mingling between host OS and the docker container. Still, it does seem sub-optimal to have the container profiles come directly from the hostOS. I don't have a suggestion for how it SHOULD work though.
The strategy that ended up working well for us was the following, but this doesn't feel like a "permanent" solution.
By adding the below to build.py, the docker containers get all the profiles from git each time they run.
os.environ["CONAN_DOCKER_ENTRY_SCRIPT"] = ("conan config install "
"http://our_scm_server"
"/our_git_repository_for_profiles"
"/archive?format=zip")
Ok, now I also want to be able to pass: ./my_relative_profile
As a workaround in our CI, since it's always windows, i'm doing %CD%/my_relative_profile
I expected that according to conan docs
builder.run("./my_profile)
would search formy_profile
in the current directory. That's not the case:Should it be considered as a bug?
BTW, is there any other way to pass a package option to the builder?
python build.py -o package:option=value ...
doesn't work as well asbuilder.run(args="-o package:option=value ...")