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
Better distribution - archives with libs and images #45
Conversation
We keep a special directory for local resources. Then we can create wheels for distribution that have the FreeImage lib and a couple of images inside this directory.
All distribution files are independent of the Python version. The | ||
platform-specific archives contain a few images and the freeimage | ||
library for that platform. These are recommended if you do not want to | ||
rely on an internet connection at runtime. |
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.
Do you mean at install time?
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.
both, I suppose.
@ghisvail Can you confirm that the following would solve the Debian building issues?
|
I just had a look in the Does it mean that:
|
I also had a look at the freeimage plugin and saw that you were using embedded copies of libfreeimage for each platforms with some hard-coded names. I have no objections with this design but I was wondering whether it would be possible to alter this design to use a system-wide installed libfreeimage instead of the embedded copy. Reason I am asking is that Debian / Ubuntu already ships with freeimage 3.15 and any project depending on it should use / link with it. |
It produces a zipfile for the 5 major platforms. And it does not contain all remote content, but enough to run a significant part of the test suite. It does not contain e.g. the ffmpeg exe or avbin lib. Would it be helpful if there was a
Indeed. Except that I have not made a hook to run the tests via |
About the embedded freeimage libraries vs system level. I found that the system-level freeimage library can be quite old on some systems, giving rise to bugs. Previously we only shipped them for Windows and OSX, but due to this, now also for Linux. Do you think that's a problem? |
Regarding the Regarding the distributed source, I'd need:
Regarding the freeimage:
Does it sound like too much work ? |
Ok, I added the
I'd rather do it the other way around: use the embedded version if it is detected, otherwise use the system one. That way it would be easy for the user to "upgrade" freeimage if necessary. For the Debian build process, this means we'd simply not ship the freeimage library. However, this may cause some tests to fail. Are you ok with figuring out what to do about this in a new PR? |
You could detect the freeimage version and exit those tests with a warning |
That's what I meant.
You could still ship it and save yourself the time of producing multiple release tarballs. We have support for stripping the upstream tarball from non-compliant files like pre-compiled binaries. |
imageio-provided lib has preference if it is already downloaded. If version <15, the lib will be downloaded. This means that on relatively modern Linuxes, that have freeimage installed, the freeimage lib wont be downloaded at all.
@ghisvail I did the following: imageio will first try to find a freeimage library on the system. If not found, or if the version is < 15, the imageio prebuild version is auto-downloaded and used. In the first search, the imageio-provided lib has preference. Sounds good? |
👍 |
@ghisvail So you can indeed strip the freeimage lib from the package, and it should work pretty much as Debian likes. |
Better distribution - archives with libs and images
For better building of a Debian package #40, and to be nice for people with no internet connection #42.
This closes #40, closes #42, closes #39.