jparyani / ipython

Official repository for IPython itself. Other repos in the IPython organization contain things like the website, documentation builds, etc.
http://ipython.org
6 stars 6 forks source link

Add some always-includes to ensure that python3 works. #13

Closed dwrensha closed 8 years ago

dwrensha commented 8 years ago

Fixes #12.

Looks like @jparyani intended to do something like this in https://github.com/jparyani/ipython/commit/61e03b88072521c6727ad0ccd9581e596e348213.

python3 stats some files on startup, but does not actually open them unless they are needed. This made it so that python3 appeared to work without any problems undervagrant-spk dev, but then failed to start at all in release mode, because the stat()ed files were not automatically included.

/usr/lib/python3 and /usr/lib/python3.4 are the directories that I needed to add to solve the problem (and they are the ones with the bulk of the new content), but I figured it would be good to include the other /usr/lib/py* directories as well.

Note that after this change, the spk grows to ~ 178MB.

zertrin commented 8 years ago

Note that after this change, the spk grows to ~ 178MB.

Just for reference, what was the size previously?

Do you know which part of the new inclusions contributes the most to the increase in size?

dwrensha commented 8 years ago

I mentioned the size because @jparyani and I had been having an offline discussion about whether it makes more sense to release separate apps for python2 and python3 support.

The currently-released spk is approximately 108MB.

After uncompressing with spk unpack on my new version, I get:

 du --max-depth=1 -h usr/lib/
5.7M    usr/lib/lapack
75M     usr/lib/python3.4
63M     usr/lib/x86_64-linux-gnu
12K     usr/lib/python-tz
252K    usr/lib/pyshared
80M     usr/lib/python3
170M    usr/lib/python2.7
516K    usr/lib/libblas
184K    usr/lib/pymodules
395M    usr/lib/
$ du --max-depth=1 -h usr/local/lib
120M    usr/local/lib/python3.4
144M    usr/local/lib/python2.7
267M    usr/local/lib

The main content of these directories consists of the installed python packages, e.g.:

$ du --max-depth=1 -h usr/local/lib/python3.4/dist-packages/
36K     usr/local/lib/python3.4/dist-packages/jupyter_client-4.3.0.dist-info
80K     usr/local/lib/python3.4/dist-packages/ipython-5.0.0.dist-info
7.7M    usr/local/lib/python3.4/dist-packages/capnp
504K    usr/local/lib/python3.4/dist-packages/jupyter_core
56K     usr/local/lib/python3.4/dist-packages/prompt_toolkit-1.0.3.dist-info
680K    usr/local/lib/python3.4/dist-packages/bs4
220K    usr/local/lib/python3.4/dist-packages/ipython_genutils
28K     usr/local/lib/python3.4/dist-packages/beautifulsoup4-4.5.0.dist-info
28K     usr/local/lib/python3.4/dist-packages/pycapnp-0.5.9.egg-info
100K    usr/local/lib/python3.4/dist-packages/wcwidth
36K     usr/local/lib/python3.4/dist-packages/pyzmq-15.3.0-py3.4.egg-info
72K     usr/local/lib/python3.4/dist-packages/pyximport
44K     usr/local/lib/python3.4/dist-packages/wcwidth-0.1.7.dist-info
792K    usr/local/lib/python3.4/dist-packages/ipykernel
32K     usr/local/lib/python3.4/dist-packages/ipykernel-4.3.1.dist-info
188K    usr/local/lib/python3.4/dist-packages/pandas-0.18.1.egg-info
36K     usr/local/lib/python3.4/dist-packages/jupyter_core-4.1.0.dist-info
5.6M    usr/local/lib/python3.4/dist-packages/pygments
32K     usr/local/lib/python3.4/dist-packages/ipython_genutils-0.1.0.dist-info
5.6M    usr/local/lib/python3.4/dist-packages/IPython
28K     usr/local/lib/python3.4/dist-packages/pickleshare-0.7.3.dist-info
660K    usr/local/lib/python3.4/dist-packages/jupyter_client
60M     usr/local/lib/python3.4/dist-packages/pandas
28K     usr/local/lib/python3.4/dist-packages/backports_abc-0.4.dist-info
1.4M    usr/local/lib/python3.4/dist-packages/setuptools
68K     usr/local/lib/python3.4/dist-packages/setuptools-25.0.0.dist-info
28K     usr/local/lib/python3.4/dist-packages/traitlets-4.2.2.dist-info
28K     usr/local/lib/python3.4/dist-packages/pexpect-4.2.0.dist-info
3.2M    usr/local/lib/python3.4/dist-packages/tornado
100K    usr/local/lib/python3.4/dist-packages/Cython-0.24.1.egg-info
28K     usr/local/lib/python3.4/dist-packages/simplegeneric-0.8.1-py3.4.egg-info
764K    usr/local/lib/python3.4/dist-packages/pkg_resources
368K    usr/local/lib/python3.4/dist-packages/pexpect
3.8M    usr/local/lib/python3.4/dist-packages/zmq
716K    usr/local/lib/python3.4/dist-packages/traitlets
2.1M    usr/local/lib/python3.4/dist-packages/prompt_toolkit
88K     usr/local/lib/python3.4/dist-packages/__pycache__
28K     usr/local/lib/python3.4/dist-packages/six-1.10.0.dist-info
56K     usr/local/lib/python3.4/dist-packages/Pygments-2.1.3.dist-info
16K     usr/local/lib/python3.4/dist-packages/ptyprocess-0.5.1.dist-info
88K     usr/local/lib/python3.4/dist-packages/ptyprocess
28K     usr/local/lib/python3.4/dist-packages/tornado-4.4.1-py3.4.egg-info
26M     usr/local/lib/python3.4/dist-packages/Cython
120M    usr/local/lib/python3.4/dist-packages/

It looks like pandas is the largest such package, at 60MB.