Comments (16)
Following the ANN for v1.1, I have refreshed the packaging repository on Alioth and attempted to rebuild the package. Few issues have come up but I'll see those I can fix downstream before bothering you here for upstream changes.
from imageio.
Thanks @ghisvail. Let me know if changes are needed. We can aim for a 1.1.1 on short notice if necessary.
from imageio.
@almarklein, what is the purpose of installing all the stuff in data_files:
- in tests/ the full test suite,
- in docs/ the sphinx sources and config script,
- in make/, not sure what this is,
- in ./ the licensing, contributors and readme files,
?
EDIT: formatting
from imageio.
Ah, I did that for you :) I understood that this would make running tests and deploying docs easier. The make/
is just a few dev tools. You can ignore it.
from imageio.
Perhaps I should have been more explicit about that.
First, I only needed the test suite and docs to be included in the source release (which is now the case), but not deployed as part of the installation. IMO, you should remove this data_files
entry from your setup.py
metadata as it will pollute other people's venv with superfluous files.
Then, I need to be able to generate the html documentation with sphinx and run the test suite without the requirement of an internet connection to fetch additional resources. Is that possible with v1.1 ?
Once again, I apologize for the confusion.
from imageio.
Ok so the core module package builds fine for both Python 2 and Python 3, without tests and docs. I have added a patch that comments out the data_files
entry of setup.py for now. Best would be for you to use a MANIFEST file and drop data_files for the next release.
Now I installed the package and tested it. On first import, I noticed imageio automatically downloaded a binary of libfreeimage over the internet and installed it in $HOME/.imageio. Can imageio use a system-installed version of libfreeimage instead ?
from imageio.
mmm... If I don't specify data_files
, the docs and tests won't be included in the source release. Do you know a good way to only have them in the source release? Scanning sys.argv should work, but feels a bit hacky.
Imageio will try to load the imageio of the system, the version in imageio-dir/resources
and ~/.imageio
. If it does not find the lib in any of these, it attempts a download. Note that it requires the version of freeimage to be >= 3.15. You can also do python setup.py build_with_fi
to download the fi lib at build time (and place in imageio-dir/resources/freeimage
.
from imageio.
Do you know a good way to only have them in the source release?
A MANIFEST.in file ?
https://docs.python.org/2/distutils/sourcedist.html#the-manifest-in-template
from imageio.
Ah, I always thought that was an auto-generated thing and never dared to touch it :) Ok, I'll apply the necessary changes soon.
What about the freeimage lib, did you find the problem? Is your system lib version >= 3.15?
from imageio.
I always thought that was an auto-generated thing
Yes it is. python setup.py sbuild
is supposed to read the content of MANIFEST.in, generate the embedded MANIFEST file and include or prune the files of the source tree according to the rules written in MANIFEST.in.
What about the freeimage lib, did you find the problem?
I have not tried it yet, I'll have a look today. Stay tune :)
from imageio.
Ok, so Debian's libfreeimage is properly recognized and used by imageio
instead of downloading it online. That allows the test suite to be run and the different binary packages for Python 2 and 3 to be built.
However, the avbin and ffmpeg plugins still download remote files despite the Debian libs / executables being installed. These would need to be addressed as well.
One option could be to simply use ctypes.utils.find_library
, which should pick whatever installed library available system-wide. On my system:
In [1]: from ctypes.util import find_library
In [2]: find_library('freeimage')
Out[2]: 'libfreeimage.so.3'
In [3]: find_library('avbin')
Out[3]: 'libavbin.so.0'
What do you think ?
from imageio.
Until now I've only focused on using system-level freeimage. Seems reasonable to do the same for avbin. For ffmpeg I am not sure. When I run ffmpeg on Ubuntu I get a deprecation warning. And IIRC there were some issues with that version (will need to look into that though).
from imageio.
Yes the situation with ffmpeg is not ideal since the forking to libav. I'll let you google the rationales of the fork or details regarding their core differences today if are interested. The consequence of the fork though was that ffmpeg got kicked out of the Debian tree (decision which has been reverted since) and Ubuntu naturally followed.
One solution would be to check whether your test suite works with Libav's "avconv" executable, provided by the libav-tools package. In that case, just make a test to check whether ffmpeg is available on the system and fallback to Libav's avconv in case it is not.
from imageio.
Closing this. I made new issues for using system-level ffmpeg and avbin.
from imageio.
This is technically not resolved though. We should close it once a Debian package worthy of submission is made.
I'd probably leave it open as a meta-issue. Your call.
from imageio.
Closing in favor of #151
from imageio.
Related Issues (20)
- ImageResource type should support bytes HOT 1
- [Bug Report] imageio v3 crashed when read hdr images after a certain number of times
- Link to the documentation in the README is broken HOT 1
- imread() fails on HTTPS, code example from documentation HOT 3
- 8bit grayscale now loaded as RGB HOT 5
- 2.31.4: documentation build fails HOT 1
- iio pyav plugin crash along with python when handling a webm file, setting format to rgba HOT 2
- It does not seem to support avif image format HOT 1
- Support for Pillow v10.1 (re: setting `image.mode`) HOT 8
- Inconsistency when reading floating point .exr image file HOT 3
- imageio.imread changes the values of graycale pixels, try to read 12-bit png grayscale image. HOT 8
- super slow video reads HOT 6
- imageio v2.33.0 requieres Pillow>=9.1.0 for GIFs HOT 1
- Trouble using freeimage plugin on MacOS arm64 HOT 2
- 2.33.1: pytest is failing in 5 units HOT 1
- [Question] What tonemapping method does the imageio library use when reading HDR images? HOT 2
- title of the gif got stacked together HOT 2
- UnicodeDecodeError if metadata is not UTF-8 encoded (pyav plugin) HOT 3
- [request] more color/palette control on GIF writing HOT 3
- Transition from v2 ffmpeg read/write to v3 pyav read/write: quality, batching HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imageio.