[Patches] [ python-Patches-403977 ] Rename config.h to pyac_config.h, per SF bug #131774

nobody nobody@sourceforge.net
Thu, 01 Mar 2001 17:29:53 -0800


Patches #403977, was updated on 2001-02-23 13:28
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=403977&group_id=5470

Category: Build
Group: None
Status: Open
Priority: 5
Submitted By: Thomas Wouters
Assigned to: Guido van Rossum
Summary: Rename config.h to pyac_config.h, per SF bug #131774

Initial Comment:
This patch fixes the UNIX and Windows builds to use 'pyac_config.h' instead of 'config.h', to avoid the problems summarized in SF bug #131774. It doesn't address the placing issue, however, because I believe it's intended to be like this.

Most changes were done using a fairly intelligent shell+sed oneliner, but they should be correct. The Windows build *seems* correct, though I can't be sure. Someone will have to check ;) It is probably a good idea to remove 'config.h' before testing, to be sure I got all references.

The UNIX build requires that autoconf is installed, and requires a 'autoheader ; autoconf' is done before running 'configure'. Removing config.h(.in) is also a good idea.

I excluded the OS2 build files, and will be uploading those as a seperate patch to avoid making this one unreadable Though only two files are involved, they both list all dependencies for *all* files in its entirety, so the patch is quite large. If those files are auto-generated, someone please tell me so :-)

I also didn't fix distutils, though it looks like it does need fixing. And I didn't do anything wrt. backwards compatibility. We should probably provide a config.h that just does

#warning Warning: Use of Python-specific config.h is deprecated. Use pyac_config.h instead.
#include <pyac_config.h>

The name is just my suggestion, changing it into something less acronymic would be no problem at all. I think 'pythonconfig.h' gives the wrong message though: the file isn't used to configure Python itself, after all ;)


----------------------------------------------------------------------

Comment By: Tim Peters
Date: 2001-03-01 17:29

Message:
Logged In: YES 
user_id=31435

Na, I don't mind the pyac name.  I had forgotten (or 
perhaps never knew) that this thing is a generated file (on 
Windows it's done by hand).  It's an internal 
implementation detail anyway, so it doesn't matter if the 
name "makes sense" to Windows geeks; at least pyac_config 
will make some sense to Linux dweebs.

----------------------------------------------------------------------

Comment By: Trent Mick
Date: 2001-03-01 17:08

Message:
Logged In: YES 
user_id=34892

Tim said:
> BTW, I have no idea what "pyac" is supposed to bring
> to mind.  Is that some Unixism?

In answer to that. How about just calling it "pyconfig.h". 
The reference to autoconf is not very accurate for Windows. 

----------------------------------------------------------------------

Comment By: Thomas Wouters
Date: 2001-02-28 01:07

Message:
Logged In: YES 
user_id=34209

I forgot to mention that I think this should be postponed
until 2.2 or 2.1.1 anyway. It's not that big a change, but
it's big enough to have weird and unsuspected sideffects.

The bug is now numbered #231774, by the way. The problem is
that 'config.h' is an oft-used name, and if you include it
but have another directory with another project's config.h
earlier in your include path, you get the wrong one. Similar
if you intend to use the other one, but get this one.
Leaving a fake config.h would only cause this patch to fix
half of those problems, but only the first problem was
reported in the bugreport :)

The 'pyac_config' name comes from 'python', 'autoconf',
'config', and is IMHO sufficiently vague that it implies it
is autogenerated :-)





----------------------------------------------------------------------

Comment By: Jeremy Hylton
Date: 2001-02-27 23:14

Message:
Logged In: YES 
user_id=31392

No time

----------------------------------------------------------------------

Comment By: Neil Schemenauer
Date: 2001-02-27 13:53

Message:
Logged In: YES 
user_id=35752

SF seems to have changed the bug ids!  I can't find bug 
#131774.  Unless there is a very good reason for the
change I'm against it for 2.1.

----------------------------------------------------------------------

Comment By: A.M. Kuchling
Date: 2001-02-27 13:05

Message:
Logged In: YES 
user_id=11375

Regarding Distutils: I think the only actual *code* 
that would change is in distutils/sysconfig.py, 
in the get_config_h_filename() method.  For backward
compat., this method would probably have to check the Python
version and use pyac_config.h if the version is 2.1 or
greater.

There are also lots of references to config.h in comments;
we can change those or not, as desired.  (I probably *would*
change most of them.)


----------------------------------------------------------------------

Comment By: Tim Peters
Date: 2001-02-27 12:48

Message:
Logged In: YES 
user_id=31435

Pushed onto Jeremy.  Jeremy, we want to do this much 
fiddling so late in the cycle?

Thomas, don't worry about Windows.  I only need a warning 
about that, and I've aware of this now (thanks!).  Check in 
the new MS project files or don't, it's easy for me to 
fix 'em up regardless (indeed, it's not worth extra time to 
check it in advance).

Note that "#warning" is not std C.  I'm afraid you'll have 
to make it an #error.  OTOH, if you leave a file 
*named* "config.h" in the distribution, it doesn't really 
address the bug report, right?

BTW, I have no idea what "pyac" is supposed to bring to 
mind.  Is that some Unixism?


----------------------------------------------------------------------

Comment By: Thomas Wouters
Date: 2001-02-23 13:32

Message:
Apologies for the large blurb in the 'details' section. I keep forgetting SF strips *all* whitespace from that block :(

Assigning to Tim "The Windows Bot" Peters to test (and fix) the Windows build changes. Let me know if your patch still doesn't work and you want me to send you patched files instead, Tim.



----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=403977&group_id=5470