Re: Add Python3 support to python-support packages: howto?

2010-09-14 Thread Piotr Ożarowski
[Sandro Tosi, 2010-09-14]
> how to do that for a package using python-support?

* add python3 or python3-all or python3-all-dev to Build-Depends(-Indep)
  (+ python3-all-dbg for -dbg package)
* add python3-foo binary package (with ${python3:Depends} in Depends)
* optionally: set minimum required Python 3 version via X-Python3-Version
* build extensions for all `py3versions -vr` versions
* for dh "rules.tiny" packages:
  - add "--with python3" to dh call (`--with python2,python3` will also 
use dh_python2), or:
  - override_dh_pysupport:
dh_pysupport
dh_python3
* for all other debian/rules (including CDBS for now):
  invoke dh_python3 (make sure to do that before dh_strip in arch:any
  packages)

Notes:
* you can use -p and -N with dh_py* tools to decide which one should
  handle private directories, dh_python3 ignores public Python 2.X locations
* if you need to change files in dist-packages directory, you can use
  py_libdir & py_pkgname¹ macros to get the right directory or use
  something like:

pkgdir = $(CURDIR)/debian/python$(if $(patsubst 3.%,,$(1)),,3)-mako

[¹] available in /usr/share/python/python.mk since python 2.6.6-2
and in /usr/share/python3/python.mk since 3.1.2-7
-- 
Piotr Ożarowski Debian GNU/Linux Developer
www.ozarowski.pl  www.griffith.cc   www.debian.org
GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645


-- 
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20100914091641.gu15...@piotro.eu



Python3 experimental packages with destination squeeze

2010-09-14 Thread Matthias Klose

In experimental you'll find a set of packages for Python3

  python3.1 3.1.2+20100909-1
  python3.2 3.2~a2-4
  python3-defaults 3.1.2-10
  python-defaults 2.6.6-2
  distribute 0.6.14-3

The python3.2 package has the PEP's 3147 (PYC Repository Directories)
[1] and 3149 (ABI version tagged .so files) [2] implemented, which
allows installation of .so and .py[co] files for different python
versions in one directory.  The above packages do use a common
directory as the site directory for "public" packages
(/usr/lib/python3/dist-packages).  distutils and distribute/setuptools
are patched to install into this site directory by default when using
the --install-layout=deb option. dh_python3 knows how to handle these
locations. When building packages, a build dependency on a minimum
version 3.1.2-10~ for one of the python3-* packages is needed.

The part of PEP 3149 for looking up .so files with the ABI version is
backported to python3.1.

Currently there are only a few packages in the archive depending on
python3, some of which already use the new location, I'd like to see
the rest of the packages converted too, so that these few packages can
ship with squeeze.

  * beaker  1.5.4-3
  * mako0.3.4-4
  * sqlalchemy  0.6.4-2
  * markupsafe  0.11-2
  * jinja2  2.5.2-3
  * distribute  0.6.14-2
  * pycxx   6.2.0-3
  * gearman-interface
  * lxml2.2.8-1
  * python3-httplib2
  * python-slimmer
  * pyyaml
  * python-bsddb3   4.8.3-2
  * python-apt (python3-apt binary package is missing)

Packages mentioned here with version numbers are already updated, in
experimental, in NEW, or being uploaded (Scott will care about pyaml,
Piotr will care about the remaining ones, I'll contact the python-apt
maintainers about the python-apt split).

A small howto for packaging with python3 can be found here [3].  There
is a freeze exception/pre-approval granted by the release team [4] for
new "popular" binary python3-* packages as long as these are built
from the same source and don't introduce new upstream versions.

Squeeze is the first Debian release with a supported python3 and so it
is important for long term consistency and reliability to get the ABI
stuff in this release for python3.1.  If we can get it here, we can
assume all Debian releases support it.  python3.2 3.2~a2 is not
proposed for squeeze and only available in experimental to demonstrate
the coexistence of different python3 versions.

  Scott Kitterman
  Piotr Ożarowski
  Barry Warsaw
  Matthias Klose


[1] http://python.org/dev/peps/pep-3147/
[2] http://python.org/dev/peps/pep-3149/
[3] http://lists.debian.org/debian-python/2010/09/msg00020.html
[4] http://lists.debian.org/debian-release/2010/09/msg00747.html



--
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4c900ade.2080...@debian.org