]> granicus.if.org Git - graphviz/commitdiff
inline config_python.py into configure.ac
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 28 Aug 2021 18:53:34 +0000 (11:53 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 29 Aug 2021 18:22:58 +0000 (11:22 -0700)
This allows removing parts of this script that were unused. configure.ac was
already calling snippets of Python inline, so this is slightly more consistent.
Supersedes !1801.

Makefile.am
config/config_python.py [deleted file]
configure.ac

index c0f736d934ff2082726fca97dc1beb1ec8caef14..c7a931609296d6f2daf375b5c42a934c6468a420 100644 (file)
@@ -39,7 +39,7 @@ EXTRA_DIST = $(txt) $(html) graphviz.spec \
        builddate.h \
        m4/README m4/lib-ld.m4 m4/lib-link.m4 m4/lib-prefix.m4 \
        graphviz.7 Doxyfile.in Doxyfile awk \
-       config/config_perl.pl config/config_python.py \
+       config/config_perl.pl \
        config/config_ruby.rb config/config_tcl.tcl dot.demo  plugin.demo \
        macosx windows debian redhat graphviz.sln
 
diff --git a/config/config_python.py b/config/config_python.py
deleted file mode 100644 (file)
index 1bb394f..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-import sys
-from distutils import sysconfig
-
-if sys.argv[1] == "archlib":
-  print(sysconfig.get_python_lib(1,1))
-elif sys.argv[1] == "lib":
-  print(sysconfig.get_python_lib(0,1))
-elif sys.argv[1] == "archsitelib":
-  print(sysconfig.get_python_lib(1,0))
-elif sys.argv[1] == "sitelib":
-  print(sysconfig.get_python_lib(0,0))
index 5a828bf857862e77679656d7e2d2671c19fdfe5d..5b35c1e29ea806799bcac1f8c7c14fe583586915 100644 (file)
@@ -1195,7 +1195,7 @@ else
         PYTHON_PREFIX=`$PYTHON -c "import sys; print(sys.prefix)"`
         PYTHON_INCLUDES=-I$PYTHON_PREFIX/include/python$PYTHON_VERSION
        PYTHON_LIBS="-undefined dynamic_lookup"
-        PYTHON_INSTALL_DIR="`$PYTHON $srcdir/config/config_python.py archsitelib`"
+        PYTHON_INSTALL_DIR="`$PYTHON -c 'from distutils import sysconfig; print(sysconfig.get_python_lib(1,0))'`"
         save_CPPFLAGS=$CPPFLAGS
         CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
         AC_CHECK_HEADER(Python.h,,[
@@ -1255,7 +1255,7 @@ else
                   use_python3="No (python-$PYTHON3_VERSION.pc not found)"
           fi
         fi
-        PYTHON3_INSTALL_DIR="`$PYTHON3 $srcdir/config/config_python.py archsitelib`"
+        PYTHON3_INSTALL_DIR="`$PYTHON3 -c 'from distutils import sysconfig; print(sysconfig.get_python_lib(1,0))'`"
         save_CPPFLAGS=$CPPFLAGS
         CPPFLAGS="$CPPFLAGS $PYTHON3_INCLUDES"
         AC_CHECK_HEADER(Python.h,,[