Esempio n. 1
0
    def test(self):
        if self.settings.os == 'Emscripten':
            self.run('node %s' % os.path.join("bin", "lambda_exe.js 1 2 3"),
                     run_environment=True)

        if tools.cross_building(self.settings):
            return

        self.run(os.path.join("bin", "lambda_exe 1 2 3"), run_environment=True)
        if self.options["boost"].header_only:
            return

        if not self.options["boost"].without_random:
            self.run(os.path.join("bin", "random_exe"), run_environment=True)
        if not self.options["boost"].without_regex:
            self.run(os.path.join("bin", "regex_exe"), run_environment=True)
        if not self.options["boost"].without_test:
            self.run(os.path.join("bin", "test_exe"), run_environment=True)
        if not self.options["boost"].without_coroutine:
            self.run(os.path.join("bin", "coroutine_exe"),
                     run_environment=True)
        if not self.options["boost"].without_chrono:
            self.run(os.path.join("bin", "chrono_exe"), run_environment=True)
        if self.with_complex():
            self.run(os.path.join("bin", "complex_exe"), run_environment=True)
        if not self.options["boost"].without_python:
            os.chdir("bin")
            sys.path.append(".")
            import hello_ext
            hello_ext.greet()
Esempio n. 2
0
 def test(self):
     self.run('ctest --output-on-error')
     if self.options["Boost"].python:
         os.chdir("bin")
         sys.path.append(".")
         import hello_ext
         hello_ext.greet()
Esempio n. 3
0
 def test(self):
     data_file = os.path.join(self.conanfile_directory, "data.txt")
     self.run("cd bin && .%slambda < %s" % (os.sep, data_file))
     if not self.options["Boost"].header_only:
         self.run("cd bin && .%sregex_exe < %s" % (os.sep, data_file))
         if self.options["Boost"].python:
             os.chdir("bin")
             sys.path.append(".")
             import hello_ext
             hello_ext.greet()
Esempio n. 4
0
 def test(self):
     if tools.cross_building(self.settings):
         return
     bt = self.settings.build_type
     self.run('ctest --output-on-error -C %s' % bt, run_environment=True)
     if not self.options["boost"].without_python:
         os.chdir("bin")
         sys.path.append(".")
         import hello_ext
         hello_ext.greet()
Esempio n. 5
0
 def test(self):        
     data_file = os.path.join(self.conanfile_directory, "data.txt")
     self.run("cd bin && .%slambda < %s" % (os.sep, data_file))
     if not self.options["Boost"].header_only:
         self.run("cd bin && .%sregex_exe < %s" % (os.sep, data_file))
         if self.options["Boost"].python:
             os.chdir("bin")
             sys.path.append(".")
             import hello_ext
             hello_ext.greet()
Esempio n. 6
0
 def test(self):
     bt = self.settings.build_type
     re = RunEnvironment(self)
     with tools.environment_append(re.vars):
         if platform.system() == "Darwin":
             lpath = os.environ["DYLD_LIBRARY_PATH"]
             self.run('DYLD_LIBRARY_PATH=%s ctest --output-on-error -C %s' % (lpath, bt))
         else:
             self.run('ctest --output-on-error -C %s' % bt)
         if self.options["boost"].python:
             os.chdir("bin")
             sys.path.append(".")
             import hello_ext
             hello_ext.greet()
Esempio n. 7
0
 def test(self):
     if tools.cross_building(self.settings):
         return
     self.run(os.path.join("bin", "lambda_exe"), run_environment=True)
     if self.options["boost"].header_only:
         return
     if not self.options["boost"].without_random:
         self.run(os.path.join("bin", "random_exe"), run_environment=True)
     if not self.options["boost"].without_regex:
         self.run(os.path.join("bin", "regex_exe"), run_environment=True)
     if not self.options["boost"].without_test:
         self.run(os.path.join("bin", "test_exe"), run_environment=True)
     if not self.options["boost"].without_coroutine:
         self.run(os.path.join("bin", "coroutine_exe"), run_environment=True)
     if not self.options["boost"].without_chrono:
         self.run(os.path.join("bin", "chrono_exe"), run_environment=True)
     if not self.options["boost"].without_python:
         sys.path.append("lib")
         import hello_ext
         print(hello_ext.greet())
Esempio n. 8
0
#!/usr/bin/python
# -*- coding: utf-8 -*-

from hello_ext import greet

print(greet())
import hello_ext

print hello_ext.greet()


def pygreet():
    print "py wicked greet\n"


def draw(x):
    return x + 6
Esempio n. 10
0
#!/usr/bin/env python


import hello_ext 

print hello_ext.greet()

result = hello_ext.Result();
fill( result )
print result.a;
print result.b;
        
Esempio n. 11
0
import hello_ext
print(hello_ext.greet())
Esempio n. 12
0
#! /usr/bin/env python
#  Copyright Joel de Guzman 2002-2007. Distributed under the Boost
#  Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt
#  or copy at http://www.boost.org/LICENSE_1_0.txt)
#  Hello World Example from the tutorial

import hello_ext
print(hello_ext.greet())
Esempio n. 13
0
import hello_ext

s = hello_ext.greet()
print(s)

Esempio n. 14
0
import hello_ext
hello_ext.greet()
Esempio n. 15
0
#!/usr/bin/env python

if __name__ == '__main__':
    from hello_ext import greet

    print greet()