[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] dynamically link swig runtime on windows (Can I commit this?)

From: Colin Watson <cjwatson_at_flatline.org.uk>
Date: 2003-08-08 02:30:25 CEST

On Thu, Aug 07, 2003 at 04:52:38PM -0400, Russell Yanofsky wrote:
> Russell Yanofsky wrote:
> > Branko ??ibej wrote:
> >> Russell Yanofsky wrote:
> >>> (Generator.get_win_libs): add perl56.lib library for perl
> >>> modules
> >>
> >> Is there a remote possibility that we might detect the version of
> >> Perl, instead of hardcoding support for 5.6? For example, I have
> >> version 5.8 on my box. Running "perl -e 'print $]'" and converting
> >> the output would do just fine.
>
> "perl -e 'print $]'" returns "5.006001" for me. What's the most reliable way
> to derive perl56.lib from that? I'm thinking:
>
> _re_perl_version = re.compile(r'(\d+)\.(\d{3})')
>
> def perl_library(version):
> match = _re_perl_version.match(version)
> return 'perl' + match.group(1) + str(int(match.group(2))) + '.lib'
>
> perl_library('5.006001')

Ugh, printing something in one language with good regexp support and
then going off and doing the regexps in another seems rather odd ...

You could do something like this instead:

  perl -MConfig -e 'print "$Config{revision}$Config{patchlevel}"'

What is it you're actually trying to get here, though? The oldest
version of perl that's compatible with XS modules you're building? If
so, then maybe this would be more appropriate:

  perl -MConfig -e 'print $Config{api_versionstring}'

See Config(3perl) for details.

-- 
Colin Watson                                  [cjwatson@flatline.org.uk]
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Aug 8 02:31:16 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.