Debian packaging python programs
To report a problem with the web site, e-mail debian-www lists. For other contact information, see the Debian contact page. Debian is a trademark of SPI Inc. Learn more about this site. Software Packages in "stretch", Subsection python afew 0. Python Library libfko-python 2. X python-betamax 0. X python-bibtex 1. X python3-etelemetry 0. IO integration for Flask applications python3-flask-sockets 0. MutableSequence python3-fs 2. Python 3 python3-hurry.
X python3-knack 0. X python3-networking-bagpipe X python3-partd 1. X python3-pygments 2. The set of interpreter names which might still be on the system but for which modules should not be built. The set of interpreter names which should not be supported at all, that is modules should not be built or byte-compiled for these. This includes is a superset of old-versions. Newer versions might also appear in unsupported-versions before being moved to supported-versions. For every Python version provided in Debian, the binary package python X.
Y shall provide a complete distribution for deployment of Python scripts and applications. Y is provided. Installation of python X. Y shall provide the modules of the upstream Python distribution with some exceptions. Excluded are modules that cannot be included for licensing reasons, for dependency tracking purposes for example the GPL-licensed gdbm module , or that should not be included for packaging reasons for example the tk module which depends on Xorg and the venv module which depends on wheels to bootstrap pip.
Modules that would interfere with system package management for example ensurepip , when used outside virtual environments are modified to print a message explaining the problem and recommending alternatives. Excluded are modules that cannot be included for licensing reasons for example the profile module , for dependency tracking purposes for example the GPL-licensed gdbm module , or that should not be included for packaging reasons for example the tk module which depends on Xorg.
Some tools and files for the development of Python modules are split off in a separate binary package python X.
Y -dev. Modules only used for building of Python modules e. The python3-venv binary package depends on these. Y executable. The package must depend on the python3. Y package that installs the executable. A python3-full binary package must ensure that the entire Python standard library is available, including all modules split into separate packages but excluding modules excluded from Debian for licensing reasons.
This package exists for the convenience of python developers, and must not be used in dependencies, recommendations and build dependencies by python module or application packages. The version of the python3 package must be greater than or equal to 3. Y and lower than 3. The python and python-dbg binary packages are to be removed for Bullseye. If any Python 2 packages remain in Bullseye, these must depend on python2 or python2-dbg. The python2 package must depend on the python2.
The version of the python2 package must be greater than or equal to 2. Y and lower than 2. The package must depend on the python2. See PEP for details. The version of the python package must be greater than or equal to 2.
Y -minimal might exist and should not be depended upon by other packages except the Python runtime packages themselves. The different Python major versions require different interpreters see Main packages. Python scripts that require the default Python 3 version should specify python3 as the interpreter name.
Python scripts that require the default Python 2 version should specify python2 as the interpreter name for as long as this remains supported. Python scripts should not specify python as the interpreter name even if they do not require any particular version of Python as the script would stop working upon removal of the Python 2 stack.
Python scripts that only work with a specific Python minor version must explicitly use the versioned interpreter name python X. Python scripts should specify the Debian Python interpreter, to ensure that the Debian Python installation is used and all dependencies on additional Python modules are met.
Y if it requires Python 3. Y if it requires Python 2. For all supported Debian releases, sys. Directories with private Python modules must be absent from the sys. Y is the Python 2 version. For local installation of Python modules by the system administrator, special directories are reserved. Y runtime module search path. Additional information on appending site-specific paths to the module search path is available in the official documentation of the site module. These should point to a common file.
Since Python 2. The python3 binary package has special hooks to allow other packages to act upon updates to the installed runtimes. This mechanism is required to handle changes of the default Python runtime in some packages and to enable the Python packaging helpers. There are three supported hook types which come in the form of scripts which are invoked from the maintainer scripts of the Python runtime packages when specific installations, removals, or upgrades occur.
The first argument is rtinstall , the second argument is the affected runtime for example python X. Y and the third and fourth argument are the old and new version of this packaged runtime if this runtime was already installed but unsupported. The first argument is rtremove , and the second argument is the affected runtime for example python X. The first argument is either pre-rtupdate , called before changing the default runtime, or rtupdate , called when changing the default runtime, or post-rtupdate , called immediately afterwards.
The second argument is the old default runtime for example python X. Y , and the third argument is the new default runtime for example python X. Python documentation is split out in separate binary packages python X. Y -doc. The binary package python3-doc will always provide the documentation for the default Debian Python 3 version. The binary package python2-doc will always provide the documentation for the default Debian Python 2 version, for as long as that remains supported.
The goal of these policies is to reduce the work necessary for Python transitions. Python modules are internally very dependent on a specific Python version.
These policies encourage automated dependency generation and loose version bounds whenever possible. Pure Python modules are Python source code that generally works across many versions of Python.
Extensions are C code compiled and linked against a specific version of the Python runtime, and so can only be used by one version of Python. Debian Python does not link extensions to libpython as is done in some operating systems. Getting the build dependencies wrong will create incomplete or broken packages. Take extra care of getting this right!
Debian packaging looks quite intimidating at first because there are so many ways to build a package. Many different tools can ease package creation but also add confusion. Packaging python software is done easily if you know the quirks. The python examples from the Guide for Debian Maintainers are certainly worth a look! You are commenting using your WordPress. You are commenting using your Google account. You are commenting using your Twitter account.
You are commenting using your Facebook account. Notify me of new comments via email.
0コメント