Menu

Make PythonQt generator output predictible

Help
2017-07-21
2017-07-21
  • Alexis Jeandet

    Alexis Jeandet - 2017-07-21

    Hello Florian,

    I would like to continue playing around porting PythonQt to other build systems, the next one is Meson.
    I think that generating wrapper sources on the fly would be nice but from what I understand the generator split its output in chunks like com_trolltech_qt_core[N].cpp.
    What drives this number of files?
    Can we make it predictible or fixed? From what I understand most build systems doesn't support well generators with an unknown output.

    Best regards,
    Alexis.

     
  • Florian Link

    Florian Link - 2017-07-24

    The original generator generated a header and cpp file for each class. This took ages to compile, so I introduced the MAX_CLASSES_PER_FILE define, which is currently set to 30. So for each 30 classes a new file is generated. We could make the number of files to generate a commandline argument of the generator, so you could e.g. pass --files-per-package 10 and it will always generate 10 files (which would in the worst case be empty if there are not enough classes). But this would not allow to set a different file number per package. Maybe a better approach would be to add it to the XML for each package?

     
  • Alexis Jeandet

    Alexis Jeandet - 2017-07-24

    Yeah, ok it makes sense to limit file size even for RAM usage!
    About modifying the generator, I saw on another thread that you may switch to a clang based solution which I think would be nice. So I don't know the cost of this mofication, I should look into the generator's code. In this case setting the file count per module would be nice.

     

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.