[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XEN PATCH v3 3/4] tools: don't use distutils in configure nor Makefile



On Tue, Sep 19, 2023 at 07:30:28AM +0100, Javi Merino wrote:
> From: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
> 
> Python distutils is deprecated and is going to be removed in Python
> 3.12.  distutils.sysconfig is available as the sysconfig module in
> stdlib since Python 2.7 and Python 3.2, so use that directly.
> 
> Update the README to reflect that we now depend on Python 2.7.
> 
> Regenerate configure after the m4/python_devel.m4 change.
> 
> Signed-off-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Javi Merino <javi.merino@xxxxxxxxx>
> ---
>  README                   |  4 ++--
>  m4/python_devel.m4       | 28 +++++++++++-----------
>  tools/configure          | 52 ++++++++++++++++------------------------
>  tools/libs/stat/Makefile |  4 ++--
>  4 files changed, 38 insertions(+), 50 deletions(-)
> 

[...]

> diff --git a/tools/configure b/tools/configure
> index 96218cadc4..ae10f6cecd 100755
> --- a/tools/configure
> +++ b/tools/configure
> @@ -774,7 +774,6 @@ infodir
>  docdir
>  oldincludedir
>  includedir
> -runstatedir
>  localstatedir
>  sharedstatedir
>  sysconfdir
> @@ -905,7 +904,6 @@ datadir='${datarootdir}'
>  sysconfdir='${prefix}/etc'
>  sharedstatedir='${prefix}/com'
>  localstatedir='${prefix}/var'
> -runstatedir='${localstatedir}/run'
>  includedir='${prefix}/include'
>  oldincludedir='/usr/include'
>  docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
> @@ -1158,15 +1156,6 @@ do
>    | -silent | --silent | --silen | --sile | --sil)
>      silent=yes ;;
>  
> -  -runstatedir | --runstatedir | --runstatedi | --runstated \
> -  | --runstate | --runstat | --runsta | --runst | --runs \
> -  | --run | --ru | --r)
> -    ac_prev=runstatedir ;;
> -  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
> -  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
> -  | --run=* | --ru=* | --r=*)
> -    runstatedir=$ac_optarg ;;
> -
>    -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
>      ac_prev=sbindir ;;
>    -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
> @@ -1304,7 +1293,7 @@ fi
>  for ac_var in        exec_prefix prefix bindir sbindir libexecdir 
> datarootdir \
>               datadir sysconfdir sharedstatedir localstatedir includedir \
>               oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
> -             libdir localedir mandir runstatedir
> +             libdir localedir mandir
>  do
>    eval ac_val=\$$ac_var
>    # Remove trailing slashes.
> @@ -1457,7 +1446,6 @@ Fine tuning of the installation directories:
>    --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
>    --sharedstatedir=DIR    modifiable architecture-independent data 
> [PREFIX/com]
>    --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
> -  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
>    --libdir=DIR            object code libraries [EPREFIX/lib]
>    --includedir=DIR        C header files [PREFIX/include]
>    --oldincludedir=DIR     C header files for non-gcc [/usr/include]
> @@ -3397,7 +3385,7 @@ else
>      We can't simply define LARGE_OFF_T to be 9223372036854775807,
>      since some C++ compilers masquerading as C compilers
>      incorrectly reject 9223372036854775807.  */
> -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 
> 31))
> +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
>    int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
>                      && LARGE_OFF_T % 2147483647 == 1)
>                     ? 1 : -1];
> @@ -3443,7 +3431,7 @@ else
>      We can't simply define LARGE_OFF_T to be 9223372036854775807,
>      since some C++ compilers masquerading as C compilers
>      incorrectly reject 9223372036854775807.  */
> -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 
> 31))
> +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
>    int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
>                      && LARGE_OFF_T % 2147483647 == 1)
>                     ? 1 : -1];
> @@ -3467,7 +3455,7 @@ rm -f core conftest.err conftest.$ac_objext 
> conftest.$ac_ext
>      We can't simply define LARGE_OFF_T to be 9223372036854775807,
>      since some C++ compilers masquerading as C compilers
>      incorrectly reject 9223372036854775807.  */
> -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 
> 31))
> +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
>    int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
>                      && LARGE_OFF_T % 2147483647 == 1)
>                     ? 1 : -1];
> @@ -3512,7 +3500,7 @@ else
>      We can't simply define LARGE_OFF_T to be 9223372036854775807,
>      since some C++ compilers masquerading as C compilers
>      incorrectly reject 9223372036854775807.  */
> -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 
> 31))
> +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
>    int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
>                      && LARGE_OFF_T % 2147483647 == 1)
>                     ? 1 : -1];
> @@ -3536,7 +3524,7 @@ rm -f core conftest.err conftest.$ac_objext 
> conftest.$ac_ext
>      We can't simply define LARGE_OFF_T to be 9223372036854775807,
>      since some C++ compilers masquerading as C compilers
>      incorrectly reject 9223372036854775807.  */
> -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 
> 31))
> +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
>    int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
>                      && LARGE_OFF_T % 2147483647 == 1)
>                     ? 1 : -1];

My copy of autoconf 2.69 generated these hunks that are not related to
the changes in this patch.  I have decided to keep the output of
autoconf untouched for the patch, but I'm happy to remove them if
it is unwanted noise.

> @@ -7852,21 +7840,21 @@ fi
>  
>  if test x"$pyconfig" = x"no"; then :
>  
> -        CPPFLAGS="$CFLAGS `$PYTHON -c 'import distutils.sysconfig; \
> -        print("-I" + distutils.sysconfig.get_config_var("INCLUDEPY"))'`"
> -    CPPFLAGS="$CPPFLAGS `$PYTHON -c 'import distutils.sysconfig; \
> -        print(distutils.sysconfig.get_config_var("CFLAGS"))'`"
> -    LDFLAGS="$LDFLAGS `$PYTHON -c 'import distutils.sysconfig; \
> -        print("-L" + distutils.sysconfig.get_python_lib(plat_specific=1,\
> +        CPPFLAGS="$CFLAGS `$PYTHON -c 'import sysconfig; \
> +        print("-I" + sysconfig.get_config_var("INCLUDEPY"))'`"
> +    CPPFLAGS="$CPPFLAGS `$PYTHON -c 'import sysconfig; \
> +        print(sysconfig.get_config_var("CFLAGS"))'`"
> +    LDFLAGS="$LDFLAGS `$PYTHON -c 'import sysconfig; \
> +        print("-L" + sysconfig.get_python_lib(plat_specific=1,\
>          standard_lib=1) + "/config")'`"
> -    LDFLAGS="$LDFLAGS `$PYTHON -c 'import distutils.sysconfig; \
> -        print(distutils.sysconfig.get_config_var("LINKFORSHARED"))'`"
> -    LDFLAGS="$LDFLAGS `$PYTHON -c 'import distutils.sysconfig; \
> -        print(distutils.sysconfig.get_config_var("LDFLAGS"))'`"
> -    LIBS="$LIBS `$PYTHON -c 'import distutils.sysconfig; \
> -        print(distutils.sysconfig.get_config_var("LIBS"))'`"
> -    LIBS="$LIBS `$PYTHON -c 'import distutils.sysconfig; \
> -        print(distutils.sysconfig.get_config_var("SYSLIBS"))'`"
> +    LDFLAGS="$LDFLAGS `$PYTHON -c 'import sysconfig; \
> +        print(sysconfig.get_config_var("LINKFORSHARED"))'`"
> +    LDFLAGS="$LDFLAGS `$PYTHON -c 'import sysconfig; \
> +        print(sysconfig.get_config_var("LDFLAGS"))'`"
> +    LIBS="$LIBS `$PYTHON -c 'import sysconfig; \
> +        print(sysconfig.get_config_var("LIBS"))'`"
> +    LIBS="$LIBS `$PYTHON -c 'import sysconfig; \
> +        print(sysconfig.get_config_var("SYSLIBS"))'`"
>  
>  else
>  

Cheers,
Javi



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.