From: Włodzimierz Skiba Date: Tue, 25 Jul 2006 06:43:18 +0000 (+0000) Subject: Final steps to move to common icon. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/be52597cb5f9ff68330962b71124e22d8f05b4fa Final steps to move to common icon. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43597 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/wxPython/wxaddons/setup.py b/wxPython/wxaddons/setup.py index 0bbb7330e7..266029b0d1 100644 --- a/wxPython/wxaddons/setup.py +++ b/wxPython/wxaddons/setup.py @@ -1,7 +1,9 @@ import distutils.command.install_lib +import distutils.command.install_data import distutils.command.install import os, string from distutils.core import setup +from user import home # this gives us the user's home dir on all platforms class wxaddon_install_lib(distutils.command.install_lib.install_lib): """need to change self.install_dir to the actual library dir""" @@ -10,6 +12,13 @@ class wxaddon_install_lib(distutils.command.install_lib.install_lib): self.install_dir = os.path.join(getattr(install_cmd, 'install_purelib'), "wxaddons") return distutils.command.install_lib.install_lib.run(self) +class wxaddon_install_data(distutils.command.install_data.install_data): + def run(self): + self.install_dir = os.path.join(home, ".wxaddons_data", self.distribution.get_name()) + if not os.path.exists(self.install_dir): + os.makedirs(self.install_dir) + return distutils.command.install_data.install_data.run(self) + class wxaddon_install(distutils.command.install.install): def run(self): result = distutils.command.install.install.run(self) @@ -44,5 +53,6 @@ class wxaddon_install(distutils.command.install.install): def wxaddon(**kwargs): kwargs['cmdclass'] = {'install_lib' : wxaddon_install_lib, - 'install' : wxaddon_install } + 'install' : wxaddon_install, + 'install_data' : wxaddon_install_data } setup(**kwargs) \ No newline at end of file