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
e4427bf9
Commit
e4427bf9
authored
May 29, 2011
by
Éric Araujo
Browse files
Options
Browse Files
Download
Plain Diff
Branch merge
parents
d5a91961
87418afb
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
32 additions
and
14 deletions
+32
-14
Doc/c-api/veryhigh.rst
Doc/c-api/veryhigh.rst
+1
-1
Doc/distutils/apiref.rst
Doc/distutils/apiref.rst
+16
-2
Doc/glossary.rst
Doc/glossary.rst
+1
-1
Doc/library/functions.rst
Doc/library/functions.rst
+1
-1
Doc/library/pprint.rst
Doc/library/pprint.rst
+3
-3
Lib/distutils/tests/test_build_py.py
Lib/distutils/tests/test_build_py.py
+10
-6
No files found.
Doc/c-api/veryhigh.rst
View file @
e4427bf9
...
@@ -34,7 +34,7 @@ the same library that the Python runtime is using.
...
@@ -34,7 +34,7 @@ the same library that the Python runtime is using.
according to the user's locale). It is important to note that the
according to the user's locale). It is important to note that the
argument list may be modified (but the contents of the strings
argument list may be modified (but the contents of the strings
pointed to by the argument list are not). The return value will be
pointed to by the argument list are not). The return value will be
``
`0``` if the interpreter exits normally (ie,
without an
``
0`` if the interpreter exits normally (i.e.
without an
exception), ``1`` if the interpreter exits due to an exception, or
exception), ``1`` if the interpreter exits due to an exception, or
``2`` if the parameter list does not represent a valid Python
``2`` if the parameter list does not represent a valid Python
command line.
command line.
...
...
Doc/distutils/apiref.rst
View file @
e4427bf9
...
@@ -21,7 +21,7 @@ setup script). Indirectly provides the :class:`distutils.dist.Distribution` and
...
@@ -21,7 +21,7 @@ setup script). Indirectly provides the :class:`distutils.dist.Distribution` and
.. function:: setup(arguments)
.. function:: setup(arguments)
The basic do-everything function that does most everything you could ever ask
The basic do-everything function that does most everything you could ever ask
for from a Distutils method.
See XXXXX
for from a Distutils method.
The setup function takes a large number of arguments. These are laid out in the
The setup function takes a large number of arguments. These are laid out in the
following table.
following table.
...
@@ -1759,7 +1759,7 @@ Subclasses of :class:`Command` must define the following methods.
...
@@ -1759,7 +1759,7 @@ Subclasses of :class:`Command` must define the following methods.
predicate)``, with *command_name* a string and *predicate* a function, a
predicate)``, with *command_name* a string and *predicate* a function, a
string or ``None``. *predicate* is a method of the parent command that
string or ``None``. *predicate* is a method of the parent command that
determines whether the corresponding command is applicable in the current
determines whether the corresponding command is applicable in the current
situation. (E.g.
we
``install_headers`` is only applicable if we have any C
situation. (E.g. ``install_headers`` is only applicable if we have any C
header files to install.) If *predicate* is ``None``, that command is always
header files to install.) If *predicate* is ``None``, that command is always
applicable.
applicable.
...
@@ -2006,3 +2006,17 @@ The ``register`` command registers the package with the Python Package Index.
...
@@ -2006,3 +2006,17 @@ The ``register`` command registers the package with the Python Package Index.
This is described in more detail in :pep:`301`.
This is described in more detail in :pep:`301`.
.. % todo
.. % todo
:mod:`distutils.command.check` --- Check the meta-data of a package
===================================================================
.. module:: distutils.command.check
:synopsis: Check the metadata of a package
The ``check`` command performs some tests on the meta-data of a package.
For example, it verifies that all required meta-data are provided as
the arguments passed to the :func:`setup` function.
.. % todo
Doc/glossary.rst
View file @
e4427bf9
...
@@ -242,7 +242,7 @@ Glossary
...
@@ -242,7 +242,7 @@ Glossary
processing, remembering the location execution state (including local
processing, remembering the location execution state (including local
variables and pending try-statements). When the generator resumes, it
variables and pending try-statements). When the generator resumes, it
picks-up where it left-off (in contrast to functions which start fresh on
picks-up where it left-off (in contrast to functions which start fresh on
every invocation.
every invocation
)
.
.. index:: single: generator expression
.. index:: single: generator expression
...
...
Doc/library/functions.rst
View file @
e4427bf9
...
@@ -527,7 +527,7 @@ are always available. They are listed here in alphabetical order.
...
@@ -527,7 +527,7 @@ are always available. They are listed here in alphabetical order.
Two objects with non-overlapping lifetimes may have the same :func:`id`
Two objects with non-overlapping lifetimes may have the same :func:`id`
value.
value.
.. impl-detail:: This is the address of the object.
.. impl-detail:: This is the address of the object
in memory
.
.. function:: input([prompt])
.. function:: input([prompt])
...
...
Doc/library/pprint.rst
View file @
e4427bf9
...
@@ -192,7 +192,7 @@ Example
...
@@ -192,7 +192,7 @@ Example
-------
-------
To demonstrate several uses of the :func:`pprint` function and its parameters,
To demonstrate several uses of the :func:`pprint` function and its parameters,
let's fetch information about a p
ackage
from PyPI::
let's fetch information about a p
roject
from PyPI::
>>> import json
>>> import json
>>> import pprint
>>> import pprint
...
@@ -200,8 +200,8 @@ let's fetch information about a package from PyPI::
...
@@ -200,8 +200,8 @@ let's fetch information about a package from PyPI::
>>> with urlopen('http://pypi.python.org/pypi/configparser/json') as url:
>>> with urlopen('http://pypi.python.org/pypi/configparser/json') as url:
... http_info = url.info()
... http_info = url.info()
... raw_data = url.read().decode(http_info.get_content_charset())
... raw_data = url.read().decode(http_info.get_content_charset())
>>> p
ackage_data
= json.loads(raw_data)
>>> p
roject_info
= json.loads(raw_data)
>>> result = {'headers': http_info.items(), 'body': p
ackage_data
}
>>> result = {'headers': http_info.items(), 'body': p
roject_info
}
In its basic form, :func:`pprint` shows the whole object::
In its basic form, :func:`pprint` shows the whole object::
...
...
Lib/distutils/tests/test_build_py.py
View file @
e4427bf9
...
@@ -57,11 +57,15 @@ class BuildPyTestCase(support.TempdirManager,
...
@@ -57,11 +57,15 @@ class BuildPyTestCase(support.TempdirManager,
self
.
assertEqual
(
len
(
cmd
.
get_outputs
()),
3
)
self
.
assertEqual
(
len
(
cmd
.
get_outputs
()),
3
)
pkgdest
=
os
.
path
.
join
(
destination
,
"pkg"
)
pkgdest
=
os
.
path
.
join
(
destination
,
"pkg"
)
files
=
os
.
listdir
(
pkgdest
)
files
=
os
.
listdir
(
pkgdest
)
self
.
assertTrue
(
"__init__.py"
in
files
)
self
.
assertIn
(
"__init__.py"
,
files
)
self
.
assertTrue
(
"__init__.pyc"
in
files
)
self
.
assertIn
(
"README.txt"
,
files
)
self
.
assertTrue
(
"README.txt"
in
files
)
# XXX even with -O, distutils writes pyc, not pyo; bug?
if
sys
.
dont_write_bytecode
:
def
test_empty_package_dir
(
self
):
self
.
assertNotIn
(
"__init__.pyc"
,
files
)
else
:
self
.
assertIn
(
"__init__.pyc"
,
files
)
def
test_empty_package_dir
(
self
):
# See SF 1668596/1720897.
# See SF 1668596/1720897.
cwd
=
os
.
getcwd
()
cwd
=
os
.
getcwd
()
...
@@ -109,7 +113,7 @@ class BuildPyTestCase(support.TempdirManager,
...
@@ -109,7 +113,7 @@ class BuildPyTestCase(support.TempdirManager,
finally
:
finally
:
sys
.
dont_write_bytecode
=
old_dont_write_bytecode
sys
.
dont_write_bytecode
=
old_dont_write_bytecode
self
.
assert
True
(
'byte-compiling is disabled'
in
self
.
logs
[
0
][
1
])
self
.
assert
In
(
'byte-compiling is disabled'
,
self
.
logs
[
0
][
1
])
def
test_suite
():
def
test_suite
():
return
unittest
.
makeSuite
(
BuildPyTestCase
)
return
unittest
.
makeSuite
(
BuildPyTestCase
)
...
...
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