-
Notifications
You must be signed in to change notification settings - Fork 65
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
problems with config file #170
Comments
@mikereape Could you please elaborate on Also, to double check: is Also, does include files that you feed into Binder have any Qt directives aimed for QMake? It is important that input files are proper C++ files. Thanks, |
Hi Sergey Sorry about the noise in my post. Where it said "binder always complains when ri4w5 it encounters q file that I want excluded" it should simply have said "binder always complains when it encounters a file that I want excluded". What I mean/meant by that is that I get an error like ths:
and then binder exits immediately without processing anything else. (QEvent is in fact a Qt5 class.) As I said in my initial post all the stuff I don't want binder to generate bindings for are Qt5 classes that are already wrapped by (having bindings provided by) PyQt5. So just to be double-sure I've included -class directives of the form:
and changed the
with the exact same results but shouldn't the I had no difficulties building binder but whenever I have tried to use the I didn't write the code I'm trying to generate bindings for. Someonen else did. I'm just trying to turn it into a full-fledge Python package since it's almost entirely just Python, Qt, PyQt5 and C++ (with a small amount of JS). There are no explcit namespace declarations using the To answer your question about qmake: no, all the C++ files I'm talking about are genuine C++ files. The codebase has a very clean division between the Qt5 and the C++ (and Python) code. There really isn't anything tricky going on at all. It's all very straightforward. I have to confess that, relatively speaking, I'm a C++ newbie wannabe and much more a longtime C hacker (among many other things) so apologies in advance if my lack of C++ knowledge is letting me down. OTOH, I have, in fact, studied C++ and its relationship to C extensively. I also have to say that I think that what you've done with binder is fantastic and amazing and I'm pretty clued up on the Rosetta Project and PyRosetta. (You wrapped 3M+ lines of code? That's almost supernatural!) I really need to get this working ... I hope I've answered all your questions. If not, please do just poke me some more. Thanks very much in advance |
Hi sorry I forgot to mention something since it's been awhile since I built binder. If I use your
otherwise it builds fine. However, if that could impact on what I wrote about previously could you please advise me on how to specify the location of that file to the build script, and if you know, where Thanks very much in advance |
-- this is expected behavior: in a way Binder is acting similar to C++ compiler so input files should be valid C++ files and all includes should be findable. Solution for this would be to add path to Qt headers when running Binder using
Hm... this could be a bit tricky. I am not sure if Python bindings created for PyQt5 will be compatible with what Pybind11 expect: do you by any chance know what framework was used to generate them? Assuming that they are compatible then approach here would be not to exclude Qt classes (this will just disable bindings generation for all classes/functions that uses Qt types) but instead somehow generate "empty bindings". The later directly is not supported but i think could be emulated by creating "empty binder" template function and then use Binder config directive "+binder" (see here https://cppbinder.readthedocs.io/en/latest/config.html#config-file-options) to "bind" all Qt classes that needed. This might require a bit of bolier plate (after all one will need to list a lot(?) Qt classes in config) so i would recommend to first double check that this approach will indeed work on some very minimal example. re errors in build-and-run-tests.py - this ok, error that you posted is just result of python headers was not founds, i would recommend to just ignore this and run without testing. Hope this helps, |
Hi Sergey I take your points very much in mind and will check out what you suggest. As it happens I was just in the process of putting together a "minimal" example using one of the subdirectories in the src dir. Thanks very much indeed for your reply and your enduring patience with me. We've all gotta start somewhere, right? When I have something to report I'll report back. It may be a few days. It doesn't mean I've gone away. Thanks very much, Mike |
Hi I'm back (finally!) I can't find it now but somewhere along the way I'm sure you asked me if the codebase uses QML and I said no as I thought you had said that could be another complicating factor (or maybe I read it somewhere else in something else you wrote). Anyway, I was wrong. The codebase does in fact use QML. Any comment? On a tangential question, and I don't expect you to know the answer cause I suspect you're mostly a Fedora person, Can you think of any reason, given whatever knowledge you have of Debian and the deb package tools, why I wouldn't be able to do the equivalent of "debian install" as part of creating a Debian package. Reason is I pretty much build everything in Docker and then package it as a Debian package and then use dpkg to install it locally on my dev machine if in fact I want it running locally on my dev machine as opposed to running in docker. Of course, with Debian based docker images, it's very convenient to just install the deb package as well. Thanks very much in advance. Best, Mike |
@mikereape re QML: best way around it would probably be to feed Binder source files after QML pre-processor was worked on then (i am assuming that there is point where Qt build tools convert QML sources into C++). re Debian package: not sure if i fully understand your question but if you meant if it is possible to create Binder package on Debian then i do not see why not, - should work as far as a know... |
Hi Sergey I'm sure I'm just overlooking somethnig obvious.
I (think) I'm haing problems gettnig binder to take the config file into account. The over all structure is very simple. I have a lot of entries that have this general pattern:
and this general pattern:
That is it's all Qt5 stuff that's wrappeed already by PyQ5 so I just want them excluded from Binder's consideration. However no matter what I do (it seems like) the config file seems to not be recognised and binder always compllains when ri4w5 it encounters q file that I want excluded.
My list of all the headers fille is just a long list of includes of this form:
I invoke binder with a command like this:
I'd be extremely gratefull for any suggestions_.
Thanks in advance
Mike
The text was updated successfully, but these errors were encountered: