Differences between revisions 60 and 61
Revision 60 as of 2015-04-16 12:43:50
Size: 477
Editor: ?WarrenKell
Comment:
Revision 61 as of 2015-04-16 15:34:28
Size: 8894
Editor: ?dodecaplex
Comment: Spam
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
She is recognized by the title of Sha even though it is not her start identify. Washington is wherever he's generally been residing and his relatives enjoys it. After being out of his occupation for years he turned an purchase clerk. The beloved passion for him and his young children is coin amassing and now he is attempting to gain income with it. Go to my internet site to discover out much more: [[http://website-development.org/cheap_seo|web design for small business]] #language en
~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: English - [[fr/Python|Français]] - [[it/Python|Italiano]]-~
----


{{http://www.python.org/community/logos/python-logo-master-v3-TM.png|Official Python logo|align="right"}}
<<TableOfContents(3)>>

== Introduction ==

[[http://www.python.org|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. Debian always provides at least two versions of Python, the latest stable Python 2 release, and the latest stable Python 3 release. It may also provide additional versions, as well as tons of third party packages. Python is an important part of the Debian ecosystem.

Python is very easy to learn. You can begin with the [[DebianWomen/PythonTutorial]] or the official [[http://docs.python.org/tutorial/|online tutorial]] if you want to get started programming in Python. You might also be interested in the [[http://wiki.python.org/moin/|Python wiki]], the [[http://www.python.org/doc/faq/|Python FAQ]], and the [[http://www.python.org/doc/|online documentation]].

Software written in the Python programming language is executed by the Python interpreter.
It is usually compiled into platform-independent bytecode files to increase performance.
Python compiles and writes bytecode `*.pyc` files alongside the `*.py` sources. Extension modules can
also be written in C, which are distributed as `.so` shared libraries.

Therefore, software written in pure Python can be distributed as source code or as compiled bytecode.
The latter is similar to Java.

== Python in Debian ==

{{attachment:pydebian.png|Sources available: ssh://git.debian.org//git/git/python-modules/misc/python-debian-artwork.git|align="right"}}

As such, with hundreds of Python modules and multiple versions of Python supported, Debian is the largest "integrated Python distribution". Users of other operating systems (e.g. Windows and OS X) can also benefit from this integrative effort by means of virtualization (e.g. see [[http://neuro.debian.net/vm.html|NeuroDebian VM]] page for easy way to start)

Please also refer to the [[Python/LibraryStyleGuide|packaging style guide]] and [[Python/Packaging|Python Packaging]] wiki pages.

=== Maintainers ===

Within the Debian project, Python packages are maintained by individual developers and three main teams:

 * [[http://alioth.debian.org/projects/pkg-python|pkg-python]] maintains the Python compiler/interpreter package.

 * [[Teams/PythonModulesTeam|Debian Python Modules Team]] maintains some Python modules and extensions.

 * [[Teams/PythonAppsPackagingTeam|Python Applications Packaging Team]] maintains some Python applications.

There are also :
 * [[http://lists.debian.org/debian-python/recent|debian-python mailing list]] with all development discussions
 * [[irc://irc.debian.org/debian-python|#debian-python]] [[IRC]] channel
 * [[Python/FAQ|FAQ]]

=== Supported Python Versions ===
## We probably don't want to update the list manually, each time a
## new package enter $DEVELOPPMENT release of Debian... link to p.d.o
 * Debian [[DebianWheezy|Wheezy]] contains Python 2.7 (default), 3.2
 * Debian [[DebianSqueeze|Squeeze]] contains Python 2.5, 2.6 (the default), 3.1.
 * Debian [[DebianLenny|Lenny]] contains Python 2.4 and 2.5 (the default).
 * Debian [[DebianTesting|Testing]] contains some [[DebianPkg:testing/python/python-all|2.x]] and [[DebianPkg:testing/python/python3-all|3.x]]
 * Debian [[DebianUnstable|Unstable]] contains some [[DebianPkg:unstable/python/python-all|2.x]] and [[DebianPkg:unstable/python/python3-all|3.x]]
 * Debian [[DebianExperimental|experimental]] may also contains some (experimental!) packages [[DebianPkg:experimental/python/python-all|2.x]] and [[DebianPkg:experimental/python/python3-all|3.x]]

Those links list the distribution(s) that ship the given versions of python:
 * Distribution(s) shipping [[http://packages.debian.org/search?keywords=python3.4&searchon=names&exact=1&suite=all&section=all|python3.4]]
 * Distribution(s) shipping [[http://packages.debian.org/search?keywords=python3.3&searchon=names&exact=1&suite=all&section=all|python3.3]]
 * Distribution(s) shipping [[http://packages.debian.org/search?keywords=python3.2&searchon=names&exact=1&suite=all&section=all|python3.2]]
 * Distribution(s) shipping [[http://packages.debian.org/search?keywords=python3.1&searchon=names&exact=1&suite=all&section=all|python3.1]]
 * Distribution(s) shipping [[http://packages.debian.org/search?keywords=python3.0&searchon=names&exact=1&suite=all&section=all|python3.0]] (none)
 * Distribution(s) shipping [[http://packages.debian.org/search?keywords=python2.7&searchon=names&exact=1&suite=all&section=all|python2.7]]
 * Distribution(s) shipping [[http://packages.debian.org/search?keywords=python2.6&searchon=names&exact=1&suite=all&section=all|python2.6]]
 * Distribution(s) shipping [[http://packages.debian.org/search?keywords=python2.5&searchon=names&exact=1&suite=all&section=all|python2.5]]
 * Distribution(s) shipping [[http://packages.debian.org/search?keywords=python2.4&searchon=names&exact=1&suite=all&section=all|python2.4]]


== Debian Python Policy for Python developers ==
The [[http://www.debian.org/doc/packaging-manuals/python-policy/|Debian Python Policy]] describes conventions for packaging and distributing Python code in Debian.

Feel free to ask any questions on debian-python@lists.debian.org mailing list.

if you want to maintain a Python package, you have to know how the [[DebianDevelopment|Debian Development]] works.

== Deviations from upstream ==
Debian distributions modify upstream Python in a few ways that are important to understand. Of course, where at all possible, we try to minimize deviations from upstream, but here is an enumeration of the changes you might encounter on a Debian system (and derivatives, such as [[http://www.ubuntu.com|Ubuntu]]).

 * `dist-packages` instead of `site-packages`. Third party Python software installed from Debian packages goes into `dist-packages`, not `site-packages`. This is to reduce conflict between the system Python, and any [[http://www.python.org/download/|from-source Python build]] you might install manually.
 * The standard profile and pstats modules are not included, due to restrictive redistribution clauses in their license that don’t meet the DFSG. cProfile and hotshot are however included.
 * In Debian 7 (Wheezy), the `python-setuptools` package installs the [[http://packages.python.org/distribute/|Distribute]] fork instead of the standard [[http://peak.telecommunity.com/|setuptools]]. In Jessie (unreleased as of this writing), we revert back to the [[https://pypi.python.org/pypi/setuptools|merged setuptools]] project.
 * Also in Wheezy, the `python-virtualenv` also uses `distribute` by default, but can enable classic `setuptools` with an optional switch. As above, in Jessie this will just use the merged setuptools.
 * `distutils` setup scripts install files in `/usr/local/` not `sys.prefix` (which is normally `/usr/`). This is because `/usr/` is reserved for files installed from Debian packages. Note that `/usr/local/lib/pythonX.Y/dist-packages` is in `sys.path` so that modules not installed from Debian packages can still be accessed by the system Python. Tools like debhelper pass the `--install-layout=deb` option to the setup script while building a Debian package so that its installs files into `/usr/` not `/usr/local/`.
 * Python 2.7, 3.3, and 3.4 are [[/MultiArch|multiarch]] aware.

== Encouraged practices ==

 * [[Python/LibraryStyleGuide|Style guide for packaging Python libraries]] (includes adding Python 3 support)
 * [[Python/AppStyleGuide|Style guide for packaging Python applications]] (includes Python 3 support)
 * There is a [[http://packages.debian.org/search?keywords=python%20dbg|growing number of python-*-dbg packages]] for modules with extensions. They provide extensions built using python*-dbg libraries allowing to take advantage of GDB constantly improving [[http://docs.python.org/devguide/gdb.html|support for debugging of Python modules and extensions]]. '''If you build extensions module, please provide corresponding -dbg package'''
 * Converting your package to [[Python/TransitionToDHPython2|dh_python2]]

== See also ==
 * [[Python/FAQ]]
 * Transitions
   * [[Python/GitPackaging|Using git for team packages]] ('''proposed''')
   * [[Python/JessieRoadmap|Roadmap for Python in Jessie]]
   * [[Python/StretchRoadmap|Roadmap for Python in Stretch]]
   * [[Python/27transition|Python 2.7]]
 * [[IRC/debian-python/FAQ| #debian-python IRC channel's FAQ]]
 * [[Python/Python3Packages|Which python packages are or are not available for Python3?]]

Translation(s): English - Français - Italiano


Official Python logo

Introduction

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. Debian always provides at least two versions of Python, the latest stable Python 2 release, and the latest stable Python 3 release. It may also provide additional versions, as well as tons of third party packages. Python is an important part of the Debian ecosystem.

Python is very easy to learn. You can begin with the DebianWomen/PythonTutorial or the official online tutorial if you want to get started programming in Python. You might also be interested in the Python wiki, the Python FAQ, and the online documentation.

Software written in the Python programming language is executed by the Python interpreter. It is usually compiled into platform-independent bytecode files to increase performance. Python compiles and writes bytecode *.pyc files alongside the *.py sources. Extension modules can also be written in C, which are distributed as .so shared libraries.

Therefore, software written in pure Python can be distributed as source code or as compiled bytecode. The latter is similar to Java.

Python in Debian

Sources available: ssh://git.debian.org//git/git/python-modules/misc/python-debian-artwork.git

As such, with hundreds of Python modules and multiple versions of Python supported, Debian is the largest "integrated Python distribution". Users of other operating systems (e.g. Windows and OS X) can also benefit from this integrative effort by means of virtualization (e.g. see NeuroDebian VM page for easy way to start)

Please also refer to the packaging style guide and Python Packaging wiki pages.

Maintainers

Within the Debian project, Python packages are maintained by individual developers and three main teams:

There are also :

Supported Python Versions

  • Debian Wheezy contains Python 2.7 (default), 3.2

  • Debian Squeeze contains Python 2.5, 2.6 (the default), 3.1.

  • Debian Lenny contains Python 2.4 and 2.5 (the default).

  • Debian Testing contains some 2.x and 3.x

  • Debian Unstable contains some 2.x and 3.x

  • Debian experimental may also contains some (experimental!) packages 2.x and 3.x

Those links list the distribution(s) that ship the given versions of python:

Debian Python Policy for Python developers

The Debian Python Policy describes conventions for packaging and distributing Python code in Debian.

Feel free to ask any questions on debian-python@lists.debian.org mailing list.

if you want to maintain a Python package, you have to know how the Debian Development works.

Deviations from upstream

Debian distributions modify upstream Python in a few ways that are important to understand. Of course, where at all possible, we try to minimize deviations from upstream, but here is an enumeration of the changes you might encounter on a Debian system (and derivatives, such as Ubuntu).

  • dist-packages instead of site-packages. Third party Python software installed from Debian packages goes into dist-packages, not site-packages. This is to reduce conflict between the system Python, and any from-source Python build you might install manually.

  • The standard profile and pstats modules are not included, due to restrictive redistribution clauses in their license that don’t meet the DFSG. cProfile and hotshot are however included.
  • In Debian 7 (Wheezy), the python-setuptools package installs the Distribute fork instead of the standard setuptools. In Jessie (unreleased as of this writing), we revert back to the merged setuptools project.

  • Also in Wheezy, the python-virtualenv also uses distribute by default, but can enable classic setuptools with an optional switch. As above, in Jessie this will just use the merged setuptools.

  • distutils setup scripts install files in /usr/local/ not sys.prefix (which is normally /usr/). This is because /usr/ is reserved for files installed from Debian packages. Note that /usr/local/lib/pythonX.Y/dist-packages is in sys.path so that modules not installed from Debian packages can still be accessed by the system Python. Tools like debhelper pass the --install-layout=deb option to the setup script while building a Debian package so that its installs files into /usr/ not /usr/local/.

  • Python 2.7, 3.3, and 3.4 are multiarch aware.

Encouraged practices

See also