Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 8237d89

Browse files
committed
Support fake root install, separate build dir, dependency tracking, our
choice of compiler and flags, uninstall, and peculiar Python installation layouts for PyGreSql. Also install into site-packages now, as officially recommended. And pgdb.py is also installed now, used to be forgotten.
1 parent 975da0a commit 8237d89

File tree

5 files changed

+406
-412
lines changed

5 files changed

+406
-412
lines changed

config/python.m4

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#
22
# Autoconf macros for configuring the build of Python extension modules
33
#
4-
# $Header: /cvsroot/pgsql/config/python.m4,v 1.2 2001/05/12 17:49:32 petere Exp $
4+
# $Header: /cvsroot/pgsql/config/python.m4,v 1.3 2001/07/10 16:33:01 petere Exp $
55
#
66

77
# PGAC_PATH_PYTHON
@@ -21,48 +21,44 @@ fi
2121
# Determine the name of various directory of a given Python installation.
2222
AC_DEFUN([_PGAC_CHECK_PYTHON_DIRS],
2323
[AC_REQUIRE([PGAC_PATH_PYTHON])
24+
AC_MSG_CHECKING([Python installation directories])
2425
python_version=`${PYTHON} -c "import sys; print sys.version[[:3]]"`
2526
python_prefix=`${PYTHON} -c "import sys; print sys.prefix"`
2627
python_execprefix=`${PYTHON} -c "import sys; print sys.exec_prefix"`
2728
python_configdir="${python_execprefix}/lib/python${python_version}/config"
28-
python_moduledir="${python_prefix}/lib/python${python_version}"
29-
python_includedir="${python_prefix}/include/python${python_version}"
30-
python_dynlibdir="${python_execprefix}/lib/python${python_version}/lib-dynload"
29+
python_moduledir="${python_prefix}/lib/python${python_version}/site-packages"
30+
python_moduleexecdir="${python_execprefix}/lib/python${python_version}/site-packages"
31+
python_includespec="-I${python_prefix}/include/python${python_version}"
32+
if test "$python_prefix" != "$python_execprefix"; then
33+
python_includespec="-I${python_execprefix}/include/python${python_version} $python_includespec"
34+
fi
3135
3236
AC_SUBST(python_version)[]dnl
3337
AC_SUBST(python_prefix)[]dnl
3438
AC_SUBST(python_execprefix)[]dnl
3539
AC_SUBST(python_configdir)[]dnl
3640
AC_SUBST(python_moduledir)[]dnl
37-
AC_SUBST(python_includedir)[]dnl
38-
AC_SUBST(python_dynlibdir)[]dnl
41+
AC_SUBST(python_moduleexecdir)[]dnl
42+
AC_SUBST(python_includespec)[]dnl
43+
# This should be enough of a message.
44+
if test "$python_prefix" != "$python_execprefix"; then
45+
AC_MSG_RESULT([$python_prefix/lib/python${python_version} and $python_execprefix/lib/python${python_version}])
46+
else
47+
AC_MSG_RESULT([$python_prefix/lib/python${python_version}])
48+
fi
3949
])# _PGAC_CHECK_PYTHON_DIRS
4050

4151

4252
# PGAC_CHECK_PYTHON_MODULE_SETUP
4353
# ------------------------------
44-
# Finds things required to build a Python extension module, in
45-
# particular the makefile.
54+
# Finds things required to build a Python extension module.
55+
# This used to do more, that's why it's separate.
4656
#
4757
# It would be nice if we could check whether the current setup allows
4858
# the build of the shared module. Future project.
4959
AC_DEFUN([PGAC_CHECK_PYTHON_MODULE_SETUP],
50-
[AC_REQUIRE([_PGAC_CHECK_PYTHON_DIRS])
51-
AC_MSG_CHECKING([for makefile to build Python module])
52-
python_makefile_pre_in="${python_configdir}/Makefile.pre.in"
53-
54-
if test -f "${python_makefile_pre_in}" ; then
55-
AC_MSG_RESULT([${python_makefile_pre_in}])
56-
else
57-
AC_MSG_RESULT(no)
58-
AC_MSG_ERROR(
59-
[The file
60-
${python_makefile_pre_in}
61-
required to build Python modules does not exist. Make sure that you have
62-
a full Python installation and that this is the right location.])
63-
fi
64-
65-
AC_SUBST(python_makefile_pre_in)[]dnl
60+
[
61+
AC_REQUIRE([_PGAC_CHECK_PYTHON_DIRS])
6662
])# PGAC_CHECK_PYTHON_MODULE_SETUP
6763

6864

0 commit comments

Comments
 (0)