Menu

Use owlcpp in Python project

Help
cprecup
2015-04-28
2015-04-30
  • cprecup

    cprecup - 2015-04-28

    Hello there,

    I am trying to generate the Python bindings for OWLCPP, as well as, run the Python examples located in binding/python/test.

    I have used the command

        b2 --release owlcpp-py
    

    for generating the python bindings. It seems that are 16 failed updated targets and 10 skipped targets, 277 having been updated. Here is the output for this: http://pastebin.com/KPFfmF7S


    The user-config.jam file states the paths and version of the dependencies:

    # File user-config.jam
    # Describes build tools and libraries on your system.  
    #
    # 1. Copy this file, "doc/user-config.jam", to your HOME folder.
    #     On MS Windows, HOME folder is usually
    #    "C:\Documents and Settings\your_user_name".
    #
    # 2. Uncomment lines for the compilers and other tools that you are going to use.
    #
    # 3. For each library, make sure it is available on the system, 
    #    uncomment "constant" statement, and specify its full path and version.
    #    
    # IMPORTANT: Use forward slashes '/'.
    # IMPORTANT: Put spaces around colons and before semicolons.
    #
    # See also:
    # http://www.boost.org/boost-build2/doc/html/bbv2/overview/configuration.html
    # http://www.boost.org/boost-build2/doc/html/bbv2/reference/tools.html
    
    ################################################################################
    ## Compilers and other tools
    
    ## Microsoft Visual C++
    # using msvc ;
    
    ## GCC (under Linux of MS Windows MinGW)
     using gcc ;
    
    ## http://llvm.org/
    # using clang ;
    
    ## Mac OS X
    # using darwin ;
    
    ## Python (for generating python bindings)
    ## For more details see 
    ## http://www.boost.org/doc/libs/release/libs/python/doc/building.html
    ## Alternatives:
    # using python ;
    using python : 2.7 : /usr/bin/python2.7 ;
    # using python : 3.4 : /usr/bin/python3.4 ;
    # using python : 2.7 : "C:/Program Files/Python" ;
    
    ## Doxygen (generating documentation from source code, optional)
    ## http://www.stack.nl/~dimitri/doxygen/
    ## Specifying Doxygen location may be required. For example
    ## using doxygen : "c:/Program Files/doxygen/bin/doxygen.exe" ;
    # using doxygen ;
    
    ## Path for GIT client executable (optional)
    ## http://git-scm.com/
    # path-constant GIT_PATH : "c:/Program Files (x86)/Git/bin/git.exe" ;
    
    ################################################################################
    ## Libraries
    ## Uncomment "constant" statements and provide correct paths and versions. 
    
    local utils = "/home/username" ;
    
    ## Boost library source
    ## http://www.boost.org/
     constant BOOST : "$(utils)/boost_1_58_0/" 1.58.0 ;
    
    ## libxml2 library source
    ## http://xmlsoft.org/
     constant LIBXML2 : "$(utils)/libxml2-2.9.2" 2.9.2 ;
    
    ## pre-built iconv library (required under MS Windows)
    ## http://www.zlatkovic.com/libxml.en.html
    # constant ICONV : "$(utils)/cpp/iconv-1.9.2.win32" 1.9.2 ;
    
    ## Raptor library source
    ## http://librdf.org/raptor/
     constant RAPTOR : "$(utils)/raptor2-2.0.15" 2.0.8 ;
    
    ## FaCT++ library source
    ## http://code.google.com/p/factplusplus/
     constant FACTPP : "$(utils)/FaCT++-linux-v1.6.3" 1.6.3 ;
    
    ## owlcpp library source
    ## http://sourceforge.net/projects/owl-cpp/
    ## (optionally) uncomment this to use owlcpp library in your projects
     constant OWLCPP : "$(utils)/project/libs/owlcpp/owlcpp-v0.3.4" 0.3.4 ;
    

    I'd like to know whether the set of unsolved targets is complete for generating the python bindings (as perhaps mentioned in this thread: https://sourceforge.net/p/owl-cpp/discussion/1784117/thread/7caa814f/). If so, where exactly should the owlcpp python module be located?

    I have tried running the test scripts, e.g. binding/python/test/test_logic_1.py but the following error pops up:

    File "binding/python/test/test_logic_1.py", line 11, in <module>
        from owlcpp import *
    ImportError: No module named owlcpp
    

    Remark for library dependencies: RAPTOR version used is 2.0.15 but the script for external dependencies considers it as being older than 2.0.8. Therefore, a hack has been made to circumvent this abnormality. Please see external/ext/raptor.jam, line #41.

    Thank you!

     

    Last edit: cprecup 2015-04-28
  • M Levin

    M Levin - 2015-04-30

    Hello,

    Please try HEAD of the repo and Raptor v2.0.14. Please also use the source release of FaCT++ (FaCT++-src-v1.6.3).

    I have not used Raptor v2.0.15 yet. Indeed, owlcpp v0.3.4 is confused about Raptor versions.

    Best

    Mikhail

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.