[PySide] Proposal for "Visual tool to fast edit type system files" -- a Pyside idea

higery shoulderhigher at gmail.com
Thu Mar 29 16:48:13 CEST 2012


Sorry for replying a little late, I have created a newer proposal basing on
all you guys' good idea and suggestions, however there still

are many details to talk over, any other suggestions about the project or
my proposal are very appreciated.


Thank you to everyone!


-------------------------------------------------------------------------------------------------



Proposal -- "Useful tool to help bootstrap of new bindings"





Abstract

-----------------

Shiboken is a front-end plugin for Generator Runner which can generate
bindings for C++ libraries using CPython source code. But because of
complicated language syntax and runtime mechanism of C++, it seems a little
difficult for people who use Shiboken very often to create Python bindings,
and there are already some complains in the Pyside mailing list [?]. So,
it’s very valuable and significant to implement a tool to help bootstrap of
new bindings.



Introduction

------------------

This tool would be a command line tool, and when using it, people could
inform the header files of libraries which they want to bind, after
running, it will generate basic typesystem files for these libraries plus
the CMakeFiles for the project.



To let APIExtractor do what we want, we have to modify APIExtractor,
because it does the hard work of parsing C++ headers, typesystem XML
description files of the binding, and must use these two sets of
information that the binding generator may work with. So, an ideal way
would be to modify APIExtractor to take a given set of headers and from
them produce an intermediate XML description file, which contains the
information needed by our tool to generate final binding typesystem files.



However, in the process of modifying work, we can’t avoid dealing with C++,
thus it may be not practical for us to do part work of modifying
APIExtractor while creating the tool that uses its information at the
sametime. So, in this summer project, preliminary work will be modifying
APIExtractor first, and writing the command tool second.



The following is the concrete weekly plan:



Timeline

------------------

Week 1: Get the clone of Pyside and Study the whole framework of
APIExtractor through reading the source code.

Week 2-Week 8: Modify APIExtractor to do what we want. The detail is:

--Week 2: find the classes through parsing C++ headers

--Week 3: handle namespace-type, interface-type, object-type

--Week 4: extract primitive-type, enum-type,value-type

--Week 5: extract other complex typs like Template

--Week 6: handle C/C++ function and mark them if they need code injection
or argument modification or not

--Week 7: can extract all exportable symbols from the given library

--Week 8: write these information to an intermediate XML file

Week 9-Week 12: Create the command tool to help bootstrap of new bindings
and do test work

--Week 9: write Python script to offer function of generating new binding
typesystem files from the intermediate file created before

--Week 10: write tests against such script

--Week 11: through times testing, check if the previous modifying work on
APIExtractor behaves well or not

--Week 12: help improve our command tool in return

Week 13-Week14: perfect the code and documentations, and begin to submit
patches

--Week 13: perfect the code and documentations

--Week 14: create patches and try to submit them

Week 15….: summarize the whole work and say goodbye to summer



About me

--------------------

I'm an undergraduate from China and I'm preparing for my computer science
and technology bachelor degree in USTB (University of Science and
Technology Beijing). Java and Python is the main programming language when
I write programs and software.



During my coding days, I’m getting to know more and more about the
Open-Source/FOSS, especially its spirits-share, collaborate, make friends.
Every time I find an excellent solution about some problems occurred to me,
I become so excited and learned a lot from the process of problems
finding-reporting-solving.





I joined gsoc2011 last year and took one Python idea as my summer project,
you can take a look at what the project does via python wiki page
http://wiki.python.org/moin/SummerOfCode/2011/SetuptoolsFeatures, and you
also can know more through my blog for gsoc: http://higery.wordpress.com/



Contact Info:

# Name: Xu Dehai(You can call me with my English name-higery)

# Blog: http://higery.wordpress.com/

# IRC: higery on irc.freenode.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20120329/19ccc411/attachment.html>


More information about the PySide mailing list