[Python-Dev] API for the new sysconfig module (original) (raw)
Éric Araujo merwok at netwok.org
Fri Dec 10 15:20:17 CET 2010
- Previous message: [Python-Dev] API for the new sysconfig module
- Next message: [Python-Dev] API for the new sysconfig module
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
Original discussion for the sysconfig module was short: http://mail.python.org/pipermail/python-dev/2009-May/089520.html
Tarek will reply better, but I think the issue to solve was to move sysconfig out of distutils, improving its API a bit in the process but not overhauling it completely. A single function returning a nested dictionary could be added if deemed useful, but to me the existing API separates concerns (paths and variables for example) without being confusing nor having too many names.
Exceptions: get_python_version could be removed; get_scheme_names and get_path_names could be replaced by constants. Maybe Tarek chose accessors to keep freedom for later, or just for consistency.
sysconfig being new in 2.7 and 3.2, I don’t know how compatibility concerns apply. I think it would be bad to have highlighted the new module in 2.7 and then remove it in 3.2, since 2.6 and 2.7 have the goal of helping people moving to 3.x. Also, I don’t see where those 800 lines of code would live if the sysconfig module is removed; maybe in platform, which is already long? (it could be made smaller with some code modernization, removal of the popen function, but not much smaller).
Final note: with 3.2 being in beta, I don’t know how much can be changed now.
The old way required source code available ability at runtime, the new sysconfig module captures everything it needs at build time. Not yet :) See http://bugs.python.org/issue9878
Regards
- Previous message: [Python-Dev] API for the new sysconfig module
- Next message: [Python-Dev] API for the new sysconfig module
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]