[gobject-introspection: 1/2] Remove LibtoolImporter




commit bb02dbc7cda7b1631c043f0df911370f48f7e2d6
Author: Christoph Reiter <reiter christoph gmail com>
Date:   Sat Nov 7 08:01:53 2020 +0100

    Remove LibtoolImporter
    
    From what I can see this was used for importing the C ext in an uninstalled
    libtool build of g-i. We no longer use libtool, so this is no longer needed.

 giscanner/libtoolimporter.py | 73 --------------------------------------------
 giscanner/meson.build        |  1 -
 giscanner/sourcescanner.py   | 17 +++++------
 giscanner/utils.py           | 16 +---------
 4 files changed, 9 insertions(+), 98 deletions(-)
---
diff --git a/giscanner/meson.build b/giscanner/meson.build
index a3b06f37b..098b7b6b4 100644
--- a/giscanner/meson.build
+++ b/giscanner/meson.build
@@ -13,7 +13,6 @@ giscanner_files = [
   'girparser.py',
   'girwriter.py',
   'gdumpparser.py',
-  'libtoolimporter.py',
   'maintransformer.py',
   'mdextensions.py',
   'message.py',
diff --git a/giscanner/sourcescanner.py b/giscanner/sourcescanner.py
index e50f40aa2..09f904414 100644
--- a/giscanner/sourcescanner.py
+++ b/giscanner/sourcescanner.py
@@ -21,19 +21,18 @@
 import os
 import tempfile
 
-from .libtoolimporter import LibtoolImporter
 from .message import Position
 from .ccompiler import CCompiler
 from .utils import have_debug_flag, dll_dirs
 
-with LibtoolImporter(None, None):
-    dlldirs = dll_dirs()
-    dlldirs.add_dll_dirs(['gio-2.0'])
-    if 'UNINSTALLED_INTROSPECTION_SRCDIR' in os.environ:
-        from _giscanner import SourceScanner as CSourceScanner
-    else:
-        from giscanner._giscanner import SourceScanner as CSourceScanner
-    dlldirs.cleanup_dll_dirs()
+
+dlldirs = dll_dirs()
+dlldirs.add_dll_dirs(['gio-2.0'])
+if 'UNINSTALLED_INTROSPECTION_SRCDIR' in os.environ:
+    from _giscanner import SourceScanner as CSourceScanner
+else:
+    from giscanner._giscanner import SourceScanner as CSourceScanner
+dlldirs.cleanup_dll_dirs()
 
 HEADER_EXTS = ['.h', '.hpp', '.hxx']
 SOURCE_EXTS = ['.c', '.cpp', '.cc', '.cxx']
diff --git a/giscanner/utils.py b/giscanner/utils.py
index d9938fc7e..3983eb79a 100644
--- a/giscanner/utils.py
+++ b/giscanner/utils.py
@@ -121,24 +121,10 @@ def extract_libtool_shlib(la_file):
         if libdir is None:
             return dlbasename
         return libdir + '/' + dlbasename
-    # From the comments in extract_libtool(), older libtools had
-    # a path rather than the raw dlname
+    # Older libtools had a path rather than the raw dlname
     return os.path.basename(dlname)
 
 
-def extract_libtool(la_file):
-    dlname = _extract_dlname_field(la_file)
-    if dlname is None:
-        raise ValueError("%s has no dlname. Not a shared library?" % la_file)
-    libname = os.path.join(os.path.dirname(la_file),
-                           '.libs', dlname)
-    # FIXME: This hackish, but I'm not sure how to do this
-    #        in a way which is compatible with both libtool 2.2
-    #        and pre-2.2. Johan 2008-10-21
-    libname = libname.replace('.libs/.libs', '.libs').replace('.libs\\.libs', '.libs')
-    return libname
-
-
 # Returns arguments for invoking libtool, if applicable, otherwise None
 def get_libtool_command(options):
     libtool_infection = not options.nolibtool


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