Skip to content

Commit 2ad7334

Browse files
authored
change conditional back to explicit if/else
doing this because in the training we say: "if you're new to python, you can refer to the build() method as an example of how to write a conditional.
1 parent 64f818a commit 2ad7334

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

requires_conditional/conanfile.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ def requirements(self):
1515

1616
def build(self):
1717
cmake = CMake(self)
18-
cmake.definitions["WITH_ZIP"] = bool(self.options.zip)
18+
if self.options.zip:
19+
cmake.definitions["WITH_ZIP"] = "1"
20+
else:
21+
cmake.definitions["WITH_ZIP"] = "0"
1922
cmake.configure(source_folder="src")
2023
cmake.build()
2124

0 commit comments

Comments
 (0)