Skip to content

Instantly share code, notes, and snippets.

@evandrocoan
Created September 7, 2023 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evandrocoan/4cf9bf6139d1e53c710ad006be574281 to your computer and use it in GitHub Desktop.
Save evandrocoan/4cf9bf6139d1e53c710ad006be574281 to your computer and use it in GitHub Desktop.

conan-io/conan#6064 (comment)

    def test_transitive_editables_build(self):
        c = TestClient()
        libb = textwrap.dedent("""\
            from conan import ConanFile
            class LibB(ConanFile):
                name = "libb"
                version = "0.1"
                build_policy = "missing"
                settings = "os", "compiler", "arch"

                def build_requirements(self):
                    self.build_requires("liba/[>=0.0]")

                def requirements(self):
                    self.requires("liba/[>=0.0]")
            """)
        c.save({"liba/conanfile.py": GenConanfile("liba", "0.1"),
                "libb/conanfile.py": libb,
                "app/conanfile.txt": "[requires]\nlibb/0.1"})
        c.run("editable add liba liba/0.1")
        c.run("editable add libb libb/0.1")
        c.run("install app --build=*")
        print(c.out)
        # Try also with 2 profiles
        c.run("install app -s:b os=Windows --build=*")
        print(c.out)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment