classification
Title: Change metadata handling in check command
Type: Stage:
Components: Distutils Versions: Python 3.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: dstufft, eric.araujo, jambonrose
Priority: normal Keywords:

Created on 2017-07-28 20:51 by jambonrose, last changed 2017-08-01 21:25 by jambonrose.

Messages (2)
msg299436 - (view) Author: Andrew Pinkham (jambonrose) * Date: 2017-07-28 20:51
The new warehouse uses the author_email field to create a mailto link. Donald Stufft recommended leaving out the author_email field while still specifying the author field should a maintainer wish to have their name associated without their email.

Conversation with Donald:
https://github.com/pypa/warehouse/issues/2155

Unfortunately, specifying author but not author_email causes the `setup.py check` command to throw an error. "check: missing meta-data: if 'author' supplied, 'author_email' must be supplied too"

I would like to remove that check from being performed given the recommended fix for warehouse. The logic that performs this check is currently in the distutils check command.

https://github.com/python/cpython/blob/master/Lib/distutils/command/check.py

Additionally, AFAICT, it is impossible to disable the metadata check in distutils. I would also like to add a negative option to allow the metadata check to be skipped.
msg299637 - (view) Author: Andrew Pinkham (jambonrose) * Date: 2017-08-01 21:25
Judging from √Čric's reaction on Github, I suspect there may be some reticence to changing this code.

I've sub-classed the check command in the project I'm working on to demonstrate what I would like the new behavior to be.

https://github.com/jambonsw/django-improved-user/blob/4b699814f68cefe6cf7a63f43f619ee21376cb01/setup.py#L34

If that looks interesting and people are open to changes along those lines, I'm happy to discuss, take feedback, and open a PR. Alternatively, I'm happy to see about overriding the check command in pypa/setuptools instead of modifying distutils. If neither of these are of interest, feel free to close this issue.
History
Date User Action Args
2017-08-01 21:25:45jambonrosesetmessages: + msg299637
2017-07-28 20:51:47jambonrosecreate