Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
fa81cd95
Commit
fa81cd95
authored
Oct 09, 2013
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Plain Diff
#19196: Improved cross-references in distutils documentation.
parents
0d85b5c6
7880db61
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
14 deletions
+17
-14
Doc/distutils/apiref.rst
Doc/distutils/apiref.rst
+8
-7
Doc/distutils/setupscript.rst
Doc/distutils/setupscript.rst
+9
-7
No files found.
Doc/distutils/apiref.rst
View file @
fa81cd95
...
...
@@ -994,8 +994,9 @@ directories.
simply the list of all files under *src*, with the names changed to be under
*dst*.
*preserve_mode* and *preserve_times* are the same as for :func:`copy_file` in
:mod:`distutils.file_util`; note that they only apply to regular files, not to
*preserve_mode* and *preserve_times* are the same as for
:func:`distutils.file_util.copy_file`; note that they only apply to
regular files, not to
directories. If *preserve_symlinks* is true, symlinks will be copied as
symlinks (on platforms that support them!); otherwise (the default), the
destination of the symlink will be copied. *update* and *verbose* are the same
...
...
@@ -1175,7 +1176,7 @@ other utility module.
Generate a useful error message from an :exc:`OSError` exception object.
Handles Python 1.5.1 and later styles, and does what it can to deal with
exception objects that don't have a filename (which happens when the error
is due to a two-file operation, such as :func:`
rename` or :func:`
link`).
is due to a two-file operation, such as :func:`
~os.rename` or :func:`~os.
link`).
Returns the error message as a string prefixed with *prefix*.
...
...
@@ -1265,8 +1266,8 @@ other utility module.
built/installed/distributed
This module provides the :class:`
Distribution` class, which represents the
module distribution being built/installed/distributed.
This module provides the :class:`
~distutils.core.Distribution` class, which
represents the
module distribution being built/installed/distributed.
:mod:`distutils.extension` --- The Extension class
...
...
@@ -1712,8 +1713,8 @@ This module supplies the abstract base class :class:`Command`.
options, is the :meth:`run` method, which must also be implemented by every
command class.
The class constructor takes a single argument *dist*, a
:class:`Distribution`
instance.
The class constructor takes a single argument *dist*, a
:class:`~distutils.core.Distribution`
instance.
Creating a new Distutils command
...
...
Doc/distutils/setupscript.rst
View file @
fa81cd95
...
...
@@ -139,7 +139,8 @@ directories, libraries to link with, etc.).
All
of
this
is
done
through
another
keyword
argument
to
:
func
:`
setup
`,
the
:
option
:`
ext_modules
`
option
.
:
option
:`
ext_modules
`
is
just
a
list
of
:
class
:`
Extension
`
instances
,
each
of
which
describes
a
single
extension
module
.
:
class
:`~
distutils
.
core
.
Extension
`
instances
,
each
of
which
describes
a
single
extension
module
.
Suppose
your
distribution
includes
a
single
extension
,
called
:
mod
:`
foo
`
and
implemented
by
:
file
:`
foo
.
c
`.
If
no
additional
instructions
to
the
compiler
/
linker
are
needed
,
describing
this
extension
is
quite
simple
::
...
...
@@ -165,8 +166,8 @@ following sections.
Extension
names
and
packages
----------------------------
The
first
argument
to
the
:
class
:`
Extension
`
constructor
is
always
the
name
of
the
extension
,
including
any
package
names
.
For
example
,
::
The
first
argument
to
the
:
class
:`
~
distutils
.
core
.
Extension
`
constructor
is
always
the
name
of
the
extension
,
including
any
package
names
.
For
example
,
::
Extension
(
'foo'
,
[
'src/foo1.c'
,
'src/foo2.c'
])
...
...
@@ -196,7 +197,8 @@ will compile :file:`foo.c` to the extension :mod:`pkg.foo`, and :file:`bar.c` to
Extension source files
----------------------
The second argument to the :class:`Extension` constructor is a list of source
The second argument to the :class:`~distutils.core.Extension` constructor is
a list of source
files. Since the Distutils currently only support C, C++, and Objective-C
extensions, these are normally C/C++/Objective-C source files. (Be sure to use
appropriate extensions to distinguish C++\ source files: :file:`.cc` and
...
...
@@ -232,9 +234,9 @@ linked into the executable.
Preprocessor options
--------------------
Three optional arguments to :class:`
Extension` will help if you need to specify
include directories to search or preprocessor macros to define/undefine:
``include_dirs``, ``define_macros``, and ``undef_macros``.
Three optional arguments to :class:`
~distutils.core.Extension` will help if
you need to specify include directories to search or preprocessor macros to
define/undefine:
``include_dirs``, ``define_macros``, and ``undef_macros``.
For example, if your extension requires header files in the :file:`include`
directory under your distribution root, use the ``include_dirs`` option::
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment