shadow password module (spwd) is never built due to error in setup.py

Hello, A modification was made in setup.py, cvs rel 1.213 (see diff here: http://cvs.sourceforge.net/viewcvs.py/python/python/dist/src/setup.py?r1=1.212&r2=1.213 ) which appears to be wrong. At least, on my system, the spwd module is never built anymore, because the if statement is never true. Actually, the sysconfig doesn't contain *any* of the HAVE_XXXX vars that occur in pyconfig.h (I checked by printing all vars). I don't really understand the distutils magic that is done in setup.py, but it appears to me that either the if statement is wrong (because the vars never exist) or distutils does something wrong by leaving out all HAVE_XXX vars from pyconfig.h. Please advise? I want my spwd module back ;-) --Irmen de Jong PS I checked that pyconfig.h correctly #defines both HAVE_GETSPNAM and HAVE_GETSPENT to 1 on my system (Mandrake linux 10.1), so the rest of the configure script runs fine (it should, I created the original patches for it... see SF patch # 579435)

Martin v. Löwis wrote:
Irmen de Jong wrote:
Please advise?
setup.py should refer to config_h_vars, which in turn should be set earlier.
Regards, Martin
Ah so the setup.py script is flawed. However, the sysconfig object doesn't contain a config_h_vars... So I guess distutils must be patched too? --Irmen

Irmen de Jong wrote:
Martin v. Löwis wrote:
Irmen de Jong wrote:
Please advise?
setup.py should refer to config_h_vars, which in turn should be set earlier.
Regards, Martin
Ah so the setup.py script is flawed. However, the sysconfig object doesn't contain a config_h_vars... So I guess distutils must be patched too?
While it probably should be included in distutils.sysconfig, config_h_vars was created later on in setup.py by some code dealing with whether to compile expat. I just moved that up to the top of the funciton so that it can be used sooner. Fixed in rev. 1.217 . Sorry about the bad checking that broke the building of it in the first place. =) -Brett
participants (3)
-
"Martin v. Löwis"
-
Brett C.
-
Irmen de Jong