Skip to content
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

Python 3 dependency bloat #12333

Closed
edolstra opened this issue Jan 12, 2016 · 8 comments
Closed

Python 3 dependency bloat #12333

edolstra opened this issue Jan 12, 2016 · 8 comments
Labels
0.kind: enhancement Add something new 6.topic: closure size The final size of a derivation, including its dependencies 6.topic: python

Comments

@edolstra
Copy link
Member

The closure of the Python 3 package is much bigger than Python 2:

$ du -sch $(nix-store -qR $(nix-build -A python27))
110M    total

$ du -sch $(nix-store -qR $(nix-build -A python34))
269M    total

This is primarily due to the dependency on TCL/TK, which pulls in libX11 and other X11 libraries.

@edolstra edolstra added 0.kind: enhancement Add something new 6.topic: closure size The final size of a derivation, including its dependencies labels Jan 12, 2016
@domenkozar
Copy link
Member

Yup. Python 2 has pythonFull with all modules, Python 3 has all modules builtin.

@edolstra
Copy link
Member Author

Maybe we could have a python34Full equivalent to pythonFull? Or alternatively, put the tcl/tk stuff in a separate output. (Maybe the multiple-outputs branch already does that, @vcunat?)

@domenkozar
Copy link
Member

I don't think separate output will help with Python modules, since nothing will reference it. It will essentially work the same way as current modules for Python 2.7 (as separate derivations) need to be specified explicitly.

@vcunat
Copy link
Member

vcunat commented Jan 13, 2016

I think that's true. IIRC in that branch I was just fixing up the code to find python's dependencies.

@Profpatsch
Copy link
Member

(triage) So do we need to change anything?

@vcunat
Copy link
Member

vcunat commented Sep 28, 2016

Domen wrote it exactly, I believe. I think we shouldn't default to python3 before splitting it #18185.

@domenkozar
Copy link
Member

New figures as of 16.09 are in #19255 (comment)

@domenkozar
Copy link
Member

domenkozar commented Oct 14, 2016

In staging due to #19309:

$ du -sch $(nix-store -qR $(nix-build -A python27))
22M     /nix/store/23vndix3mzcyw84kag06h8fh464g32nq-glibc-2.24
3.4M    /nix/store/4vq58j5cdpwpxmw2272kp3g9l9g8h71v-openssl-1.0.2j
100K    /nix/store/bjcyhbv746jklqb34k0sl34vkgz9n2r5-attr-2.4.47
108K    /nix/store/caz03y58cyrqn4i5ckdw4i21g9sdjb18-zlib-1.2.8
584K    /nix/store/cx5q5z8gpvlw323ycrsdbml8b2sq1dc4-gdbm-1.12
12M     /nix/store/p4zgz3jkfkm5rd48d7mwn9x8gjrz04nv-ncurses-6.0
400K    /nix/store/d2ycd6zq2rnzxbwwhspp5hvylv3b6qvp-readline-6.3p08
140K    /nix/store/n4772agrh2d5zhdr4902410zyqwj9ln4-acl-2.2.52
11M     /nix/store/ip4rh8n3p6ajnnf584wm2qj2x3ak73i8-coreutils-8.25
84K     /nix/store/iqp3bknzw3m3m8fbcwvgkjz6gra28pln-bzip2-1.0.6.0.1
4.8M    /nix/store/kdi9rs18zcpkx62wxxcn4m4km7dq38mj-gcc-5.4.0-lib
4.4M    /nix/store/nl0j7zjk555f38aw9jvh4hbxc2pnd8j8-db-5.3.28
952K    /nix/store/s7xrn3w9kadm3azl1yxws0bcq2azn7ns-sqlite-3.14.1
828K    /nix/store/vjm2a2zviphmxiz7j1ghl2dcw6f401bl-bash-4.3-p46
51M     /nix/store/qsi6jakmkl4cgdzn61svjlw2lfvj08mh-python-2.7.12
110M    total
$ du -sch $(nix-store -qR $(nix-build -A python35))
22M     /nix/store/23vndix3mzcyw84kag06h8fh464g32nq-glibc-2.24
3.4M    /nix/store/4vq58j5cdpwpxmw2272kp3g9l9g8h71v-openssl-1.0.2j
100K    /nix/store/bjcyhbv746jklqb34k0sl34vkgz9n2r5-attr-2.4.47
344K    /nix/store/c0np5q077pj2h0zd780c6yxmyzrryf3x-xz-5.2.2
108K    /nix/store/caz03y58cyrqn4i5ckdw4i21g9sdjb18-zlib-1.2.8
584K    /nix/store/cx5q5z8gpvlw323ycrsdbml8b2sq1dc4-gdbm-1.12
12M     /nix/store/p4zgz3jkfkm5rd48d7mwn9x8gjrz04nv-ncurses-6.0
400K    /nix/store/d2ycd6zq2rnzxbwwhspp5hvylv3b6qvp-readline-6.3p08
140K    /nix/store/n4772agrh2d5zhdr4902410zyqwj9ln4-acl-2.2.52
11M     /nix/store/ip4rh8n3p6ajnnf584wm2qj2x3ak73i8-coreutils-8.25
84K     /nix/store/iqp3bknzw3m3m8fbcwvgkjz6gra28pln-bzip2-1.0.6.0.1
952K    /nix/store/s7xrn3w9kadm3azl1yxws0bcq2azn7ns-sqlite-3.14.1
828K    /nix/store/vjm2a2zviphmxiz7j1ghl2dcw6f401bl-bash-4.3-p46
72M     /nix/store/x1yi7hz7xgqf0kgda5dzaywrmf85yc06-python3-3.5.2
123M    total

Python3 $PREFIX/lib itself grew by 20MB, so not much we can do about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: enhancement Add something new 6.topic: closure size The final size of a derivation, including its dependencies 6.topic: python
Projects
None yet
Development

No branches or pull requests

4 participants