Robin Dunn
e2f853d0e0
Put the module docstrings on the module index pages
...
Plus some other changes to start using using the "wx." prefix on names in the docs. (More are still needed but this is a start.
2016-05-19 21:04:14 -07:00
Robin Dunn
f8d638b64e
Update copyrights in sip_generator too
2016-05-07 19:16:27 -07:00
Robin Dunn
c96d31f919
Instead of hacking the generated C++ after the fact,
...
generate the sip code a little differently for the int tricky constants,
and add some tests.
2016-05-07 01:27:28 -07:00
Scott Talbert
aa0be2719e
Fix extraction for #define's when not an integer or string
...
Some #define values fall outside the range of int, so we need to override the
types.
2016-03-01 22:50:19 -05:00
Robin Dunn
30e7d68f76
Allow typedefs to be nested in classes.
2015-03-03 20:53:18 -08:00
Robin Dunn
742d02d53b
Enable handling #define's that are string constants
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73498 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-02-12 05:12:23 +00:00
Robin Dunn
35fd2e16bf
Update copyright year
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73416 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-01-21 02:13:03 +00:00
Robin Dunn
0e6e598099
Support isStatic for PyMethods
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73261 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-23 03:08:03 +00:00
Robin Dunn
ae54ccbb3a
Don't skip writing the overloads when one has MethodCode
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73076 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-30 22:31:05 +00:00
Robin Dunn
31d92bb01f
Enable adding and generating code for a cpp dtor
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@72972 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-17 22:21:19 +00:00
Robin Dunn
dea1c34ef6
Allow specifying the cppSignature for regular methods too.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@72969 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-17 22:20:00 +00:00
Robin Dunn
e8d7197917
Allow cppSignature and pyArgsString for CppMethods too
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@72929 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-09 04:38:43 +00:00
Kevin Ollivier
3670519430
Enable etg code to be used to build extensions other than Phoenix itself.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@72038 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-11 17:42:05 +00:00
Robin Dunn
0fa4a65870
enable setting the new sip %InstanceCode directive
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71996 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-10 05:15:47 +00:00
Robin Dunn
aebd862d14
Provide hints for deprecated items about what should be used instead.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71991 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-10 05:15:17 +00:00
Robin Dunn
b8ca4e1102
Allow setting virtual catcher code for normal methods too
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71902 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 21:01:16 +00:00
Robin Dunn
f697317ebc
Classes without explicit bases still derive from object
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71721 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-12 20:56:15 +00:00
Robin Dunn
cb2f179d20
bug fix
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71696 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-08 05:13:41 +00:00
Robin Dunn
d472962864
Wordwrap the text used for docstrings.
...
Put the signatures for the ctors before the text, just like the other functions, methods.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71694 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-08 05:13:28 +00:00
Robin Dunn
3426d72bc3
Some little tweaks and fixes
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71659 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-06 01:15:14 +00:00
Robin Dunn
2011586fa0
Use codecs.open in textfile_open() for Py2.7 so it can work more like open() in Py3, auto-converting to/from utf-8 and unicode. Use textfile_open in parts of the sphinx command that were having encoding errors and also in writeIfChanged().
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71564 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-25 20:43:48 +00:00
Robin Dunn
b41df0b779
Many, many (many!) changes needed to build and run the Phoenix extension modules with Python 3. Where possible changes were made such that the code works with both Python 2.7 and 3.2 without conditionals. In general the following types of changes were made:
...
* Changed imports to use either absolute or explicit relative imports. Implicit relative imports are no longer allowed.
* Changes to accomodate standard library classes or modues moving to other locations, or being removed entirely.
* Changes related to print becoming a function, execfile being removed, u'' no longer allowed, and other syntax related issues.
* Working around C APIs that have changed or simply vanished. (PyInt, PyString, PyBytes, etc.)
* Dealing with text file objects using strings vs binary file objects using bytes, auto-encoding, and etc.
* Replacing the use of PyCObject with PyCapsule and dealing with an apparent bug where PyCapsule objects can't be imported from submodules within a package.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71554 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-24 23:28:02 +00:00
Robin Dunn
ec06cdb967
indent the GIL macros
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-10 22:39:12 +00:00
Robin Dunn
6742c20040
Release the GIL when calling the function generated for CppMethod objects.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71405 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-10 22:38:57 +00:00
Robin Dunn
15115dca23
* Allow defining the real C++ signature of a method or ctor that we are replacing with a custom method with a different signature. This is important when the original is a ctor or a virtual method, and so there will need to be a matching method/ctor for it in the custom derived class generated by SIP.
...
* Also support defining the code to be used in the "virtual catcher" so we can map between the real signature and our custom signature when reflecting the call to Python code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71403 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-10 22:38:45 +00:00
Robin Dunn
33a6da35ee
Remove wx prefixes for default values in the pyArgsString.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71351 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-03 23:30:48 +00:00
Robin Dunn
7b6a094c4f
Add support for using SIP's NoArgParser annotation
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71281 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-26 01:29:28 +00:00
Robin Dunn
a143905fef
Don't write sip docstrings for functions that are operators
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71041 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-29 16:58:54 +00:00
Robin Dunn
1d54d41e7b
Encode generator output as utf-8 in case there is any non-ascii text
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71022 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-26 19:22:19 +00:00
Robin Dunn
16109cd7bc
Support setting the HoldGIL annotation for when the -g command line flag is used to always release and reacquire by default.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70982 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-23 03:19:51 +00:00
Robin Dunn
32c3701e4e
Allow CppMethodDefs to be static. Replace :: with . in generated pyArgsStrings.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70777 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-02 21:53:15 +00:00
Robin Dunn
1d61826362
* Include inner classes in a ClassDef's allItems
...
* Enable finding an overload based on its constness
* Add FunctionDef.renameOverload
* Write nested enums before inner classes and ctors in the sip generator.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70775 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-02 21:53:00 +00:00
Robin Dunn
5078b242f4
Add support for the NoTypeName annotation
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70725 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-02-27 23:52:30 +00:00
Robin Dunn
a47c664ec3
Prevent from generating some syntax errors in the pi_generator, and other generator tweaks
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70080 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-22 01:20:25 +00:00
Robin Dunn
9912e33123
* Add PyFunctionDef and PyClassDef extractor classes, which can be used for defining pure python functions and classes instead of just including them as blocks of text. This way the meta-data is preserved so it can be used by generators such as the sphinx generator.
...
* Implement wx.CallAfter and wx.CallLater this way for the initial test cases.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70010 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-15 02:36:01 +00:00
Robin Dunn
06a7072ddf
docstring fixes
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69972 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-10 04:36:51 +00:00
Robin Dunn
a236ea1867
* Use all_raise_py_exception=True in the %Module directive.
...
* remove pyRaisesException (May want to add it back later with different meaning...)
* Fix use of const for CppMethods
* Make flattenNode optionally not rstrip the string segments
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69906 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-02 01:10:49 +00:00
Robin Dunn
fd0a62c1c4
check for overloads when it's a CppMethod too
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69779 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-11-17 03:51:02 +00:00
Robin Dunn
8f8c7a3d43
Add the ability to raise a wx.PyAssertionError when a wxASSERT (or other similar debug macros) fail. To do this support for the /RaisesPyException/ annotation is added, but it defaults to turned on for every function or non-ctor method.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69723 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-11-10 02:43:05 +00:00
Robin Dunn
4c3663e283
Add extracting and using of class template info
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69575 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-29 06:04:32 +00:00
Robin Dunn
36e4395f88
* Add CppMethods to overload lists if there is already a matching Method.
...
* Look at all overloads when adding auto properties
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-26 05:21:47 +00:00
Robin Dunn
470c088a85
* Add the pi generator (for "Python Interface" files used by WingIDE and maybe others.)
...
* Some improvements in docstring generation
* refactor and shuffle some code around
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69497 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-21 08:09:26 +00:00
Robin Dunn
7ac7596aaa
Add support for nested classes to the extractors and sip_generator
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69414 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-14 01:28:32 +00:00
Robin Dunn
a87c196def
Instead of passing sipIsErr into custom functions made for CppMethodDefs and etc. just check PyErr_Occurred after the function returns and then set sipIsErr there.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69400 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-13 04:58:46 +00:00
Robin Dunn
d0523eba2d
don't output an extra newline in the docstring for constructors
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69370 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-11 00:39:25 +00:00
Robin Dunn
8e2363a505
tweak the output of the docstrings a little, and also save a copy of it in case it is needed later
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69336 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-09 07:43:29 +00:00
Robin Dunn
60be5b7dfc
Make it possible for parameters to be ignored. It works in regular wrappers for args on the end of the list that have default values, and also for things like functions that have their C++ code replaced with .setCppCode
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69301 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-04 07:54:49 +00:00
Robin Dunn
8f9862b23e
Add the ability to create class properties from Python methods
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69260 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-01 07:20:19 +00:00
Robin Dunn
9dbcd04fa7
Use %DefaultDocstringFormat and write the %Docstrings indented inside the classes as expected to make the generated .sip files easier for mere humans to read and understand.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69234 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-29 20:55:57 +00:00
Robin Dunn
e44dd28fd4
* Replacing method code with .setCppCode is now not SIP-specific. The generated code creates a new function to place the code in, like CppMethodDef does, so the given code can use 'self' and return values instead of using special SIP variables.
...
* added setCppCode_sip for when SIP-specific stuff is needed.
* Adding the 'const' on to const methods had somehow been forgotten, fix that.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69187 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-25 04:06:16 +00:00