Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
54313932
Commit
54313932
authored
20 years ago
by
Bruce Momjian
Browse files
Options
Downloads
Patches
Plain Diff
Allow plpython to build on Win32.
Magnus Hagander
parent
4542581b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
config/python.m4
+4
-19
4 additions, 19 deletions
config/python.m4
configure
+3
-20
3 additions, 20 deletions
configure
src/Makefile.global.in
+2
-1
2 additions, 1 deletion
src/Makefile.global.in
src/pl/plpython/Makefile
+25
-1
25 additions, 1 deletion
src/pl/plpython/Makefile
with
34 additions
and
41 deletions
config/python.m4
+
4
−
19
View file @
54313932
#
#
# Autoconf macros for configuring the build of Python extension modules
# Autoconf macros for configuring the build of Python extension modules
#
#
# $PostgreSQL: pgsql/config/python.m4,v 1.
8
2004/
09/16 23:3
0:
3
0
joe
Exp $
# $PostgreSQL: pgsql/config/python.m4,v 1.
9
2004/
10/06 09:2
0:
4
0
momjian
Exp $
#
#
# PGAC_PATH_PYTHON
# PGAC_PATH_PYTHON
...
@@ -34,15 +34,13 @@ python_version=`${PYTHON} -c "import sys; print sys.version[[:3]]"`
...
@@ -34,15 +34,13 @@ python_version=`${PYTHON} -c "import sys; print sys.version[[:3]]"`
python_prefix=`${PYTHON} -c "import sys; print sys.prefix"`
python_prefix=`${PYTHON} -c "import sys; print sys.prefix"`
python_execprefix=`${PYTHON} -c "import sys; print sys.exec_prefix"`
python_execprefix=`${PYTHON} -c "import sys; print sys.exec_prefix"`
python_configdir=`${PYTHON} -c "from distutils.sysconfig import get_python_lib as f; import os; print os.path.join(f(plat_specific=1,standard_lib=1),'config')"`
python_configdir=`${PYTHON} -c "from distutils.sysconfig import get_python_lib as f; import os; print os.path.join(f(plat_specific=1,standard_lib=1),'config')"`
python_includespec="-I${python_prefix}/include/python${python_version}"
python_includespec=`${PYTHON} -c "import distutils.sysconfig; print '-I'+distutils.sysconfig.get_python_inc()"`
if test "$python_prefix" != "$python_execprefix"; then
python_includespec="-I${python_execprefix}/include/python${python_version} $python_includespec"
fi
AC_SUBST(python_prefix)[]dnl
AC_SUBST(python_prefix)[]dnl
AC_SUBST(python_execprefix)[]dnl
AC_SUBST(python_execprefix)[]dnl
AC_SUBST(python_configdir)[]dnl
AC_SUBST(python_configdir)[]dnl
AC_SUBST(python_includespec)[]dnl
AC_SUBST(python_includespec)[]dnl
AC_SUBST(python_version)[]dnl
# This should be enough of a message.
# This should be enough of a message.
if test "$python_prefix" != "$python_execprefix"; then
if test "$python_prefix" != "$python_execprefix"; then
AC_MSG_RESULT([$python_prefix/lib/python${python_version} and $python_execprefix/lib/python${python_version}])
AC_MSG_RESULT([$python_prefix/lib/python${python_version} and $python_execprefix/lib/python${python_version}])
...
@@ -54,24 +52,11 @@ fi
...
@@ -54,24 +52,11 @@ fi
# PGAC_CHECK_PYTHON_EMBED_SETUP
# PGAC_CHECK_PYTHON_EMBED_SETUP
# -----------------------------
# -----------------------------
# Courtesy of the INN 2.3.1 package...
AC_DEFUN([PGAC_CHECK_PYTHON_EMBED_SETUP],
AC_DEFUN([PGAC_CHECK_PYTHON_EMBED_SETUP],
[AC_REQUIRE([_PGAC_CHECK_PYTHON_DIRS])
[AC_REQUIRE([_PGAC_CHECK_PYTHON_DIRS])
AC_MSG_CHECKING([how to link an embedded Python application])
AC_MSG_CHECKING([how to link an embedded Python application])
if test ! -f "$python_configdir/Makefile"; then
python_libspec=`${PYTHON} -c "import distutils.sysconfig,string;print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','LOCALMODLIBS','BASEMODLIBS')))"`
AC_MSG_RESULT(no)
AC_MSG_ERROR([Python Makefile not found])
fi
_python_libs=`grep '^LIBS=' $python_configdir/Makefile | sed 's/^.*=//'`
_python_libc=`grep '^LIBC=' $python_configdir/Makefile | sed 's/^.*=//'`
_python_libm=`grep '^LIBM=' $python_configdir/Makefile | sed 's/^.*=//'`
_python_liblocalmod=`grep '^LOCALMODLIBS=' $python_configdir/Makefile | sed 's/^.*=//'`
_python_libbasemod=`grep '^BASEMODLIBS=' $python_configdir/Makefile | sed 's/^.*=//'`
pgac_tab=" " # tab character
python_libspec=`echo X"-L$python_configdir $_python_libs $_python_libc $_python_libm -lpython$python_version $_python_liblocalmod $_python_libbasemod" | sed -e 's/^X//' -e "s/[[ $pgac_tab]][[ $pgac_tab]]*/ /g"`
AC_MSG_RESULT([${python_libspec}])
AC_MSG_RESULT([${python_libspec}])
...
...
This diff is collapsed.
Click to expand it.
configure
+
3
−
20
View file @
54313932
...
@@ -4241,10 +4241,7 @@ python_version=`${PYTHON} -c "import sys; print sys.version[:3]"`
...
@@ -4241,10 +4241,7 @@ python_version=`${PYTHON} -c "import sys; print sys.version[:3]"`
python_prefix=`${PYTHON} -c "import sys; print sys.prefix"`
python_prefix=`${PYTHON} -c "import sys; print sys.prefix"`
python_execprefix=`${PYTHON} -c "import sys; print sys.exec_prefix"`
python_execprefix=`${PYTHON} -c "import sys; print sys.exec_prefix"`
python_configdir=`${PYTHON} -c "from distutils.sysconfig import get_python_lib as f; import os; print os.path.join(f(plat_specific=1,standard_lib=1),'config')"`
python_configdir=`${PYTHON} -c "from distutils.sysconfig import get_python_lib as f; import os; print os.path.join(f(plat_specific=1,standard_lib=1),'config')"`
python_includespec="-I${python_prefix}/include/python${python_version}"
python_includespec=`${PYTHON} -c "import distutils.sysconfig; print '-I'+distutils.sysconfig.get_python_inc()"`
if test "$python_prefix" != "$python_execprefix"; then
python_includespec="-I${python_execprefix}/include/python${python_version} $python_includespec"
fi
# This should be enough of a message.
# This should be enough of a message.
if test "$python_prefix" != "$python_execprefix"; then
if test "$python_prefix" != "$python_execprefix"; then
...
@@ -4259,22 +4256,7 @@ fi
...
@@ -4259,22 +4256,7 @@ fi
echo "$as_me:$LINENO: checking how to link an embedded Python application" >&5
echo "$as_me:$LINENO: checking how to link an embedded Python application" >&5
echo $ECHO_N "checking how to link an embedded Python application... $ECHO_C" >&6
echo $ECHO_N "checking how to link an embedded Python application... $ECHO_C" >&6
if test ! -f "$python_configdir/Makefile"; then
python_libspec=`${PYTHON} -c "import distutils.sysconfig,string;print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','LOCALMODLIBS','BASEMODLIBS')))"`
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
{ { echo "$as_me:$LINENO: error: Python Makefile not found" >&5
echo "$as_me: error: Python Makefile not found" >&2;}
{ (exit 1); exit 1; }; }
fi
_python_libs=`grep '^LIBS=' $python_configdir/Makefile | sed 's/^.*=//'`
_python_libc=`grep '^LIBC=' $python_configdir/Makefile | sed 's/^.*=//'`
_python_libm=`grep '^LIBM=' $python_configdir/Makefile | sed 's/^.*=//'`
_python_liblocalmod=`grep '^LOCALMODLIBS=' $python_configdir/Makefile | sed 's/^.*=//'`
_python_libbasemod=`grep '^BASEMODLIBS=' $python_configdir/Makefile | sed 's/^.*=//'`
pgac_tab=" " # tab character
python_libspec=`echo X"-L$python_configdir $_python_libs $_python_libc $_python_libm -lpython$python_version $_python_liblocalmod $_python_libbasemod" | sed -e 's/^X//' -e "s/[ $pgac_tab][ $pgac_tab]*/ /g"`
echo "$as_me:$LINENO: result: ${python_libspec}" >&5
echo "$as_me:$LINENO: result: ${python_libspec}" >&5
echo "${ECHO_T}${python_libspec}" >&6
echo "${ECHO_T}${python_libspec}" >&6
...
@@ -18778,6 +18760,7 @@ s,@python_prefix@,$python_prefix,;t t
...
@@ -18778,6 +18760,7 @@ s,@python_prefix@,$python_prefix,;t t
s,@python_execprefix@,$python_execprefix,;t t
s,@python_execprefix@,$python_execprefix,;t t
s,@python_configdir@,$python_configdir,;t t
s,@python_configdir@,$python_configdir,;t t
s,@python_includespec@,$python_includespec,;t t
s,@python_includespec@,$python_includespec,;t t
s,@python_version@,$python_version,;t t
s,@python_libspec@,$python_libspec,;t t
s,@python_libspec@,$python_libspec,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
s,@HAVE_IPV6@,$HAVE_IPV6,;t t
s,@HAVE_IPV6@,$HAVE_IPV6,;t t
...
...
This diff is collapsed.
Click to expand it.
src/Makefile.global.in
+
2
−
1
View file @
54313932
# -*-makefile-*-
# -*-makefile-*-
# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.19
7
2004/10/0
5 1
9:
3
0:1
9
momjian Exp $
# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.19
8
2004/10/0
6 0
9:
2
0:
4
1 momjian Exp $
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# All PostgreSQL makefiles include this file and use the variables it sets,
# All PostgreSQL makefiles include this file and use the variables it sets,
...
@@ -137,6 +137,7 @@ enable_thread_safety = @enable_thread_safety@
...
@@ -137,6 +137,7 @@ enable_thread_safety = @enable_thread_safety@
python_includespec
=
@python_includespec@
python_includespec
=
@python_includespec@
python_libspec
=
@python_libspec@
python_libspec
=
@python_libspec@
python_configdir
=
@python_configdir@
python_configdir
=
@python_configdir@
python_version
=
@python_version@
krb_srvtab
=
@krb_srvtab@
krb_srvtab
=
@krb_srvtab@
...
...
This diff is collapsed.
Click to expand it.
src/pl/plpython/Makefile
+
25
−
1
View file @
54313932
# $PostgreSQL: pgsql/src/pl/plpython/Makefile,v 1.1
4
2004/
09/24 20:08:42 tgl
Exp $
# $PostgreSQL: pgsql/src/pl/plpython/Makefile,v 1.1
5
2004/
10/06 09:20:41 momjian
Exp $
subdir
=
src/pl/plpython
subdir
=
src/pl/plpython
top_builddir
=
../../..
top_builddir
=
../../..
...
@@ -12,6 +12,12 @@ ifneq (,$(wildcard $(python_configdir)/libpython*$(DLSUFFIX)*))
...
@@ -12,6 +12,12 @@ ifneq (,$(wildcard $(python_configdir)/libpython*$(DLSUFFIX)*))
shared_libpython
=
yes
shared_libpython
=
yes
endif
endif
# Convert backslashed paths to normal slashes
ifeq
($(PORTNAME), win32)
shared_libpython
=
yes
python_includespec
:=
$(
subst
\,
/,
$(
python_includespec
))
endif
# Darwin (OS X) has its own ideas about how to do this.
# Darwin (OS X) has its own ideas about how to do this.
ifeq
($(PORTNAME), darwin)
ifeq
($(PORTNAME), darwin)
shared_libpython
=
yes
shared_libpython
=
yes
...
@@ -30,6 +36,21 @@ SO_MAJOR_VERSION = 0
...
@@ -30,6 +36,21 @@ SO_MAJOR_VERSION = 0
SO_MINOR_VERSION
=
0
SO_MINOR_VERSION
=
0
OBJS
=
plpython.o
OBJS
=
plpython.o
# Python on win32 ships with import libraries only for Microsoft Visual C++,
# which are not compatible with mingw gcc. Therefore we need to build a
# new import library to link with.
ifeq
($(PORTNAME), win32)
pytverstr
=
$(
subst .,,
${
python_version
})
OBJS
+=
libpython
${
pytverstr
}
.a
libpython${pytverstr}.a
:
python${pytverstr}.def
dlltool
--dllname
python
${
pytverstr
}
.dll
--def
python
${
pytverstr
}
.def
--output-lib
libpython
${
pytverstr
}
.a
WD
=
$(
subst
\,
/,
$(
WINDIR
))
python${pytverstr}.def
:
$(WD)/system32/python${pytverstr}.dll
pexports
$(
WD
)
/system32/python
${
pytverstr
}
.dll
>
python
${
pytverstr
}
.def
endif
SHLIB_LINK
=
$(
BE_DLLLIBS
)
$(
python_libspec
)
SHLIB_LINK
=
$(
BE_DLLLIBS
)
$(
python_libspec
)
include
$(top_srcdir)/src/Makefile.shlib
include
$(top_srcdir)/src/Makefile.shlib
...
@@ -55,6 +76,9 @@ uninstall:
...
@@ -55,6 +76,9 @@ uninstall:
clean distclean maintainer-clean
:
clean-lib
clean distclean maintainer-clean
:
clean-lib
rm
-f
$(
OBJS
)
rm
-f
$(
OBJS
)
@
rm
-f
error.diff feature.diff error.output feature.output test.log
@
rm
-f
error.diff feature.diff error.output feature.output test.log
ifeq
($(PORTNAME), win32)
rm
-f
python
${
pytverstr
}
.def
endif
installcheck
:
installcheck
:
PATH
=
$(
bindir
)
:
$$
PATH
$(
SHELL
)
$(
srcdir
)
/test.sh
PATH
=
$(
bindir
)
:
$$
PATH
$(
SHELL
)
$(
srcdir
)
/test.sh
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment