From 8f8c4b40456b5a4ef56a704c69570c7a1c86e714 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 26 Mar 2004 00:21:33 +0000 Subject: [PATCH] Moved config.py to the root because if wxPython hasn't been built yet it can't be imported from wx.build.config since wx._core doesn't exist. It is still copied down to wx/build for the install though. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26345 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/{wx/build => }/config.py | 0 wxPython/setup.py | 15 ++++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) rename wxPython/{wx/build => }/config.py (100%) diff --git a/wxPython/wx/build/config.py b/wxPython/config.py similarity index 100% rename from wxPython/wx/build/config.py rename to wxPython/config.py diff --git a/wxPython/setup.py b/wxPython/setup.py index 7ca50d7236..77e7d5aa37 100755 --- a/wxPython/setup.py +++ b/wxPython/setup.py @@ -23,9 +23,22 @@ import sys # back and forth, and also more stuff in config.py will get converted # to functions, etc. +# This script imports it as just "config" because if wxPython doesn't +# exist yet, then it can't be imported from wx.build.config (since +# wx._core doesn't exist yet.) So instead we keep the main copy of +# config .py in the same place as setup.py, and then copy it to +# wx/build as needed below. + sys.setup_is_main = __name__ == "__main__" # an icky hack! -from wx.build.config import * +from config import * + + +#---------------------------------------------------------------------- +# Update the packaged config file. +#---------------------------------------------------------------------- +copy_file('config.py', 'wx/build', update=1, verbose=1) +CLEANUP.append('wx/build/config.py') #---------------------------------------------------------------------- # Update the version file -- 2.45.2