[question] package_info method is not working as expected
See original GitHub issueHello Conan Folks, I have set up host profile and build profile I use a default one. I have set up cmake toolchain repo where I am setting up the necessary compiler and linker flags. But the package_info method seems to work in a loop and doesnot work as expected. I am not sure what i am doing wrong.
def package_info(self):
if self.settings_target.os == "Windows" and self.settings_target.arch == "ndp":
self.env_info.CMAKE_TOOLCHAIN_FILE = os.path.join(self.package_folder, "src", "ndp.cmake")
self.env_info.CONAN_CMAKE_TOOLCHAIN_FILE = os.path.join(self.package_folder, "src", "ndp.cmake")
elif self.settings_target.os == "Windows" and self.settings_target.arch == "kdp":
self.env_info.CMAKE_TOOLCHAIN_FILE = os.path.join(self.package_folder, "src", "kdp.cmake")
self.env_info.CONAN_CMAKE_TOOLCHAIN_FILE = os.path.join(self.package_folder, "src", "kdp.cmake")
else:
print("No target settings defined")
print("Using '" + self.env_info.CMAKE_TOOLCHAIN_FILE + "' as CMake toolchain file")
I use : conan create . 1.0.0@test/devel -pr:b=default -pr:h=kdp
it does pick and print the correct toolchain file but in the end also fails with:
Error in package_info() method, line 32
if self.settings_target.os=="Windows" and self.settings_target.arch == "kdp":
AttributeError: 'NoneType' object has no attribute 'os'
- [ x] I’ve read the CONTRIBUTING guide.
Issue Analytics
- State:
- Created a year ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Trying to get Package Version Information to display in an ...
I have constructed a Parcelable Interface with all of the fields associated with the PackageInfo Object type. The primary input for that ...
Read more >Some plugins breaks on release mode on Android #78625
Any answer on this issue, apply several fixes that present but I still have the same problem. My device is a xiaomi redmi...
Read more >Fixing the “Declared package does not match the expected ...
In this article, we'll investigate the “Declared package does not match the expected package” error in a java project.
Read more >Solved . a #Array package-info.java eclipse-workspace - Chegg
HELP ME SOLVE THIS, "THE DECLARED PACKAGE DOES NOT MATCH THE EXPECTED PACKAGE . a #Array package-info.java eclipse-workspace - v-coronado.
Read more >Developing Android unit and instrumentation tests - Tutorial
This tutorial describes how to write unit and instrumentation tests for your Android application. It describes how to execute these tests via Android...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Since all my questions were answered, I would like to close the issue. Thanks!
Hello @franramirez688 , Thanks a lot for taking care of my issue.