mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
@@ -2380,10 +2380,10 @@ Windows.
|
||||
|
||||
Grab the binary installer from \url{http://www.python.org/} and
|
||||
install Python. The binary installer has all of the required header
|
||||
files except for \file{config.h}.
|
||||
files except for \file{pyconfig.h}.
|
||||
|
||||
Get the source distribution and extract it into a convenient location.
|
||||
Copy the \file{config.h} from the \file{PC/} directory into the
|
||||
Copy the \file{pyconfig.h} from the \file{PC/} directory into the
|
||||
\file{include/} directory created by the installer.
|
||||
|
||||
Create a \file{Setup} file for your extension module, as described in
|
||||
|
||||
@@ -140,7 +140,7 @@ Raised when an \keyword{assert} statement fails.
|
||||
always defined, but can only be raised when Python is configured
|
||||
with the \longprogramopt{with-fpectl} option, or the
|
||||
\constant{WANT_SIGFPE_HANDLER} symbol is defined in the
|
||||
\file{config.h} file.
|
||||
\file{pyconfig.h} file.
|
||||
\end{excdesc}
|
||||
|
||||
\begin{excdesc}{IOError}
|
||||
|
||||
@@ -129,7 +129,7 @@ It is always available.
|
||||
also \code{'/usr/local'}. This can be set at build time with the
|
||||
\longprogramopt{exec-prefix} argument to the \program{configure}
|
||||
script. Specifically, all configuration files (e.g. the
|
||||
\file{config.h} header file) are installed in the directory
|
||||
\file{pyconfig.h} header file) are installed in the directory
|
||||
\code{exec_prefix + '/lib/python\var{version}/config'}, and shared
|
||||
library modules are installed in \code{exec_prefix +
|
||||
'/lib/python\var{version}/lib-dynload'}, where \var{version} is
|
||||
@@ -298,7 +298,7 @@ else:
|
||||
the \longprogramopt{prefix} argument to the \program{configure}
|
||||
script. The main collection of Python library modules is installed
|
||||
in the directory \code{prefix + '/lib/python\var{version}'} while
|
||||
the platform independent header files (all except \file{config.h})
|
||||
the platform independent header files (all except \file{pyconfig.h})
|
||||
are stored in \code{prefix + '/include/python\var{version}'}, where
|
||||
\var{version} is equal to \code{version[:3]}.
|
||||
\end{datadesc}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
/* Include nearly all Python header files */
|
||||
|
||||
#include "patchlevel.h"
|
||||
#include "config.h"
|
||||
#include "pyconfig.h"
|
||||
|
||||
#ifdef HAVE_LIMITS_H
|
||||
#include <limits.h>
|
||||
|
||||
@@ -7,7 +7,7 @@ extern "C" {
|
||||
|
||||
/* Include files and extern declarations used by most of the parser. */
|
||||
|
||||
#include "config.h"
|
||||
#include "pyconfig.h"
|
||||
|
||||
/* config.h may or may not define DL_IMPORT */
|
||||
#ifndef DL_IMPORT /* declarations for DLL import/export */
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef Py_PYPORT_H
|
||||
#define Py_PYPORT_H
|
||||
|
||||
#include "config.h" /* include for defines */
|
||||
#include "pyconfig.h" /* include for defines */
|
||||
|
||||
/**************************************************************************
|
||||
Symbols and macros to supply platform-independent interfaces to basic
|
||||
|
||||
@@ -125,7 +125,7 @@ class build_ext (Command):
|
||||
self.extensions = self.distribution.ext_modules
|
||||
|
||||
|
||||
# Make sure Python's include directories (for Python.h, config.h,
|
||||
# Make sure Python's include directories (for Python.h, pyconfig.h,
|
||||
# etc.) are in the include search path.
|
||||
py_include = sysconfig.get_python_inc()
|
||||
plat_py_include = sysconfig.get_python_inc(plat_specific=1)
|
||||
@@ -592,7 +592,7 @@ class build_ext (Command):
|
||||
"""
|
||||
# The python library is always needed on Windows. For MSVC, this
|
||||
# is redundant, since the library is mentioned in a pragma in
|
||||
# config.h that MSVC groks. The other Windows compilers all seem
|
||||
# pyconfig.h that MSVC groks. The other Windows compilers all seem
|
||||
# to need it mentioned explicitly, though, so that's what we do.
|
||||
# Append '_d' to the python import library on debug builds.
|
||||
from distutils.msvccompiler import MSVCCompiler
|
||||
|
||||
@@ -73,7 +73,7 @@ class CygwinCCompiler (UnixCCompiler):
|
||||
(status, details))
|
||||
if status is not CONFIG_H_OK:
|
||||
self.warn(
|
||||
"Python's config.h doesn't seem to support your compiler. " +
|
||||
"Python's pyconfig.h doesn't seem to support your compiler. " +
|
||||
("Reason: %s." % details) +
|
||||
"Compiling may fail because of undefined preprocessor macros.")
|
||||
|
||||
@@ -335,7 +335,7 @@ class Mingw32CCompiler (CygwinCCompiler):
|
||||
|
||||
# class Mingw32CCompiler
|
||||
|
||||
# Because these compilers aren't configured in Python's config.h file by
|
||||
# Because these compilers aren't configured in Python's pyconfig.h file by
|
||||
# default, we should at least warn the user if he is using a unmodified
|
||||
# version.
|
||||
|
||||
@@ -345,7 +345,7 @@ CONFIG_H_UNCERTAIN = "uncertain"
|
||||
|
||||
def check_config_h():
|
||||
|
||||
"""Check if the current Python installation (specifically, config.h)
|
||||
"""Check if the current Python installation (specifically, pyconfig.h)
|
||||
appears amenable to building extensions with GCC. Returns a tuple
|
||||
(status, details), where 'status' is one of the following constants:
|
||||
CONFIG_H_OK
|
||||
@@ -353,21 +353,21 @@ def check_config_h():
|
||||
CONFIG_H_NOTOK
|
||||
doesn't look good
|
||||
CONFIG_H_UNCERTAIN
|
||||
not sure -- unable to read config.h
|
||||
not sure -- unable to read pyconfig.h
|
||||
'details' is a human-readable string explaining the situation.
|
||||
|
||||
Note there are two ways to conclude "OK": either 'sys.version' contains
|
||||
the string "GCC" (implying that this Python was built with GCC), or the
|
||||
installed "config.h" contains the string "__GNUC__".
|
||||
installed "pyconfig.h" contains the string "__GNUC__".
|
||||
"""
|
||||
|
||||
# XXX since this function also checks sys.version, it's not strictly a
|
||||
# "config.h" check -- should probably be renamed...
|
||||
# "pyconfig.h" check -- should probably be renamed...
|
||||
|
||||
from distutils import sysconfig
|
||||
import string
|
||||
# if sys.version contains GCC then python was compiled with
|
||||
# GCC, and the config.h file should be OK
|
||||
# GCC, and the pyconfig.h file should be OK
|
||||
if string.find(sys.version,"GCC") >= 0:
|
||||
return (CONFIG_H_OK, "sys.version mentions 'GCC'")
|
||||
|
||||
@@ -386,7 +386,7 @@ def check_config_h():
|
||||
"couldn't read '%s': %s" % (fn, exc.strerror))
|
||||
|
||||
else:
|
||||
# "config.h" contains an "#ifdef __GNUC__" or something similar
|
||||
# "pyconfig.h" contains an "#ifdef __GNUC__" or something similar
|
||||
if string.find(s,"__GNUC__") >= 0:
|
||||
return (CONFIG_H_OK, "'%s' mentions '__GNUC__'" % fn)
|
||||
else:
|
||||
|
||||
@@ -43,7 +43,7 @@ def get_python_inc(plat_specific=0, prefix=None):
|
||||
If 'plat_specific' is false (the default), this is the path to the
|
||||
non-platform-specific header files, i.e. Python.h and so on;
|
||||
otherwise, this is the path to platform-specific header files
|
||||
(namely config.h).
|
||||
(namely pyconfig.h).
|
||||
|
||||
If 'prefix' is supplied, use it instead of sys.prefix or
|
||||
sys.exec_prefix -- i.e., ignore 'plat_specific'.
|
||||
@@ -137,10 +137,10 @@ def customize_compiler(compiler):
|
||||
|
||||
|
||||
def get_config_h_filename():
|
||||
"""Return full pathname of installed config.h file."""
|
||||
"""Return full pathname of installed pyconfig.h file."""
|
||||
if python_build: inc_dir = '.'
|
||||
else: inc_dir = get_python_inc(plat_specific=1)
|
||||
return os.path.join(inc_dir, "config.h")
|
||||
return os.path.join(inc_dir, "pyconfig.h")
|
||||
|
||||
|
||||
def get_makefile_filename():
|
||||
|
||||
@@ -118,7 +118,7 @@ SRCDIRS= @SRCDIRS@
|
||||
SUBDIRSTOO= Include Lib Misc Demo
|
||||
|
||||
# Files and directories to be distributed
|
||||
CONFIGFILES= configure configure.in acconfig.h config.h.in Makefile.pre.in
|
||||
CONFIGFILES= configure configure.in acconfig.h pyconfig.h.in Makefile.pre.in
|
||||
DISTFILES= README ChangeLog $(CONFIGFILES)
|
||||
DISTDIRS= $(SUBDIRS) $(SUBDIRSTOO) Ext-dummy
|
||||
DIST= $(DISTFILES) $(DISTDIRS)
|
||||
@@ -417,7 +417,7 @@ Mac/Python/macglue.o: $(srcdir)/Mac/Python/macglue.c
|
||||
|
||||
PYTHON_HEADERS= \
|
||||
Include/Python.h \
|
||||
config.h \
|
||||
pyconfig.h \
|
||||
Include/patchlevel.h \
|
||||
Include/pyport.h \
|
||||
Include/pymem.h \
|
||||
@@ -650,7 +650,7 @@ inclinstall:
|
||||
echo $(INSTALL_DATA) $$i $(INCLUDEPY); \
|
||||
$(INSTALL_DATA) $$i $(INCLUDEPY); \
|
||||
done
|
||||
$(INSTALL_DATA) config.h $(CONFINCLUDEPY)/config.h
|
||||
$(INSTALL_DATA) pyconfig.h $(CONFINCLUDEPY)/pyconfig.h
|
||||
|
||||
# Install the library and miscellaneous stuff needed for extending/embedding
|
||||
# This goes into $(exec_prefix)
|
||||
@@ -732,7 +732,7 @@ recheck:
|
||||
$(SHELL) config.status --recheck
|
||||
$(SHELL) config.status
|
||||
|
||||
# Rebuild the configure script from configure.in; also rebuild config.h.in
|
||||
# Rebuild the configure script from configure.in; also rebuild pyconfig.h.in
|
||||
autoconf:
|
||||
(cd $(srcdir); autoconf)
|
||||
(cd $(srcdir); autoheader)
|
||||
@@ -762,7 +762,7 @@ clean:
|
||||
clobber: clean
|
||||
-rm -f $(PYTHON) $(PGEN) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \
|
||||
tags TAGS \
|
||||
config.cache config.log config.h Modules/config.c
|
||||
config.cache config.log pyconfig.h Modules/config.c
|
||||
-rm -rf build platform
|
||||
|
||||
# Make things extra clean, before making a distribution:
|
||||
|
||||
@@ -19,8 +19,8 @@ for Python. Not all source files are relevant -- some are platform
|
||||
specific, others are only used in emergencies (e.g. getopt.c). The
|
||||
Makefiles tell the story.
|
||||
|
||||
You'll also need a config.h file tailored for your platform. You can
|
||||
start with config.h.in, read the comments and turn on definitions that
|
||||
You'll also need a pyconfig.h file tailored for your platform. You can
|
||||
start with pyconfig.h.in, read the comments and turn on definitions that
|
||||
apply to your platform.
|
||||
|
||||
And you'll need a config.c file, which lists the built-in modules you
|
||||
|
||||
@@ -25,7 +25,7 @@ raiseTestError(const char* test_name, const char* msg)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Test #defines from config.h (particularly the SIZEOF_* defines).
|
||||
/* Test #defines from pyconfig.h (particularly the SIZEOF_* defines).
|
||||
|
||||
The ones derived from autoconf on the UNIX-like OSes can be relied
|
||||
upon (in the absence of sloppy cross-compiling), but the Windows
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "config.h"
|
||||
#include "pyconfig.h"
|
||||
|
||||
#ifdef macintosh
|
||||
#include "macbuildno.h"
|
||||
|
||||
@@ -46,7 +46,7 @@ corresponding Unix manual entries for more information on calls.";
|
||||
#endif /* HAVE_UNISTD_H */
|
||||
|
||||
/* Various compilers have only certain posix functions */
|
||||
/* XXX Gosh I wish these were all moved into config.h */
|
||||
/* XXX Gosh I wish these were all moved into pyconfig.h */
|
||||
#if defined(PYCC_VACPP) && defined(PYOS_OS2)
|
||||
#include <process.h>
|
||||
#else
|
||||
|
||||
@@ -10,7 +10,7 @@ forgotten) from the programmer.
|
||||
#include "windows.h"
|
||||
|
||||
/* NT and Python share these */
|
||||
#include "config.h"
|
||||
#include "pyconfig.h"
|
||||
#include "Python.h"
|
||||
|
||||
char dllVersionBuffer[16] = ""; // a private buffer
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -926,9 +926,9 @@ item: Install File
|
||||
Flags=0000000000000010
|
||||
end
|
||||
item: Install File
|
||||
Source=%_SRC_%\PC\config.h
|
||||
Destination=%MAINDIR%\include\config.h
|
||||
Description=Header files (config.h)
|
||||
Source=%_SRC_%\PC\pyconfig.h
|
||||
Destination=%MAINDIR%\include\pyconfig.h
|
||||
Description=Header files (pyconfig.h)
|
||||
Flags=0000000000000010
|
||||
end
|
||||
item: Install File
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user