Closed krallin closed 9 years ago
I am hesitant of adding a library that is specifically only for a python module since buildpack-deps
is supposed to be common packages for many languages. Do you know if liblzma
is needed for a module of any of the other languages that use buildpack-deps, like ruby
or node
? If we can find some, then I am +1 on adding this in.
@yosifkit ,
Well, I guess most libraries providing xz
compression will use it (specifically: it seems that both ruby-xz
and node-xz
do so).
However, note that this isn't for a Python module in the sense of something you install from PyPi.
Instead, the lzma
module is from the stdlib and compiled when compiling Python itself. In practice, this means that if you don't have liblzma
installed when Python is compiled, then the tarfile
Python module — which is from the stlib as well — won't be able to open tar.xz
archives, which is sad (just like you wouldn't have the sqlite
stdlib module if libsqlite
wasn't installed when you compiled).
In other words, it's an equivalent to libbz2-dev
(which is in the buildpacks), except it's for xz
, not bz2
.
Cheers,
Ah, that sounds reasonable. Can you amend this commit to put it in alphabetical order :wink:? Thanks for your contribution.
Feel free to ping once it is updated since github does not notify of pushes to PRs.
@yosifkit
Sure, pushed!
Cheers,
LGTM
Is there an example Gem or NPM module that uses this? I haven't had much luck in finding one.
@tianon ,
https://github.com/Quintus/ruby-xz (https://rubygems.org/gems/ruby-xz) https://github.com/oorabona/node-liblzma (https://www.npmjs.com/package/node-liblzma)
In general, I think most libraries that do XZ (de)compression would rely on liblzma.
Cheers,
LGTM
Especially since in looking, a number of the language stack images already have this dep included at runtime:
$ docker run --rm ruby dpkg --get-selections | grep liblzma
liblzma-dev:amd64 install
liblzma5:amd64 install
$ docker run --rm node dpkg --get-selections | grep liblzma
liblzma-dev:amd64 install
liblzma5:amd64 install
$ docker run --rm python dpkg --get-selections | grep liblzma
liblzma-dev:amd64 install
liblzma5:amd64 install
Thanks, @tianon!
libzlma is (among other things of course) used in Python to build the lzma module.
Considering it's a small package (and that e.g. zlib is in here), I thought it might make sense to include it here.
Cheers,