homepage

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.

classification
Title: CPython setup.py problems
Type: behavior Stage: resolved
Components: Build Versions: Python 3.3, Python 3.4, Python 2.7
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Arfrever, eric.araujo, iritkatriel, jkloth, ronaldoussoren
Priority: normal Keywords:

Created on 2013年06月18日 13:13 by ronaldoussoren, last changed 2022年04月11日 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
setup-update.txt ronaldoussoren, 2013年06月18日 13:13 review
setup-update-v2.txt ronaldoussoren, 2013年06月18日 14:49 review
Messages (7)
msg191406 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2013年06月18日 13:13
While working on a fix for #18211 I noticed two problems with the setup.py that's used to build the stdlib extensions.
1) setup.py uses sysconfig instead of distutils.sysconfig. The sematics of the two modules a slighty different.
2) The block of code starting with the this text is not necessary because distutils.sysconfig (which is used by the build_ext command) already does the right thing for environment variables:
 # When you run "make CC=altcc" or something similar, you really want
 # those environment variables passed into the setup.py phase. Here's
 # a small set of useful ones.
msg191414 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2013年06月18日 14:49
So much for obviously correct changes...
1) fix typo in import statement (from sysconfig import import ...)
2) setup.py uses sysconfig.get_path and that's not present in distutils.sysconfig.
(Sigh..., why are there two modules with almost but not entirely equal functionality and APIs?)
msg191427 - (view) Author: Arfrever Frehtes Taifersar Arahesis (Arfrever) * (Python triager) Date: 2013年06月18日 19:29
distutils.sysconfig module is theoretically deprecated in favor of sysconfig module. It is better to fix sysconfig module than to switch back to distutils.sysconfig module.
msg191445 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2013年06月19日 05:51
I don't agree. Distutils still uses distutils.sysconfig for configuration information and setup.py wants to adjust that configuration, it should therefore use distutils.sysconfig instead of the global one. 
That said, it would be better to change distutils to use sysconfig instead of its local configuration information (distutils.sysconfig, distutils.command.install.INSTALL_SCHEMES, ...). That has never been because distutils is frozen due to backward compatibility concerns, but it might be better to actually change distutils for 3.4 when there will be other changes to deal with the new packaging PEPs as well).
However: switching distutils to use the toplevel sysconfig will change functionality, as I wrote in my initial message you can use environment variables to override variables for distutils.sysconfig, but that doesn't work for the global sysconfig because the values in _sysconfigdata are expanded at build time.
msg217883 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2014年05月04日 18:35
Note that the distutils feature freeze has been lifted, so in 3.5 sysconfig could be reused by distutils.sysconfig, but the existing functionality (different API + ability to override with env vars) must be preserved.
msg398807 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2021年08月02日 22:39
Is this still relevant now that distutils is deprecated?
msg398821 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2021年08月03日 11:36
This is no longer relevant now that distutils is deprecated.
History
Date User Action Args
2022年04月11日 14:57:47adminsetgithub: 62455
2021年08月03日 11:36:57ronaldoussorensetstatus: open -> closed

messages: + msg398821
stage: patch review -> resolved
2021年08月02日 22:39:13iritkatrielsetnosy: + iritkatriel
messages: + msg398807
2014年05月04日 18:35:56eric.araujosetnosy: + eric.araujo
messages: + msg217883
2014年05月04日 18:08:47eric.araujounlinkissue18211 dependencies
2013年06月19日 05:51:07ronaldoussorensetmessages: + msg191445
2013年06月18日 19:29:53Arfreversetnosy: + Arfrever
messages: + msg191427
2013年06月18日 14:49:10ronaldoussorensetfiles: + setup-update-v2.txt

messages: + msg191414
2013年06月18日 14:07:26jklothsetnosy: + jkloth
2013年06月18日 13:13:54ronaldoussorenlinkissue18211 dependencies
2013年06月18日 13:13:06ronaldoussorencreate

AltStyle によって変換されたページ (->オリジナル) /