This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: pysetup silently ignores invalid entries in setup.cfg
Type: behavior Stage: resolved
Components: Distutils2 Versions: Python 3.3, 3rd party
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: eric.araujo Nosy List: alexis, eric.araujo, erik.bray, paul.moore, tarek
Priority: normal Keywords:

Created on 2011-10-14 17:47 by paul.moore, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (4)
msg145552 - (view) Author: Paul Moore (paul.moore) * (Python committer) Date: 2011-10-14 17:47
With a simple setup.cfg defining a distribution containing a single Python module, if you misspell the "modules" keyword (say, as "module") then pysetup does nothing without reporting the error.

This silent failure is very hard to debug, and even if pysetup is ignoring unknown items by design, it should at a minimum report ignored items and probably try to warn on common misspellings like this one.

PS D:\Data\python-sample\python> type .\setup.cfg
name = hello
version = 0.1
author = Paul Moore
author-email =
summary = Test Python module

module = hello
PS D:\Data\python-sample\python> pysetup run build
running build
PS D:\Data\python-sample\python> dir

    Directory: D:\Data\python-sample\python

Mode                LastWriteTime     Length Name
----                -------------     ------ ----
-a---        13/10/2011     19:46         42
-a---        14/10/2011     18:42        155 setup.cfg

(No build directory created!)
msg145704 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-10-17 14:48
Agreed.  Doc/packaging/setupcfg.rst defines that custom fields need to start with X-, so we can refuse everything that is not built-in and does not start with X-.  (I’m going toward error rather than warning.)
msg147492 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-11-12 14:50
I want to explore ideas about a schema/type system, so I’m removing the easy keyword.
msg153095 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-02-11 05:16
A side effect of this change will be the removal of the Extension class, which was only useful to do some typechecks/conversions on its arguments.  In Python code it will be replaced by a dict (with keys 'name', 'sources', 'optional', etc.), and when building this dict from a setup.cfg the config parser will validate/convert the values read.
Date User Action Args
2022-04-11 14:57:22adminsetgithub: 57389
2014-03-13 02:41:47eric.araujosetstatus: open -> closed
resolution: out of date
stage: needs patch -> resolved
2012-02-11 05:16:25eric.araujosetmessages: + msg153095
2011-11-12 14:50:48eric.araujosetkeywords: - easy

messages: + msg147492
2011-10-17 14:48:12eric.araujosetassignee: tarek -> eric.araujo
versions: + 3rd party
keywords: + easy
nosy: + erik.bray

messages: + msg145704
stage: needs patch
2011-10-14 17:47:19paul.moorecreate