diff options
| author | Jürgen Gmach <juergen.gmach@googlemail.com> | 2019-12-23 15:53:18 +0100 |
|---|---|---|
| committer | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-12-23 06:53:18 -0800 |
| commit | c4419ed0099645ef3c27a617f93e9a6182962693 (patch) | |
| tree | 78872e5e400d5b68e5fdcc7aa976f0f051d638ad /command/check.py | |
| parent | 2bf131d79252ce71e82c64ffbfdf1126d9602e90 (diff) | |
| download | external_python_setuptools-c4419ed0099645ef3c27a617f93e9a6182962693.tar.gz external_python_setuptools-c4419ed0099645ef3c27a617f93e9a6182962693.tar.bz2 external_python_setuptools-c4419ed0099645ef3c27a617f93e9a6182962693.zip | |
bpo-38914 Do not require email field in setup.py. (GH-17388)
When checking `setup.py` and when the `author` field was provided, but
the `author_email` field was missing, erroneously a warning message was
displayed that the `author_email` field is required.
The specs do not require the `author_email`field:
https://packaging.python.org/specifications/core-metadata/#author
The same is valid for `maintainer` and `maintainer_email`.
The warning message has been adjusted.
modified: Doc/distutils/examples.rst
modified: Lib/distutils/command/check.py
https://bugs.python.org/issue38914
Diffstat (limited to 'command/check.py')
| -rw-r--r-- | command/check.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/command/check.py b/command/check.py index 04c2f964..7ceabd3a 100644 --- a/command/check.py +++ b/command/check.py @@ -80,8 +80,11 @@ class check(Command): def check_metadata(self): """Ensures that all required elements of meta-data are supplied. - name, version, URL, (author and author_email) or - (maintainer and maintainer_email)). + Required fields: + name, version, URL + + Recommended fields: + (author and author_email) or (maintainer and maintainer_email)) Warns if any are missing. """ @@ -97,15 +100,15 @@ class check(Command): if metadata.author: if not metadata.author_email: self.warn("missing meta-data: if 'author' supplied, " + - "'author_email' must be supplied too") + "'author_email' should be supplied too") elif metadata.maintainer: if not metadata.maintainer_email: self.warn("missing meta-data: if 'maintainer' supplied, " + - "'maintainer_email' must be supplied too") + "'maintainer_email' should be supplied too") else: self.warn("missing meta-data: either (author and author_email) " + "or (maintainer and maintainer_email) " + - "must be supplied") + "should be supplied") def check_restructuredtext(self): """Checks if the long string fields are reST-compliant.""" |
