[C++-sig] Pyste: feature requests
Nicodemus
nicodemus at globalite.com.br
Sat Jul 5 01:00:57 CEST 2003
Hi Prabhu,
Prabhu Ramachandran wrote:
>Hi,
>
> 1. Something like the C compiler's '-c' option. In this case Pyste
> should simply generate the wrapper code and none of the module
> code i.e. for an invocation like so:
>
> pyste.py --out build --multiple -c file1.pyste
>
> nothing should be added to test.cpp and just a _file.cpp (or
> whatever) should be generated which can be then compiled. Then
> invoking
>
> pyste.py --module=test --out build/ --multiple file1.pyste \
> file2.pyste
>
> should generate test.cpp with the appropriate code. This makes it
> much easier to handle dependencies. Perhaps the option should be
> called '-w' for 'just-wrap'?
>
I don't understand exactly what you are saying. Are you suggesting that
instead of generating:
#include <...>
BOOST_PYTHON_MODULE(module)
{
class_<A>(...);
}
You want to be able to generate just this:
class_<A>(...);
?
How does that help you handle dependencies?
> 2. Instead of generating files for each header, it would be useful if
> one file were generated per pyste file when --multiple were used.
> The trouble with the current approach of --multiple is that
> several files can be generated per pyste file. This causes
> problems with dependencies since one does not (easily) know
> apriori what files will be generated. For example changing -D
> options could change the number of files generated. Perhaps
> instead of changing the behaviour of the --multiple option one one
> could add another option called --one-file (with a better name).
> Alternatively if the argument to --out is a filename (file.cpp)
> that may or may not exist then that file is written, if the
> argument is a directory (which exists) then multiple files can be
> generated in that directory.
>
>
Good idea! When I implemented the --multiple option, I didn't consider
dependencies. I will put in my TODO list, shouldn't be too hard to
implement this.
>I think these options or something along these lines would make life
>easier when wrapping larger libraries.
>
>What do you folks think?
>
Thanks a lot for your suggestions!
Regards,
Nicodemus.
More information about the Cplusplus-sig
mailing list