[Python] Is there any advanced use of the autogenerated .bat/.sh generator conan files(e.g.:...

Discussão em 'Python' iniciado por Stack, Abril 30, 2025.

  1. Stack

    Stack Membro Participativo

    I am using conan version 2.12 and this command:

    conan install -r --output-folder= --build=missing

    [requires]
    zlib/1.2.13

    [tool_requires]
    cmake/3.22.6
    make/4.4.1
    ninja/1.12.1

    [generators]
    CMakeDeps
    CMakeToolchain


    I am currently using this kind of conanfile.txt to create and add path of build tools like make, cmake, ninja or some other external library to the system environment variables.

    For some cases, I am also using conanfile.py to set some custom variable or paths like this:

    def generate(self):
    env1 = Environment()
    env1.define("foo", "var")
    envvars = env1.vars(self, scope="build")
    envvars.save_script("my_env_file")


    As per my requirements, I have to copy the package content in the build folder and that part is fine. I was just wondering is there any special use of these autogenerated .bat/.sh files. Any kind of insight is appreciated.

    Other than setting path and variable to system environment variables, In conan documentation, other use cases of these .bat files are not discussed properly, so I am a little bit confused and any different kind of example usage of these batch files is welcome.

    Thanks in advance!

    Continue reading...

Compartilhe esta Página