conda-forge / python-feedstock

A conda-smithy repository for python.
BSD 3-Clause "New" or "Revised" License
46 stars 105 forks source link

A slimmer python #581

Open hmaarrfk opened 2 years ago

hmaarrfk commented 2 years ago

Comment:

I'm wondering if there is enough enthusiasm for having a slim python build. My main motivation is to help ensure that downstream packages that depend on python, also declare the dependencies they have on other libraries. The ones that come to mind are:

I'm not sure about the implementation, but maybe we can have a behavior similar to pip, where during the build process they aren't pulled in automatically, but for regular users they are? I know that the pip feature is engrained pretty deep into conda, so maybe it isn't that desirable to use it, but the behavior:

With non-python packages, this has typically resulted in the creation of a "core" package. This would mean that the dependency graph might look like

           /----- python-readline ----\------------------> readline
          /------ python-sqlite -------\-----------------> sqlite
python ------------------------------------ python-core
          \-------python-tk------------/-----------------> tk

with tk, sqlite and readline being removed as dependencies from python-core.

PS. I know this conversation is quite cyclic in nature but I figured it is time to revive it.

peterroelants commented 2 years ago

I rencently have been pondering something similar when I noticed that the conda-forge Python interpreter is about 50MB larger than the python-minimal interpreter from Debian/Ubuntu.

Let me know if this is a duplicate question: https://github.com/conda-forge/python-feedstock/issues/586

jakirkham commented 2 years ago

Yeah it sounds like the same thing. Let's consolidate into this issue. If you spot anything else that hasn't already been suggested for splitting above, please feel free to add that as a comment here. Thanks! 🙏

peterroelants commented 2 years ago

From Duplicate: https://github.com/conda-forge/python-feedstock/issues/586

Comment:

Would it be of interest to provide a python-minimal package in conda-forge providing a minimal installation of Python, similar in spirit to e.g. the Debian/Ubuntu python3.10-minimal packages?

I noticed that the python3.10 lib directories differ about 50MB in size:

The conda-forge python package contains things like turtledemo, tkinter, lib2to3 which are not typical requirements and are not in python3.10-minimal.

jakirkham commented 2 years ago

Do turtledemo or lib2to3 take up significant space?

hmaarrfk commented 2 years ago

about 0.5MB and 1.2MB respectively it seems.

jakirkham commented 2 years ago

IMHO lib2to3 still feels pretty core to Python. Some packages rely on it in their build processes.

No strong feelings on turtledemo.