Skip to content

bpo-38914 Do not require email field in setup.py. #17388

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Doc/distutils/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ Running the ``check`` command will display some warnings:
running check
warning: check: missing required meta-data: version, url
warning: check: missing meta-data: either (author and author_email) or
(maintainer and maintainer_email) must be supplied
(maintainer and maintainer_email) should be supplied


If you use the reStructuredText syntax in the ``long_description`` field and
Expand Down
13 changes: 8 additions & 5 deletions Lib/distutils/command/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,11 @@ def run(self):
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.
"""
Expand All @@ -97,15 +100,15 @@ def check_metadata(self):
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."""
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Adjusted the wording of the warning issued by distutils' ``check`` command when
the ``author`` and ``maintainer`` fields are supplied but no corresponding
e-mail field (``author_email`` or ``maintainer_email``) is found. The wording
now reflects the fact that these fields are suggested, but not required. Patch
by Juergen Gmach.