Re: Rebuild of Boost dependees

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

 



On Wed, Jul 31, 2013 at 2:18 PM, Jerry James <loganjerry@xxxxxxxxx> wrote:
Neither my python-fu nor my scons-fu is great enough for me to figure out how to work around this problem.  Can any python masters on this list see a way to work around the bug?

Well, I "fixed" it by applying the following patch.  Close your eyes now, lest they explode:

--- SConstruct.orig    2013-01-29 15:37:01.000000000 -0700
+++ SConstruct    2013-08-01 15:20:08.695760012 -0600
@@ -561,16 +561,14 @@
     """Creates soname."""
 
     target = str(env.subst(target))
-    import re
-    soPattern = re.compile('(.*)\.[0-9]*\.[^.]*$', re.I|re.S)
-    soname = soPattern.findall(path.basename(target))
-
+    from subprocess import check_output
+    basename = path.basename(target)
+    if len(basename) == 0:
+      return ''
+    soname = check_output('sed \'s/\.[0-9]*\.[0-9]*$//\' <<< ' + basename, shell=True).rstrip()
     if len(soname) > 0:
-        return prefix + soname[0] + suffix  
+        return prefix + soname + suffix
     else:
-        if env['PLATFORM']=="darwin":
-            return prefix + path.basename(target) + suffix
-
         return ''
    
 
@@ -1103,16 +1101,14 @@
 def SymlinkReadableLibname(files):
     """ Generate symbolik link with more readable library name."""
    
+    from subprocess import check_output
     suffix = env.subst('$SHLIBVERSIONSUFFIX')
     simplesuffix = env.subst('$SHLIBSUFFIX')
     result = []
-    import re
-    soPattern = re.compile('(.*)\.[0-9]*\.[0-9]*$', re.I|re.S)
-    sonameversion = soPattern.findall(path.basename(env.subst('$LIBRARY_VERSION')))[0]
    
     for fname in files:
         fname = str(fname)
-        soname = soPattern.sub(r'\1', fname)
+        soname = check_output('sed \'s/\.[0-9]*\.[0-9]*$//\' <<< ' + fname, shell=True).rstrip()
         versionname = fname.replace('.' + env.subst('$LIBRARY_VERSION'), '')
         simple = fname.replace(suffix, simplesuffix)
 
But it would be much, much better if the python regular _expression_ engine were fixed.  Are any of the python maintainers seriously looking at the upstream patch?  If not, could you please?
-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux