/pkg-python/python-defaults-debian

To get this branch, use:
bzr branch https://alioth.debian.org/scm/loggerhead/pkg-python/python-defaults-debian
124 by Piotr Ożarowski
add README.PyDist
1
============
2
PyDist files
3
============
4
150 by Piotr Ożarowski
update some docs
5
DISTNAME [VRANGE] [DEPENDENCY][; [PEP386] [RULES]]
6
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
124 by Piotr Ożarowski
add README.PyDist
7
8
PyDist files help tools like dh_python2 to translate Python dependencies (from
9
setup.py's install_requires or egg's requires.txt file) to Debian dependencies.
10
11
12
Required fields:
13
~~~~~~~~~~~~~~~~
14
15
DISTNAME
16
````````
17
Python distribution name (you can find it at the beginning of .egg-info
18
file/directory name that your package provides).
19
20
Examples:
21
 * SQLAlchemy
22
 * Jinja2
23
 * numpy
24
150 by Piotr Ożarowski
update some docs
25
26
Optional fields:
27
~~~~~~~~~~~~~~~~
28
29
VRANGE
30
``````
31
Python version or version range the line applies to.
32
33
Examples:
34
 * 2.6		(Python 2.6 only)
35
 * 2.5-		(Python 2.5 and newer)
36
 * 2.5-2.7	(Python 2.5 or 2.6)
37
 * -2.7		(Python 2.6 or older)
38
124 by Piotr Ożarowski
add README.PyDist
39
DEPENDENCY
40
``````````
41
Debian dependency, multiple packages or versions are allowed.
149 by Piotr Ożarowski
if dist_fallback and `dpkg -S` fails to find the right package name,
42
If not set, given Python distribution name will be ignored.
124 by Piotr Ożarowski
add README.PyDist
43
44
Examples:
45
 * python-mako
46
 * python-jinja2 | python (>= 2.6)
47
 * python-sqlalchemy (>= 0.5), python-sqlalchemy (<< 0.6)
48
125 by Piotr Ożarowski
promote PEP386 to a section :)
49
PEP386
50
``````
51
Standards flag: upstream uses versioning schema described in PEP 386.
124 by Piotr Ożarowski
add README.PyDist
52
53
RULES
54
`````
55
Rules needed to translate upstream version to Debian one. If PEP386 is
56
set, its rules will be applied later. Multiple rules are allowed, separate them
57
with a space.
58
59
Examples:
60
 * s/^/2:/
61
 * s/alpha/~alpha/ s/^/1:/
62
63
64
Notes:
65
~~~~~~
66
67
You can use multiple lines if binary package provides more than one Python
68
distribution or if you want to specify different dependencies for each Python
69
version or version range.
70
71
If you use dh_python2, it will install debian/binary_package_name.pydist file
72
to /usr/share/python/dist/binary_package_name automatically.
73
74
75
Complete examples:
76
~~~~~~~~~~~~~~~~~~
77
 * SQLAlchemy python-sqlalchemy (>= 0.5), python-sqlalchemy (<< 0.6)
78
 * Mako python-mako; PEP386
79
 * foo -2.5 python-oldfoo; s/^/3:/
80
 * foo 2.5- python-foo; PEP386
149 by Piotr Ożarowski
if dist_fallback and `dpkg -S` fails to find the right package name,
81
 * Bar 2.6-
124 by Piotr Ożarowski
add README.PyDist
82
83
.. vim: ft=rst