subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1504636 - in /subversion/trunk/build/generator: gen_win.py gen_win_dependencies.py
Date Thu, 18 Jul 2013 20:20:46 GMT
Author: rhuijben
Date: Thu Jul 18 20:20:46 2013
New Revision: 1504636

URL: http://svn.apache.org/r1504636
Log:
Following up on r1504625, improve some version checks.

* build/generator/gen_win.py
  (get_win_defines): Convert values to integers before comparing.

* build/generator/gen_win_dependencies.py
  (_find_perl): Obtain more detailed version for diagnostics.
  (_find_python): Use os.path.join() to avoid an error when calling this
    function from the test runner.

Modified:
    subversion/trunk/build/generator/gen_win.py
    subversion/trunk/build/generator/gen_win_dependencies.py

Modified: subversion/trunk/build/generator/gen_win.py
URL: http://svn.apache.org/viewvc/subversion/trunk/build/generator/gen_win.py?rev=1504636&r1=1504635&r2=1504636&view=diff
==============================================================================
--- subversion/trunk/build/generator/gen_win.py (original)
+++ subversion/trunk/build/generator/gen_win.py Thu Jul 18 20:20:46 2013
@@ -717,8 +717,8 @@ class WinGeneratorBase(gen_win_dependenc
     # rather than ruby_errinfo.
     if isinstance(target, gen_base.TargetSWIGLib) and target.lang == 'ruby':
       ver = self._libraries['ruby'].version.split('.')
-
-      if (ver > (1, 8, 0)):
+      ver = tuple(map(int, ver))
+      if ver > (1, 8, 0):
         fakedefines.extend(["HAVE_RB_ERRINFO"])
 
     if self.static_apr:

Modified: subversion/trunk/build/generator/gen_win_dependencies.py
URL: http://svn.apache.org/viewvc/subversion/trunk/build/generator/gen_win_dependencies.py?rev=1504636&r1=1504635&r2=1504636&view=diff
==============================================================================
--- subversion/trunk/build/generator/gen_win_dependencies.py (original)
+++ subversion/trunk/build/generator/gen_win_dependencies.py Thu Jul 18 20:20:46 2013
@@ -693,13 +693,15 @@ class GenDependenciesBase(gen_base.Gener
     "Find the right perl library name to link swig bindings with"
 
     fp = os.popen('perl -MConfig -e ' + escape_shell_arg(
-                  'print "$Config{PERL_REVISION}.$Config{PERL_VERSION}\\n"; '
+                  'print "$Config{PERL_REVISION}.$Config{PERL_VERSION}.'
+                          '$Config{PERL_SUBVERSION}\\n"; '
                   'print "$Config{archlib}\\n"'), 'r')
     try:
       line = fp.readline()
       if line:
         perl_version = line.strip()
-        perl_lib = 'perl%s.lib' % (perl_version.replace('.',''),)
+        perlv = perl_version.split('.')
+        perl_lib = 'perl%s%s.lib' % (perlv[0], perlv[1])
       else:
         return
 
@@ -757,7 +759,7 @@ class GenDependenciesBase(gen_base.Gener
       from distutils import sysconfig
 
       inc_dir = sysconfig.get_python_inc()
-      lib_dir = self.apath(sysconfig.PREFIX, "libs")
+      lib_dir = os.path.join(sysconfig.PREFIX, "libs")
     except ImportError:
       return
 



Mime
View raw message