question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[question] package_info method is not working as expected

See original GitHub issue

Hello 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'

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
maitreycommented, Jun 27, 2022

Since all my questions were answered, I would like to close the issue. Thanks!

1reaction
maitreycommented, Jun 27, 2022

Hello @franramirez688 , Thanks a lot for taking care of my issue.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found