Python
|
Size: 1577
Comment:
|
Size: 3937
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 3: | Line 3: |
| Here is everything you ever wanted to know about Python on Ubuntu <wink>. Well, probably not, but [[mailto:barry@ubuntu.com|let me know]] what essential information you think is missing and I'll work on updating it here. Or, since this is a wiki, you too can contribute! | Here is everything you ever wanted to know about Python on Ubuntu <wink>. |
| Line 6: | Line 6: |
Here's a nice [[http://www.rowinggolfer.org/tutorials/packaging/dh_python2_tutorial.html|webified version of Barry's IRC tutorial on Python packaging]]. Thanks to Neil Wallace for putting this up. [[http://wiki.debian.org/Python/LibraryStyleGuide|Packaging best practices (including Python 3) for Python libraries in Debian]] |
|
| Line 11: | Line 15: |
| * Python 2.7 only in Ubuntu 12.04. With Precise Pangolin, we have dropped Python 2.6. | * In Ubuntu python-minimal is an Essential package. In Debian it is not. This is a long term delta. |
| Line 13: | Line 17: |
| == Plans for 12.04 == | == Bugs == |
| Line 15: | Line 19: |
| == Longer term plans (e.g. 14.04) == | Open bugs on Python packages in the archive: https://bugs.launchpad.net/~pythonistas/+packagebugs == Plans for 16.04 == UOS for Xenial had a session on the removal of Python 2.7 from the default images/seeds. Here are links to the artifacts of that session: * Results of `apt-get purge python2.7` on 15.10 release ISO: [[https://docs.google.com/spreadsheets/d/1PnPLZRM2hu7ucv1yuq7Fd5hjNw_DYupHIYZpoP4-xHk/edit#gid=0|google spreadsheet]] * [[https://blueprints.launchpad.net/ubuntu/+spec/foundations-x-python3-only|Xenial blueprint (including work items)]] * [[Python/FoundationsXPythonVersions|Xenial UOS notes page]] Overarching goals include: * Python 3 only on the default installs for desktop, server, touch, snappy images. (Some may already be there.) * [[/Python35Transition|Python 3.5 transition]] * Removal of python-support. == Longer term plans / stretch goals == * How can we move Python 2 to universe given our intertwined build process and cross-pocket restrictions? * Can we better support PyPy and other alternative implementations (let's work with Debian on this) * What to do about ```/usr/bin/python``` (and influence [[https://www.python.org/dev/peps/pep-0394/|PEP 394]]) == Python 3 porting == There are lots of resources on the 'net for porting to Python 3, but some may be difficult to find or follow. There are also lots of opinions on how to best port and support Python 3. Here in Ubuntu, we make and promote opinionated choices with the intent of making it easier for our users and developers. It's okay to disagree and discuss these choices, but we have had successful experiences with them and feel that they provide the technically best recommendations. To that effort, please refer to our [[/3|guidelines for supporting Python 3 on Ubuntu]]. '''All Ubuntu/Canonical driven development should be targeting Python 3 right now, and all new code should be Python 3-only.''' If you can't do this because of your dependency stack, let's talk. == Historical pages == * [[Python/FoundationsQPythonVersions|Quantal wiki page (historical)]] * [[https://docs.google.com/a/canonical.com/spreadsheet/ccc?key=0AiT4gOXSkmapdFA1anRkWERsaXgtWnllUG9QWXhDVWc#gid=0|google spreadsheet]] |
Python on Ubuntu
Here is everything you ever wanted to know about Python on Ubuntu <wink>.
The best thing to do is to start with the Python on Debian wiki page, since we inherit as much as possible from Debian, and we strongly encourage working with the great Debian Python teams to push our changes upstream. A useful way to look at it is this: because Ubuntu and Debian have different release cycles, namely that Ubuntu uses timed releases and Debian uses release-when-ready, we can use these to our advantage. Often, we can initiate big changes in Ubuntu first, using it to blaze a trail, and then systematically push those changes up into Debian, so that we can eventually remove as much of the delta from Ubuntu as possible. This was an effective model for both the Python 2.7 transition and the dh_python2 helper transition.
Here's a nice webified version of Barry's IRC tutorial on Python packaging. Thanks to Neil Wallace for putting this up.
Packaging best practices (including Python 3) for Python libraries in Debian
Deltas from Debian
The above wiki already describes where Debian deviates from upstream Python, and this section will outline how Ubuntu deviates from Debian. Hopefully, these deltas are even smaller.
- In Ubuntu python-minimal is an Essential package. In Debian it is not. This is a long term delta.
Bugs
Open bugs on Python packages in the archive: https://bugs.launchpad.net/~pythonistas/+packagebugs
Plans for 16.04
UOS for Xenial had a session on the removal of Python 2.7 from the default images/seeds. Here are links to the artifacts of that session:
Results of apt-get purge python2.7 on 15.10 release ISO: google spreadsheet
Overarching goals include:
- Python 3 only on the default installs for desktop, server, touch, snappy images. (Some may already be there.)
- Removal of python-support.
Longer term plans / stretch goals
- How can we move Python 2 to universe given our intertwined build process and cross-pocket restrictions?
Can we better support PyPy and other alternative implementations (let's work with Debian on this)
What to do about /usr/bin/python (and influence PEP 394)
Python 3 porting
There are lots of resources on the 'net for porting to Python 3, but some may be difficult to find or follow. There are also lots of opinions on how to best port and support Python 3. Here in Ubuntu, we make and promote opinionated choices with the intent of making it easier for our users and developers. It's okay to disagree and discuss these choices, but we have had successful experiences with them and feel that they provide the technically best recommendations. To that effort, please refer to our guidelines for supporting Python 3 on Ubuntu.
All Ubuntu/Canonical driven development should be targeting Python 3 right now, and all new code should be Python 3-only. If you can't do this because of your dependency stack, let's talk.
Historical pages
Python (last edited 2017-01-25 23:23:00 by localhost)