[Python-checkins] distutils2: Fix typos, spell ?metadata? consistently, update one docstring
tarek.ziade
python-checkins at python.org
Sun Aug 8 11:50:45 CEST 2010
tarek.ziade pushed f425bb4064f3 to distutils2:
http://hg.python.org/distutils2/rev/f425bb4064f3
changeset: 409:f425bb4064f3
user: ?ric Araujo <merwok at netwok.org>
date: Sat Jul 31 15:32:43 2010 +0200
summary: Fix typos, spell ?metadata? consistently, update one docstring
files: docs/design/pep-0376.txt, src/distutils2/command/check.py, src/distutils2/command/register.py, src/distutils2/command/sdist.py, src/distutils2/command/upload.py, src/distutils2/core.py, src/distutils2/dist.py, src/distutils2/metadata.py, src/distutils2/tests/test_check.py, src/distutils2/tests/test_register.py
diff --git a/docs/design/pep-0376.txt b/docs/design/pep-0376.txt
--- a/docs/design/pep-0376.txt
+++ b/docs/design/pep-0376.txt
@@ -17,7 +17,7 @@
This PEP proposes various enhancements for Distutils:
- A new format for the .egg-info structure.
-- Some APIs to read the meta-data of a distribution.
+- Some APIs to read the metadata of a distribution.
- A replacement PEP 262.
- An uninstall feature.
diff --git a/src/distutils2/command/check.py b/src/distutils2/command/check.py
--- a/src/distutils2/command/check.py
+++ b/src/distutils2/command/check.py
@@ -8,13 +8,13 @@
from distutils2.errors import DistutilsSetupError
class check(Command):
- """This command checks the meta-data of the package.
+ """This command checks the metadata of the package.
"""
description = ("perform some checks on the package")
- user_options = [('metadata', 'm', 'Verify meta-data'),
+ user_options = [('metadata', 'm', 'Verify metadata'),
('restructuredtext', 'r',
- ('Checks if long string meta-data syntax '
- 'are reStructuredText-compliant')),
+ ('Checks if long string metadata syntax '
+ 'is reStructuredText-compliant')),
('strict', 's',
'Will exit with an error if a check fails')]
@@ -53,7 +53,7 @@
raise DistutilsSetupError(msg)
def check_metadata(self):
- """Ensures that all required elements of meta-data are supplied.
+ """Ensures that all required elements of metadata are supplied.
name, version, URL, (author and author_email) or
(maintainer and maintainer_email)).
@@ -62,7 +62,7 @@
"""
missing, __ = self.distribution.metadata.check()
if missing != []:
- self.warn("missing required meta-data: %s" % ', '.join(missing))
+ self.warn("missing required metadata: %s" % ', '.join(missing))
def check_restructuredtext(self):
"""Checks if the long string fields are reST-compliant."""
diff --git a/src/distutils2/command/register.py b/src/distutils2/command/register.py
--- a/src/distutils2/command/register.py
+++ b/src/distutils2/command/register.py
@@ -29,7 +29,7 @@
('list-classifiers', None,
'list the valid Trove classifiers'),
('strict', None ,
- 'Will stop the registering if the meta-data are not fully compliant')
+ 'Will stop the registering if the metadata is not fully compliant')
]
boolean_options = ['show-response', 'verify', 'list-classifiers',
diff --git a/src/distutils2/command/sdist.py b/src/distutils2/command/sdist.py
--- a/src/distutils2/command/sdist.py
+++ b/src/distutils2/command/sdist.py
@@ -71,7 +71,7 @@
"directory to put the source distribution archive(s) in "
"[default: dist]"),
('check-metadata', None,
- "Ensure that all required elements of meta-data "
+ "Ensure that all required elements of metadata "
"are supplied. Warn if any missing. [default]"),
('owner=', 'u',
"Owner name used when creating a tar file [default: current user]"),
@@ -362,7 +362,7 @@
'self.keep_temp' is true). The list of archive files created is
stored so it can be retrieved later by 'get_archive_files()'.
"""
- # Don't warn about missing meta-data here -- should be (and is!)
+ # Don't warn about missing metadata here -- should be (and is!)
# done elsewhere.
base_dir = self.distribution.get_fullname()
base_name = os.path.join(self.dist_dir, base_dir)
diff --git a/src/distutils2/command/upload.py b/src/distutils2/command/upload.py
--- a/src/distutils2/command/upload.py
+++ b/src/distutils2/command/upload.py
@@ -94,7 +94,7 @@
spawn(gpg_args,
dry_run=self.dry_run)
- # Fill in the data - send all the meta-data in case we need to
+ # Fill in the data - send all the metadata in case we need to
# register a new release
content = open(filename,'rb').read()
diff --git a/src/distutils2/core.py b/src/distutils2/core.py
--- a/src/distutils2/core.py
+++ b/src/distutils2/core.py
@@ -155,7 +155,7 @@
def run_setup(script_name, script_args=None, stop_after="run"):
"""Run a setup script in a somewhat controlled environment, and
return the Distribution instance that drives things. This is useful
- if you need to find out the distribution meta-data (passed as
+ if you need to find out the distribution metadata (passed as
keyword args from 'script' to 'setup()', or the contents of the
config files or command-line.
diff --git a/src/distutils2/dist.py b/src/distutils2/dist.py
--- a/src/distutils2/dist.py
+++ b/src/distutils2/dist.py
@@ -145,7 +145,7 @@
for attr in self.display_option_names:
setattr(self, attr, 0)
- # Store the distribution meta-data (name, version, author, and so
+ # Store the distribution metadata (name, version, author, and so
# forth) in a separate object -- we're getting to have enough
# information here (and enough command-line options) that it's
# worth it.
diff --git a/src/distutils2/metadata.py b/src/distutils2/metadata.py
--- a/src/distutils2/metadata.py
+++ b/src/distutils2/metadata.py
@@ -182,7 +182,7 @@
class DistributionMetadata(object):
- """Distribution meta-data class (1.0 or 1.2).
+ """Distribution metadata class (versions 1.0, 1.1 and 1.2 supported).
"""
def __init__(self, path=None, platform_dependent=False,
execution_context=None, fileobj=None):
@@ -399,7 +399,7 @@
return value
def check(self):
- """Checks if the metadata are compliant."""
+ """Checks if the metadata is compliant."""
# XXX should check the versions (if the file was loaded)
missing = []
for attr in ('Name', 'Version', 'Home-page'):
diff --git a/src/distutils2/tests/test_check.py b/src/distutils2/tests/test_check.py
--- a/src/distutils2/tests/test_check.py
+++ b/src/distutils2/tests/test_check.py
@@ -43,7 +43,7 @@
# get an error if there are missing metadata
self.assertRaises(DistutilsSetupError, self._run, {}, **{'strict': 1})
- # and of course, no error when all metadata are present
+ # and of course, no error when all metadata fields are present
cmd = self._run(metadata, strict=1)
self.assertEqual(len(cmd._warnings), 0)
diff --git a/src/distutils2/tests/test_register.py b/src/distutils2/tests/test_register.py
--- a/src/distutils2/tests/test_register.py
+++ b/src/distutils2/tests/test_register.py
@@ -210,7 +210,7 @@
cmd.strict = 1
self.assertRaises(DistutilsSetupError, cmd.run)
- # metadata are OK but long_description is broken
+ # metadata is OK but long_description is broken
metadata = {'home_page': 'xxx', 'author': 'xxx',
'author_email': u'éxéxé',
'name': 'xxx', 'version': 'xxx',
--
Repository URL: http://hg.python.org/distutils2
More information about the Python-checkins
mailing list