Use <executable-in-var> to run dependencies if possible
authorThomas Leonard <talex5@gmail.com>
Thu, 14 Feb 2013 20:59:35 +0000 (14 20:59 +0000)
committerThomas Leonard <talex5@gmail.com>
Thu, 14 Feb 2013 20:59:35 +0000 (14 20:59 +0000)
This is needed to support platforms where "python" is Python 3.

The older <environment> bindings are still present to support running with old
versions of 0install.

0release.xml
tests/testrelease.py

index dd7750a..9d3ecc9 100644 (file)
@@ -31,7 +31,8 @@
     </command>
     <requires interface="http://0install.net/2006/interfaces/0publish">
       <version not-before="0.17"/>
-      <environment insert="0publish" mode="replace" name="0PUBLISH"/>
+      <environment insert="0publish" mode="replace" name="0PUBLISH" if-0install-version='..!1.13'/>
+      <executable-in-var name="0PUBLISH"/>
     </requires>
     <requires interface="http://0install.net/2007/interfaces/ZeroInstall.xml">
       <version not-before="1.6"/>
@@ -39,7 +40,8 @@
     </requires>
     <requires interface="http://0install.net/2008/interfaces/0test.xml">
       <version not-before="0.4-post"/>
-      <environment insert="0test" mode="replace" name="0TEST"/>
+      <environment insert="0test" mode="replace" name="0TEST" if-0install-version='..!1.13'/>
+      <executable-in-var name="0TEST"/>
     </requires>
     <implementation id="." version="0.14.1-post"/>
   </group>
index c7127a6..3add727 100755 (executable)
@@ -40,7 +40,7 @@ def call_with_output_suppressed(cmd, stdin, expect_failure = False, **kwargs):
 
 def make_releases_dir(src_feed = '../hello/HelloWorld.xml', auto_upload = False):
        os.chdir('releases')
-       call_with_output_suppressed(['0launch', '-o', release_feed, src_feed], None)
+       call_with_output_suppressed(['0release', src_feed], None)
        assert os.path.isfile('make-release')
 
        lines = file('make-release').readlines()