~ubuntu-branches/ubuntu/raring/python3.3/raring-proposed

« back to all changes in this revision

Viewing changes to debian/python3-config.1

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2012-03-22 06:14:01 UTC
  • Revision ID: package-import@ubuntu.com-20120322061401-vvrgvw3nvi68rtqq
Tags: 3.3.0~a1-1
* Python 3.3.0 alpha1 release.
* Update to 20120321 from the trunk.
* Update debian/copyright.
* Build-depend on expat (>= 2.1~).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.TH PYTHON\-CONFIG 1 "November 27, 2011"
 
2
.SH NAME
 
3
python\-config \- output build options for python C/C++ extensions or embedding
 
4
.SH SYNOPSIS
 
5
.BI "python\-config"
 
6
[
 
7
.BI "\-\-prefix"
 
8
]
 
9
[
 
10
.BI "\-\-exec\-prefix"
 
11
]
 
12
[
 
13
.BI "\-\-includes"
 
14
]
 
15
[
 
16
.BI "\-\-libs"
 
17
]
 
18
[
 
19
.BI "\-\-cflags"
 
20
]
 
21
[
 
22
.BI "\-\-ldflags"
 
23
]
 
24
[
 
25
.BI "\-\-extension\-suffix"
 
26
]
 
27
[
 
28
.BI "\-\-abiflags"
 
29
]
 
30
[
 
31
.BI "\-\-help"
 
32
]
 
33
.SH DESCRIPTION
 
34
.B python\-config
 
35
helps compiling and linking programs, which embed the Python interpreter, or
 
36
extension modules that can be loaded dynamically (at run time) into
 
37
the interpreter.
 
38
.SH OPTIONS
 
39
.TP
 
40
.BI "\-\-abiflags"
 
41
print the the ABI flags as specified by PEP 3149.
 
42
.TP
 
43
.BI "\-\-cflags"
 
44
print the C compiler flags.
 
45
.TP
 
46
.BI "\-\-ldflags"
 
47
print the flags that should be passed to the linker.
 
48
.TP
 
49
.BI "\-\-includes"
 
50
similar to \fI\-\-cflags\fP but only with \-I options (path to python header files).
 
51
.TP
 
52
.BI "\-\-libs"
 
53
similar to \fI\-\-ldflags\fP but only with \-l options (used libraries).
 
54
.TP
 
55
.BI "\-\-prefix"
 
56
prints the prefix (base directory) under which python can be found.
 
57
.TP
 
58
.BI "\-\-exec\-prefix"
 
59
print the prefix used for executable program directories (such as bin, sbin, etc).
 
60
.TP
 
61
.BI "\-\-extension\-suffix"
 
62
print the extension suffix used for binary extensions.
 
63
.TP
 
64
.BI "\-\-help"
 
65
print the usage message.
 
66
.PP
 
67
 
 
68
.SH EXAMPLES
 
69
To build the singe\-file c program \fIprog\fP against the python library, use
 
70
.PP
 
71
.RS
 
72
gcc $(python\-config \-\-cflags \-\-ldflags) progr.cpp \-o progr.cpp
 
73
.RE
 
74
.PP
 
75
The same in a makefile:
 
76
.PP
 
77
.RS
 
78
CFLAGS+=$(shell python\-config \-\-cflags)
 
79
.RE
 
80
.RS
 
81
LDFLAGS+=$(shell python\-config \-\-ldflags)
 
82
.RE
 
83
.RS
 
84
all: progr
 
85
.RE
 
86
 
 
87
To build a dynamically loadable python module, use
 
88
.PP
 
89
.RS
 
90
gcc $(python\-config \-\-cflags \-\-ldflags) \-shared \-fPIC progr.cpp \-o progr.so
 
91
.RE
 
92
 
 
93
.SH "SEE ALSO"
 
94
python (1)
 
95
.br
 
96
http://docs.python.org/extending/extending.html
 
97
.br
 
98
/usr/share/doc/python/faq/extending.html
 
99
 
 
100
.SH AUTHORS
 
101
This manual page was written by Johann Felix Soden <johfel@gmx.de>
 
102
for the Debian project (and may be used by others).