Skip to content

Commit f032f63

Browse files
committed
Temporarily add some information about python include paths to configure.
We're still (see e0e567a, e0e567a) working on replacing use of the deprecated distutils. This commit just makes configure print out the results of different ways of determining the include path. Hopefully this will help us to find a way to transition away from distutils without turning the buildfarm red for prolonged amounts of time. Discussion: https://postgr.es/m/[email protected]
1 parent 9c86d93 commit f032f63

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

config/python.m4

+21
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,27 @@ if test "$PORTNAME" = win32 ; then
6868
fi
6969
AC_MSG_RESULT([$python_includespec])
7070
71+
python_ways=`${PYTHON} -c "
72+
import distutils.sysconfig as ds
73+
import os
74+
import sysconfig as s
75+
print('ds.get_python_inc(False): %s' % ds.get_python_inc(False))
76+
print('s path include: %s' % s.get_path('include'))
77+
print('ds.get_python_inc(True): %s' % ds.get_python_inc(True))
78+
print('s path platinclude: %s' % s.get_path('platinclude'))
79+
print('ds var INCLUDEPY: %s' % ds.get_config_var('INCLUDEPY'))
80+
print('s var INCLUDEPY: %s' % s.get_config_var('INCLUDEPY'))
81+
print('ds var CONFINCLUDEPY: %s' % ds.get_config_var('CONFINCLUDEPY'))
82+
print('s var CONFINCLUDEPY: %s' % s.get_config_var('CONFINCLUDEPY'))
83+
print('')
84+
print('ds get_python_inc(False)/Python.h exists: %s' % os.path.exists(os.path.join(ds.get_python_inc(False), 'Python.h')))
85+
print('ds get_python_inc(True)/Python.h exists: %s' % os.path.exists(os.path.join(ds.get_python_inc(True), 'Python.h')))
86+
print('s var INCLUDEPY/Python.h exists: %s' % os.path.exists(os.path.join(ds.get_config_var('INCLUDEPY'), 'Python.h')))
87+
print('s var CONFINCLUDEPY/Python.h exists: %s' % os.path.exists(os.path.join(ds.get_config_var('CONFINCLUDEPY'), 'Python.h')))
88+
"` 2>/dev/null
89+
AC_MSG_NOTICE([python include paths, different approaches:
90+
$python_ways])
91+
7192
AC_SUBST(python_majorversion)[]dnl
7293
AC_SUBST(python_version)[]dnl
7394
AC_SUBST(python_includespec)[]dnl

configure

+23
Original file line numberDiff line numberDiff line change
@@ -10383,6 +10383,29 @@ fi
1038310383
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
1038410384
$as_echo "$python_includespec" >&6; }
1038510385

10386+
python_ways=`${PYTHON} -c "
10387+
import distutils.sysconfig as ds
10388+
import os
10389+
import sysconfig as s
10390+
print('ds.get_python_inc(False): %s' % ds.get_python_inc(False))
10391+
print('s path include: %s' % s.get_path('include'))
10392+
print('ds.get_python_inc(True): %s' % ds.get_python_inc(True))
10393+
print('s path platinclude: %s' % s.get_path('platinclude'))
10394+
print('ds var INCLUDEPY: %s' % ds.get_config_var('INCLUDEPY'))
10395+
print('s var INCLUDEPY: %s' % s.get_config_var('INCLUDEPY'))
10396+
print('ds var CONFINCLUDEPY: %s' % ds.get_config_var('CONFINCLUDEPY'))
10397+
print('s var CONFINCLUDEPY: %s' % s.get_config_var('CONFINCLUDEPY'))
10398+
print('')
10399+
print('ds get_python_inc(False)/Python.h exists: %s' % os.path.exists(os.path.join(ds.get_python_inc(False), 'Python.h')))
10400+
print('ds get_python_inc(True)/Python.h exists: %s' % os.path.exists(os.path.join(ds.get_python_inc(True), 'Python.h')))
10401+
print('s var INCLUDEPY/Python.h exists: %s' % os.path.exists(os.path.join(ds.get_config_var('INCLUDEPY'), 'Python.h')))
10402+
print('s var CONFINCLUDEPY/Python.h exists: %s' % os.path.exists(os.path.join(ds.get_config_var('CONFINCLUDEPY'), 'Python.h')))
10403+
"` 2>/dev/null
10404+
{ $as_echo "$as_me:${as_lineno-$LINENO}: python include paths, different approaches:
10405+
$python_ways" >&5
10406+
$as_echo "$as_me: python include paths, different approaches:
10407+
$python_ways" >&6;}
10408+
1038610409

1038710410

1038810411
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5

0 commit comments

Comments
 (0)