[svn:parrot] r48955 - in trunk/runtime/parrot/library: . Archive

fperrad at svn.parrot.org fperrad at svn.parrot.org
Sun Sep 12 13:27:18 UTC 2010


Author: fperrad
Date: Sun Sep 12 13:27:17 2010
New Revision: 48955
URL: https://trac.parrot.org/parrot/changeset/48955

Log:
[distutils] fix TT#1784

Modified:
   trunk/runtime/parrot/library/Archive/Zip.pir
   trunk/runtime/parrot/library/distutils.pir

Modified: trunk/runtime/parrot/library/Archive/Zip.pir
==============================================================================
--- trunk/runtime/parrot/library/Archive/Zip.pir	Sun Sep 12 12:21:27 2010	(r48954)
+++ trunk/runtime/parrot/library/Archive/Zip.pir	Sun Sep 12 13:27:17 2010	(r48955)
@@ -15,6 +15,7 @@
 
 .loadlib 'sys_ops'
 .loadlib 'io_ops'
+.include 'iglobals.pasm'
 .include 'stat.pasm'
 .include 'tm.pasm'
 
@@ -25,6 +26,12 @@
 .namespace ['Archive';'Zip';'Base']
 
 .sub '' :init :load :anon
+    $P0 = getinterp
+    $P1 = $P0[.IGLOBALS_CONFIG_HASH]
+    $I0 = $P1['has_zlib']
+    if $I0 goto L1
+    die "Need a parrot built with zlib"
+  L1:
     $P0 = loadlib 'gziphandle'
     $P0 = newclass ['Archive';'Zip';'Base']
     .globalconst int AZ_OK = 0

Modified: trunk/runtime/parrot/library/distutils.pir
==============================================================================
--- trunk/runtime/parrot/library/distutils.pir	Sun Sep 12 12:21:27 2010	(r48954)
+++ trunk/runtime/parrot/library/distutils.pir	Sun Sep 12 13:27:17 2010	(r48955)
@@ -320,6 +320,15 @@
     .const 'Sub' _clean_wininst = '_clean_wininst'
     register_step_after('clean', _clean_wininst)
   L1:
+  
+    $I0 = $P0['has_zlib']
+    if $I0 goto L2
+    .const 'Sub' _no_zlib = '_no_zlib'
+    register_step('smoke', _no_zlib)
+    register_step('sdist_gztar', _no_zlib)
+    register_step('sdist_zip', _no_zlib)
+    register_step('bdist_rpm', _no_zlib)
+  L2:
 .end
 
 =head2 Functions
@@ -4107,6 +4116,12 @@
     unlink($S0, 1 :named('verbose'))
 .end
 
+
+.sub '_no_zlib' :anon
+    .param pmc kv :slurpy :named
+    say "This step needs a parrot built with zlib"
+.end
+
 =head2 Configuration Helpers
 
 =over 4


More information about the parrot-commits mailing list