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
Improve detection of the libxml2 and libxslt libraries #297
Conversation
b17339d
to
559b649
Compare
setupinfo.py
Outdated
if xml2_version and xslt_version: | ||
return xml2_version, xslt_version | ||
|
||
# One or both build dependencies not found. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This used to be the case for the Windows build with pre-built downloaded libraries. Failing hard here breaks this.
Either it should continue here, or we also need to integrate that part of the build here. I think not failing seems like the easiest way to keep it working for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think failing is useful, otherwise the build just fails later on, since the headers are missing.
I'd like to keep the hard failure for Linux platforms, but allow Windows builds to keep going. Would you be happy with a conditional guard? For example:
if not sys.platform.startswith('win'):
print("Error: Please make sure the libxml2 and libxslt development packages are installed.")
sys.exit(1)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I've pushed a slightly different solution to this.
In general, given the complexity of the build system, I think it makes sense to more closely integrate the library version check and the 'find' library logic. So, you could potentially have a function, |
559b649
to
8b707f1
Compare
Fixes Launchpad bug #1863413
8b707f1
to
09b57d9
Compare
Thanks! |
Hi @scoder, @hughmcmaster, I am looking at the Yocto/OpenEmbedded recipe for
By looking at Thanks, |
@leon-anavi, the build flags have been replaced by @scoder: do you want to use |
Thanks for the quick feedback. One more thing: I've already tried flags without
To be honest, I haven't debugged this issue in details, however release 4.5.1 with Best regards, Leon |
… again, after accidentally renaming them to "--xml2-config" and "--xslt-config" in 4.5.1. See #297 (comment)
@leon-anavi Thanks for noticing, I pushed a fix. Regarding your second issue, |
Thank you!
Well, the exact command is just
The snippet above is with release 4.5.1 from pypi.org without your recent fix so with If I use again 4.5.1 but with Thanks, |
After further debugging, the issue while building through
I can fixed for my specific case with a patch for Could you please let me know for an appropriate solution? Best regards, |
@leon-anavi Support for |
Hi @hughmcmaster, @scoder, Thank you both for the help and the suggestions. I confirm it builds fine without the flags. I am trying to upstream this change to Yocto/OE layer meta-python. I've just submitted an update for the patch and I have added git commit message trailer to both of you: https://lists.openembedded.org/g/openembedded-devel/topic/meta_python_patchv2/74793461?p=,,,20,0,0,0::recentpostdate%2Fsticky,,,20,2,0,74793461 Thanks, |
This patch improves detection of the libxml2 and libxslt libraries by cleaning up some of the overly-complex build system.
The patch also improves support for using
pkg-config
if available.