diff --git a/CHANGES.rst b/CHANGES.rst index 234c8fc3..09d05bf0 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -143,6 +143,9 @@ Changes in this release include the following: features are not part of the build. So far, stubs are available for wx.Accessible, wx.glcanvas, wx.media and wx.html2. +* Moved the wxpy_api.h file into the wx package at wx/include/wxPython so it + will be included in the wheel file. (#961) + diff --git a/MANIFEST.in b/MANIFEST.in index e5f14b44..7e1cc57c 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -8,6 +8,7 @@ recursive-include wx ** recursive-include wx/locale ** +recursive-include wx/include ** recursive-include license *.txt include LICENSE.txt graft docs diff --git a/buildtools/config.py b/buildtools/config.py index 299d4cf7..8b872343 100644 --- a/buildtools/config.py +++ b/buildtools/config.py @@ -111,7 +111,8 @@ class Configuration(object): self.WXDIR = wxDir() self.includes = [phoenixDir() + '/sip/siplib', # to get our version of sip.h - phoenixDir() + '/src', # for any hand-written headers + phoenixDir() + '/wx/include', # for the wxPython API + phoenixDir() + '/src', # for other hand-written headers ] self.DOXY_XML_DIR = os.path.join(self.WXDIR, 'docs/doxygen/out/xml') diff --git a/etg/_adv.py b/etg/_adv.py index 960ce84f..7fd3e1e3 100644 --- a/etg/_adv.py +++ b/etg/_adv.py @@ -77,7 +77,7 @@ def run(): # Tweak the parsed meta objects in the module object as needed for # customizing the generated code and docstrings. - module.addHeaderCode('#include ') + module.addHeaderCode('#include ') module.addHeaderCode('#include ') module.addImport('_core') diff --git a/etg/_aui.py b/etg/_aui.py index f3372f97..e9702b79 100644 --- a/etg/_aui.py +++ b/etg/_aui.py @@ -58,7 +58,7 @@ def run(): # Tweak the parsed meta objects in the module object as needed for # customizing the generated code and docstrings. - module.addHeaderCode('#include ') + module.addHeaderCode('#include ') module.addImport('_core') module.addPyCode("import wx", order=10) diff --git a/etg/_core.py b/etg/_core.py index c339dd19..782fb042 100644 --- a/etg/_core.py +++ b/etg/_core.py @@ -259,7 +259,7 @@ def run(): # Tweak the parsed meta objects in the module object as needed for # customizing the generated code and docstrings. - module.addHeaderCode('#include ') + module.addHeaderCode('#include ') module.addInclude(INCLUDES) module.includePyCode('src/core_ex.py', order=10) diff --git a/etg/_dataview.py b/etg/_dataview.py index 385508c6..f41e5c0e 100644 --- a/etg/_dataview.py +++ b/etg/_dataview.py @@ -58,7 +58,7 @@ def run(): # Tweak the parsed meta objects in the module object as needed for # customizing the generated code and docstrings. - module.addHeaderCode('#include ') + module.addHeaderCode('#include ') module.addImport('_core') module.addPyCode("import wx", order=10) diff --git a/etg/_glcanvas.py b/etg/_glcanvas.py index 79fb483e..99ffedb2 100644 --- a/etg/_glcanvas.py +++ b/etg/_glcanvas.py @@ -53,7 +53,7 @@ def run(): # Tweak the parsed meta objects in the module object as needed for # customizing the generated code and docstrings. - module.addHeaderCode('#include ') + module.addHeaderCode('#include ') module.addImport('_core') module.addPyCode('import wx', order=10) module.addInclude(INCLUDES) diff --git a/etg/_grid.py b/etg/_grid.py index eb0a2982..db4abdb4 100644 --- a/etg/_grid.py +++ b/etg/_grid.py @@ -54,7 +54,7 @@ def run(): # Tweak the parsed meta objects in the module object as needed for # customizing the generated code and docstrings. - module.addHeaderCode('#include ') + module.addHeaderCode('#include ') module.addImport('_core') module.addPyCode("import wx", order=10) diff --git a/etg/_html.py b/etg/_html.py index 379ce8c7..ad37ae20 100644 --- a/etg/_html.py +++ b/etg/_html.py @@ -73,7 +73,7 @@ def run(): # Tweak the parsed meta objects in the module object as needed for # customizing the generated code and docstrings. - module.addHeaderCode('#include ') + module.addHeaderCode('#include ') module.addImport('_core') module.addPyCode("import wx", order=10) module.addInclude(INCLUDES) diff --git a/etg/_html2.py b/etg/_html2.py index be933cb4..7bf49299 100644 --- a/etg/_html2.py +++ b/etg/_html2.py @@ -55,7 +55,7 @@ def run(): # Tweak the parsed meta objects in the module object as needed for # customizing the generated code and docstrings. - module.addHeaderCode('#include ') + module.addHeaderCode('#include ') module.addImport('_core') module.addPyCode('import wx', order=10) module.addInclude(INCLUDES) diff --git a/etg/_media.py b/etg/_media.py index 169cf53e..9d1ae81b 100644 --- a/etg/_media.py +++ b/etg/_media.py @@ -59,7 +59,7 @@ def run(): # Tweak the parsed meta objects in the module object as needed for # customizing the generated code and docstrings. - module.addHeaderCode('#include ') + module.addHeaderCode('#include ') module.addImport('_core') module.addPyCode('import wx', order=10) module.addInclude(INCLUDES) diff --git a/etg/_msw.py b/etg/_msw.py index 16217812..900cd17b 100644 --- a/etg/_msw.py +++ b/etg/_msw.py @@ -53,7 +53,7 @@ def run(): # Tweak the parsed meta objects in the module object as needed for # customizing the generated code and docstrings. - module.addHeaderCode('#include ') + module.addHeaderCode('#include ') module.addImport('_core') module.addPyCode('import wx', order=10) module.addInclude(INCLUDES) diff --git a/etg/_propgrid.py b/etg/_propgrid.py index 0bade6fb..7262f4e7 100644 --- a/etg/_propgrid.py +++ b/etg/_propgrid.py @@ -56,7 +56,7 @@ def run(): # Tweak the parsed meta objects in the module object as needed for # customizing the generated code and docstrings. - module.addHeaderCode('#include ') + module.addHeaderCode('#include ') module.addImport('_core') module.addPyCode("import wx", order=10) diff --git a/etg/_ribbon.py b/etg/_ribbon.py index 24e42925..cc3e4f7d 100644 --- a/etg/_ribbon.py +++ b/etg/_ribbon.py @@ -59,7 +59,7 @@ def run(): # Tweak the parsed meta objects in the module object as needed for # customizing the generated code and docstrings. - module.addHeaderCode('#include ') + module.addHeaderCode('#include ') module.addImport('_core') module.addPyCode("import wx", order=10) diff --git a/etg/_richtext.py b/etg/_richtext.py index a486dfd7..7b308d27 100644 --- a/etg/_richtext.py +++ b/etg/_richtext.py @@ -64,7 +64,7 @@ def run(): # Tweak the parsed meta objects in the module object as needed for # customizing the generated code and docstrings. - module.addHeaderCode('#include ') + module.addHeaderCode('#include ') module.addImport('_core') module.addPyCode("import wx", order=10) module.addImport('_xml') diff --git a/etg/_stc.py b/etg/_stc.py index abeb4c17..990093fe 100644 --- a/etg/_stc.py +++ b/etg/_stc.py @@ -52,7 +52,7 @@ def run(): # Tweak the parsed meta objects in the module object as needed for # customizing the generated code and docstrings. - module.addHeaderCode('#include ') + module.addHeaderCode('#include ') module.addImport('_core') module.addPyCode('''\ import wx @@ -173,8 +173,8 @@ def run(): c.addCppMethod('void', 'MarkerDefineRGBAImage', '(int markerNumber, wxPyBuffer* pixels)', doc="""\ Define a marker from RGBA data.\n - It has the width and height from RGBAImageSetWidth/Height. You must - ensure that the buffer is at least width*height*4 bytes long. + It has the width and height from RGBAImageSetWidth/Height. You must + ensure that the buffer is at least width*height*4 bytes long. """, body="""\ self->MarkerDefineRGBAImage(markerNumber, (unsigned char*)pixels->m_ptr); @@ -184,7 +184,7 @@ def run(): c.addCppMethod('void', 'RegisterRGBAImage', '(int type, wxPyBuffer* pixels)', doc="""\ Register an RGBA image for use in autocompletion lists.\n - It has the width and height from RGBAImageSetWidth/Height. You must + It has the width and height from RGBAImageSetWidth/Height. You must ensure that the buffer is at least width*height*4 bytes long. """, body="""\ diff --git a/etg/_webkit.py b/etg/_webkit.py index cef87ea2..ef01a3f1 100644 --- a/etg/_webkit.py +++ b/etg/_webkit.py @@ -52,7 +52,7 @@ def run(): # Tweak the parsed meta objects in the module object as needed for # customizing the generated code and docstrings. - module.addHeaderCode('#include ') + module.addHeaderCode('#include ') module.addImport('_core') module.addPyCode('import wx', order=10) module.addInclude(INCLUDES) diff --git a/etg/_xml.py b/etg/_xml.py index 9db84670..57a09296 100644 --- a/etg/_xml.py +++ b/etg/_xml.py @@ -55,7 +55,7 @@ def run(): # Tweak the parsed meta objects in the module object as needed for # customizing the generated code and docstrings. - module.addHeaderCode('#include ') + module.addHeaderCode('#include ') module.addImport('_core') module.addPyCode('import wx', order=10) module.addInclude(INCLUDES) diff --git a/etg/_xrc.py b/etg/_xrc.py index fff1693f..13ef615a 100644 --- a/etg/_xrc.py +++ b/etg/_xrc.py @@ -51,7 +51,7 @@ def run(): # Tweak the parsed meta objects in the module object as needed for # customizing the generated code and docstrings. - module.addHeaderCode('#include ') + module.addHeaderCode('#include ') module.addImport('_core') module.addImport('_xml') module.addPyCode('''\ diff --git a/setup.py b/setup.py index b65e45f0..d4b1f871 100644 --- a/setup.py +++ b/setup.py @@ -319,7 +319,7 @@ ENTRY_POINTS = { "img2xpm = wx.tools.img2xpm:main", "pywxrc = wx.tools.pywxrc:main", # ], -# 'gui_scripts' : [ # TODO: Why was this done? +# 'gui_scripts' : [ # TODO: Why was this commented out? "wxget = wx.tools.wxget:main", # New wx wget "wxdocs = wx.tools.wxget_docs_demo:docs_main", # Get/Launch Docs "wxdemo = wx.tools.wxget_docs_demo:demo_main", # Get/Launch Demo diff --git a/src/wacky_ints.sip b/src/wacky_ints.sip index 43536667..4677e537 100644 --- a/src/wacky_ints.sip +++ b/src/wacky_ints.sip @@ -20,7 +20,7 @@ %MappedType size_t { %TypeHeaderCode - #include + #include %End %ConvertToTypeCode @@ -48,7 +48,7 @@ %TypeHeaderCode #include - #include + #include %End %ConvertToTypeCode @@ -84,7 +84,7 @@ %TypeHeaderCode #include - #include + #include %End %ConvertToTypeCode diff --git a/src/wxpy_api.sip b/src/wxpy_api.sip index e98240f6..f834e468 100644 --- a/src/wxpy_api.sip +++ b/src/wxpy_api.sip @@ -12,7 +12,7 @@ %ModuleHeaderCode -#include "wxpy_api.h" +#include %End //-------------------------------------------------------------------------- diff --git a/wscript b/wscript index 1e6ce538..a50904d1 100644 --- a/wscript +++ b/wscript @@ -104,7 +104,7 @@ def configure(conf): conf.env.msvc_relwithdebug = conf.options.msvc_relwithdebug # Ensure that the headers in siplib and Phoenix's src dir can be found - conf.env.INCLUDES_WXPY = ['sip/siplib', 'src'] + conf.env.INCLUDES_WXPY = ['sip/siplib', 'wx/include', 'src'] if isWindows: # Windows/MSVC specific stuff diff --git a/src/wxpy_api.h b/wx/include/wxPython/wxpy_api.h similarity index 100% rename from src/wxpy_api.h rename to wx/include/wxPython/wxpy_api.h