Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source code for Python Zorba api? #8

Open
whiterockerart opened this issue Jul 5, 2017 · 10 comments
Open

Source code for Python Zorba api? #8

whiterockerart opened this issue Jul 5, 2017 · 10 comments

Comments

@whiterockerart
Copy link

We are currently working on to get Zorba api working for Python 3.4+ and it seems problematic to import the _zorba_api.pyd file.
Is there any way we can get the source code for that file and make it work for Python 3.4+?

@cezarfx
Copy link
Member

cezarfx commented Jul 5, 2017 via email

@whiterockerart
Copy link
Author

whiterockerart commented Jul 6, 2017

Thank you!

But one question, where is the interface file that is mentioned in the zorba_api.py?

This file was automatically generated by SWIG (http://www.swig.org).

Version 2.0.9

Do not make changes to this file unless you know what you are doing--modify

the SWIG interface file instead.

Also, that file is created for Python 2.7 and not 3.x.

@whiterockerart
Copy link
Author

Also on more question, how do I build the file with Swig? We haven't touched Swig before.

@cezarfx
Copy link
Member

cezarfx commented Jul 6, 2017 via email

@whiterockerart
Copy link
Author

whiterockerart commented Jul 10, 2017

I managed to build it with the following packages:

  • libxml2 2.7.8
  • iconv 1.9.2
  • icu 4c 50.1.2 Win32
  • xerces-c 3.1.4 built for Win32
  • swig 3.0.12
  • python 3.5

And used the command:
cmake ../.. -DPYTHON_EXECUTABLE=$ENV{ProgramFiles(x86)}\Python35-32python.exe -DPYTHON_INCLUDE_DIRS=$ENV{ProgramFiles(x86)}\Python35-32\include -DPYTHON_LIBRARY=$ENV{ProgramFiles(x86)}\Python35-32\lib -DZORBA_USE_SWIG=ON -DZORBA_WITH_DEBUGGER=ON

The problem is that in the swig/python folder, I only get header files and no api file for python.

I'm trying to read the documentation of the Zorba but there are to many broken links and I can't get any further.

And yes, there are som errors with missing headerfiles (will include it in a seperate comment)

@whiterockerart
Copy link
Author

whiterockerart commented Jul 10, 2017

CMakeError.log:
Sorry, the log is to long to include in one comment. It's a .txt file.

https://app.box.com/s/zbgsvbafubk4ib4bre31w5tzt4x7nx9v

@Rod-O
Copy link
Contributor

Rod-O commented Jul 25, 2017

You are working on Windows, were you able to compile Zorba in first instance??
I did a quick lookup on your log file, seems that you are missing iconv.h, that means you don't have libiconv.
Try to install missing libraries first with
https://github.com/zorba-processor/winports

@Rod-O
Copy link
Contributor

Rod-O commented Jul 25, 2017

let me try to get a working version for you...

@whiterockerart
Copy link
Author

Yes, I have a working example of Zorba on my computer.
Yes, I did install an instance of iconv.h but it didn't wan't to find it, but it does find it during the building process - which is quite weird.

I found out that it could be easier to build this on Linux, but we are not using Linux at my workplace.

That would be great, thank you.
I think others would appreciate that as well.

@cezarfx
Copy link
Member

cezarfx commented Jul 26, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants