libpython3-stdlib 的目的

libpython3-stdlib 的目的

Ubuntu 有以下libpython3软件包

libpython3-all-dbg
libpython3-all-dev
libpython3-dbg
libpython3-dev
libpython3-stdlib

除了 之外的所有包都是有意义的libpython3-stdlib。包的内容是:

/usr/share/doc/libpython3-stdlib/README.Debian
/usr/share/doc/libpython3-stdlib/changelog.Debian.gz
/usr/share/doc/libpython3-stdlib/copyright

为什么这些文件是单独安装的,而不是作为python3软件包的一部分安装?

答案1

包装libpython3-stdlib作为单独的包允许需要的程序libpython3-stdlib及其依赖项,只需一个命令即可轻松安装它们。Ubuntu apt-cache rdepends libpython3.6-stdlib18.04 中的结果:

$apt-cache 依赖 libpython3.6-stdlib
libpython3.6-stdlib
反向依赖:
  libpython3.6
  空闲-python3.6
  空闲-python3.6
  python3.6
  python3-tk
  python3-tk
  python3-lib2to3
  python3-lib2to3
  python3-distutils
  python3-distutils
  libpython3.6-最小
  libpython3.6-dev
  libpython3.6-dbg
  空闲-python3.6
  libpython3-stdlib
  空闲-python3.6
  python3-distutils
  python3.6
  python3-tk
  python3-tk
  python3-lib2to3
  python3-lib2to3
  python3-distutils
  libpython3-stdlib
  libpython3.6-最小
  libpython3.6-dev
  libpython3.6-dbg
  libpython3.6

这些包都需要 libpython3.6-stdlib,它本身是 libpython3-stdlib 的依赖项。

apt show libpython3-stdlib从Ubuntu 18.04的结果来看:

Python, the high-level, interactive object oriented language, includes an extensive class   
library with lots of goodies for network programming, system administration, sounds   
and graphics.

This package is a dependency package, which depends on Debian's default Python 3 version    
(currently v3.6).  

结果apt-cache depends libpython3-stdlib

libpython3-stdlib
  依靠:libpython3.6-stdlib

apt show libpython3.6-stdlib从Ubuntu 18.04的结果来看:

Python is a high-level, interactive, object-oriented language.  

Its 3.6 version includes an extensive class library with lots of goodies for   
network programming, system administration, sounds and graphics. 

This package contains Python 3.6's standard library.  
It is normally not used on its own, but as a dependency of python3.6.

结果apt-cache depends libpython3.6-stdlib

libpython3.6-stdlib
  Depends: libpython3.6-minimal
  Depends: mime-support
  Depends: libbz2-1.0
  Depends: libc6
  Depends: libdb5.3
  Depends: libffi6
  Depends: liblzma5
  Depends: libmpdec2
  Depends: libncursesw5
  Depends: libreadline7
  Depends: libsqlite3-0
  Depends: libtinfo5
  Breaks: libmpdec2
  Breaks: libpython3.6-testsuite
  Breaks: python3-distutils
  Breaks: python3-numpy
  Breaks: python3-tk
  Replaces: libpython3.6-testsuite
  Replaces: python3-distutils  

答案2

libpython3-stdliblibpython3.6-stdlib是依赖于最新版本的“Python3 标准库”(目前为)的某种虚拟包,包含

/usr/lib/python3.6/LICENSE.txt
/usr/lib/python3.6/__phello__.foo.py
/usr/lib/python3.6/_compression.py
/usr/lib/python3.6/_dummy_thread.py
/usr/lib/python3.6/_markupbase.py
/usr/lib/python3.6/_osx_support.py
/usr/lib/python3.6/_pydecimal.py
/usr/lib/python3.6/_pyio.py
/usr/lib/python3.6/aifc.py
/usr/lib/python3.6/antigravity.py
/usr/lib/python3.6/asynchat.py
/usr/lib/python3.6/asyncio/__init__.py
/usr/lib/python3.6/asyncio/base_events.py
/usr/lib/python3.6/asyncio/base_futures.py
/usr/lib/python3.6/asyncio/base_subprocess.py
/usr/lib/python3.6/asyncio/base_tasks.py
/usr/lib/python3.6/asyncio/compat.py
/usr/lib/python3.6/asyncio/constants.py
/usr/lib/python3.6/asyncio/coroutines.py
/usr/lib/python3.6/asyncio/events.py
/usr/lib/python3.6/asyncio/futures.py
/usr/lib/python3.6/asyncio/locks.py
/usr/lib/python3.6/asyncio/log.py
/usr/lib/python3.6/asyncio/proactor_events.py
/usr/lib/python3.6/asyncio/protocols.py
...

相关内容