Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9cffb18

Browse files
committed
Also check for Python platform-specific include directory
Python can be built to have two separate include directories: one forplatform-independent files and one for platform-specific files. Sofar, this has apparently never mattered for a PL/Python build. Butwith the new multi-arch Python packages in Debian and Ubuntu, this isbecoming the standard configuration on these platforms, so we mustcheck these directories separately to be able to build there.Also add a bit of reporting in configure to be able to see better whatis going on with this.
1 parente83bb10 commit9cffb18

File tree

2 files changed

+26
-6
lines changed

2 files changed

+26
-6
lines changed

‎config/python.m4

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,23 @@ AC_MSG_CHECKING([Python configuration directory])
3333
python_majorversion=`${PYTHON} -c "import sys; print(sys.version[[0]])"`
3434
python_version=`${PYTHON} -c "import sys; print(sys.version[[:3]])"`
3535
python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
36-
python_includespec=`${PYTHON} -c "import distutils.sysconfig; print('-I'+distutils.sysconfig.get_python_inc())"`
36+
AC_MSG_RESULT([$python_configdir])
37+
38+
AC_MSG_CHECKING([Python include directories])
39+
python_includespec=`${PYTHON} -c "
40+
import distutils.sysconfig
41+
a = '-I' + distutils.sysconfig.get_python_inc(False)
42+
b = '-I' + distutils.sysconfig.get_python_inc(True)
43+
if a == b:
44+
print(a)
45+
else:
46+
print(a + ' ' + b)"`
47+
AC_MSG_RESULT([$python_includespec])
3748
3849
AC_SUBST(python_majorversion)[]dnl
3950
AC_SUBST(python_version)[]dnl
4051
AC_SUBST(python_configdir)[]dnl
4152
AC_SUBST(python_includespec)[]dnl
42-
# This should be enough of a message.
43-
AC_MSG_RESULT([$python_configdir])
4453
])# _PGAC_CHECK_PYTHON_DIRS
4554

4655

‎configure

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7454,12 +7454,23 @@ $as_echo_n "checking Python configuration directory... " >&6; }
74547454
python_majorversion=`${PYTHON} -c "import sys; print(sys.version[0])"`
74557455
python_version=`${PYTHON} -c "import sys; print(sys.version[:3])"`
74567456
python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
7457-
python_includespec=`${PYTHON} -c "import distutils.sysconfig; print('-I'+distutils.sysconfig.get_python_inc())"`
7458-
7459-
# This should be enough of a message.
74607457
{ $as_echo "$as_me:$LINENO: result: $python_configdir" >&5
74617458
$as_echo "$python_configdir" >&6; }
74627459

7460+
{ $as_echo "$as_me:$LINENO: checking Python include directories" >&5
7461+
$as_echo_n "checking Python include directories... " >&6; }
7462+
python_includespec=`${PYTHON} -c "
7463+
import distutils.sysconfig
7464+
a = '-I' + distutils.sysconfig.get_python_inc(False)
7465+
b = '-I' + distutils.sysconfig.get_python_inc(True)
7466+
if a == b:
7467+
print(a)
7468+
else:
7469+
print(a + ' ' + b)"`
7470+
{ $as_echo "$as_me:$LINENO: result: $python_includespec" >&5
7471+
$as_echo "$python_includespec" >&6; }
7472+
7473+
74637474

74647475
{ $as_echo "$as_me:$LINENO: checking how to link an embedded Python application" >&5
74657476
$as_echo_n "checking how to link an embedded Python application... " >&6; }

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp