Skip to content

(#14018) hdf5: allow usage of native built for cross #14019

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

pavelb-techspark
Copy link

Specify library name and version: hdf5/all

This patch allows usage of natively-built HDF5 packages for cross-building.


  • I've read the guidelines for contributing.
  • I've followed the PEP8 style guides for Python code in the recipes.
  • I've used the latest Conan client version.
  • I've tried at least one configuration locally with the conan-center hook activated.

@CLAassistant
Copy link

CLAassistant commented Nov 4, 2022

CLA assistant check
All committers have signed the CLA.

@conan-center-bot

This comment has been minimized.

@ghost
Copy link

ghost commented Nov 4, 2022

I detected other pull requests that are modifying hdf5/all recipe:

This message is automatically generated by https://github.com/ericLemanissier/conan-center-conflicting-prsso don't hesitate to report issues/improvements there.

Comment on lines 95 to 100
def build(self):
if hasattr(self, "settings_build") and tools.cross_building(self, skip_x64_x86=True):
# While building it runs some executables like H5detect
raise ConanInvalidConfiguration("Current recipe doesn't support cross-building (yet)")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a new method validate_build() since conan 1.51.0. I guess it's the good place to prevent cross-building, while allowing to consume an existing binary in case of cross-build scenario.

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline

Sorry, the build is only launched for Access Request users. You can request access writing in this issue.

@@ -97,6 +94,11 @@ def validate(self):
not self.options["szip"].enable_encoding:
raise ConanInvalidConfiguration("encoding must be enabled in szip dependency (szip:enable_encoding=True)")

def validate_build(self):
if hasattr(self, "settings_build") and tools.cross_building(self, skip_x64_x86=True):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if hasattr(self, "settings_build") and tools.cross_building(self, skip_x64_x86=True):
if hasattr(self, "settings_build") and cross_building(self, skip_x64_x86=True):

Need to update cross_building, the old form tools.cross_building is deprecated. https://docs.conan.io/en/latest/reference/conanfile/tools/build.html#conan-tools-build-cross-building

Need to add the follow import:

from conan.tools.build import cross_building

@stale
Copy link

stale bot commented Dec 30, 2022

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Dec 30, 2022
@ghost ghost mentioned this pull request Jan 3, 2023
3 tasks
@stale
Copy link

stale bot commented Feb 2, 2023

This pull request has been automatically closed because it has not had recent activity. Thank you for your contributions.

@stale stale bot closed this Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants