/[python-modules]/www/python-central_howto.txt
ViewVC logotype

Contents of /www/python-central_howto.txt

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1404 - (show annotations) (download)
Tue Oct 10 20:13:06 2006 UTC (6 years, 7 months ago) by pox-guest
File MIME type: text/plain
File size: 2568 byte(s)
uneeded dh_python update
1 HOWTO convert package to python-central
2 =======================================
3
4 1) create "debian/pycompat" file with a content of "2"
5
6 2) debian/control
7
8 * source package:
9 - add XS-Python-Version: header with list of python versions that package
10 supports. Examples: all / >=2.3 / 2.3, 2.4 / >=2.3, <<2.6
11 - extend Build-Depends: header with:
12 debhelper (>= 5.0.38), python-all-dev (>= 2.3.5-11), python-central (>= 0.5.6)
13 - for Egg support (optional) extend Build-Depends: header with:
14 python-setuptools (>= 0.6b3-1)
15 * binary package:
16 - add/extend headers:
17 Depends: ${python:Depends}
18 XB-Python-Version: ${python:Versions}
19 - change Architecture: to "all" ("any" if package contains arch dep files)
20 - if previous package version had python2.X-foo packages, add:
21 Conflicts: python2.X-foo (<< current_version)
22 Replaces: python2.X-foo (<< current_version)
23 - extend Provides: header with:
24 + ${python:Provides} if your package is arch "any"
25 + list of pythonX.Y-foo packages that external packages still depend on [1]
26 * remove python2.X-foo binary packages
27
28 3) debian/rules
29
30 * build modules for all python versions specified in XS-Python-Version, example rules:
31 PYVERS=$(shell pyversions -vr)
32 build: $(PYVERS:%=build-python%)
33 touch $@
34 build-python%:
35 python$* setup.py build
36 touch $@
37 install: build $(PYVERS:%=install-python%)
38 install-python%:
39 python$* setup.py install --root $(CURDIR)/debian/python-foo
40 * replace dh_python with dh_pycentral in binary rule
41 * If the public modules can't be shared, add
42 export DH_PYCENTRAL=nomove
43 at the top of debian/rules
44 * Egg support (optional):
45 - add "--single-version-externally-managed" option to setup.py install command
46 - remove python's (and optionally module's) version from Egg's dirname
47 - remove *-nspkg.pth file
48
49 4) debian/{postinst,prerm}
50
51 * remove unneeded postinst and prerm files, debhelper will generate them now
52
53 5) example packages
54
55 http://wiki.debian.org/DebianPython/NewPolicy#head-361ba69b3cd19d9b6bab84fbac6099268ddb3366
56
57 # package without .so files
58 apt-get source pyparallel
59
60 # package with .so files
61 apt-get source python-imaging
62
63 # package with .so files and Egg support
64 apt-get source pyenchant
65
66 6) useful links:
67
68 http://www.debian.org/doc/packaging-manuals/python-policy/
69 http://wiki.debian.org/DebianPython/NewPolicy
70
71
72 [1] remove that list as soon as external packages will depend on python-foo only

  ViewVC Help
Powered by ViewVC 1.1.5