-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-AUX scripts-multiver-2.6.0.0.diff 3373 RMD160 377cfeba11d5c91106d8ab57c50ed7534d3004b6 SHA1 1191dc7b4dd560dfc0843c44d823c0971dabd70c SHA256 504cb13fe5e13d75274fc965be2d78618fae99693ff6b8c1cf0ff50852cf8084
-MD5 d69bb360ce49f76f26ef1ae017f4bc31 files/scripts-multiver-2.6.0.0.diff 3373
-RMD160 377cfeba11d5c91106d8ab57c50ed7534d3004b6 files/scripts-multiver-2.6.0.0.diff 3373
-SHA256 504cb13fe5e13d75274fc965be2d78618fae99693ff6b8c1cf0ff50852cf8084 files/scripts-multiver-2.6.0.0.diff 3373
AUX scripts-multiver-2.6.1.0.diff 3373 RMD160 377cfeba11d5c91106d8ab57c50ed7534d3004b6 SHA1 1191dc7b4dd560dfc0843c44d823c0971dabd70c SHA256 504cb13fe5e13d75274fc965be2d78618fae99693ff6b8c1cf0ff50852cf8084
MD5 d69bb360ce49f76f26ef1ae017f4bc31 files/scripts-multiver-2.6.1.0.diff 3373
RMD160 377cfeba11d5c91106d8ab57c50ed7534d3004b6 files/scripts-multiver-2.6.1.0.diff 3373
MD5 3966851c4cfba6f57e620747f1630523 files/wxpy-config.py 3265
RMD160 c090972f980b4380c113b1c6e7328dd2b5565194 files/wxpy-config.py 3265
SHA256 1097d2b169f3c97f149032f5f647e1920d89288dc91981ad85b2d3ae28baf8ef files/wxpy-config.py 3265
-AUX wxversion.py 14404 RMD160 d69feda3e74ca3cbd3777f13809495e374fc1189 SHA1 315054ad575aba30e9d1638b8f6ab4bc830df66c SHA256 24d63e045301a1c5e354e551c4500db9b656908f3243a5f292d7d1345f1a8f55
-MD5 49c68d8febf658844a392bd0108fdf10 files/wxversion.py 14404
-RMD160 d69feda3e74ca3cbd3777f13809495e374fc1189 files/wxversion.py 14404
-SHA256 24d63e045301a1c5e354e551c4500db9b656908f3243a5f292d7d1345f1a8f55 files/wxversion.py 14404
-DIST wxPython-src-2.6.1.0.tar.gz 18452406 RMD160 211b6bad3b9062180e67cf13e40c810b1e3fff9b SHA1 e7f46b0eb83fb0e316e0d5b49fd38b3b7f00b95b SHA256 cd4f03fcd1a9e8c27881414e83ceb66ce07ca9fe0d42292830a9f9894e4c4335
DIST wxPython-src-2.6.3.3.tar.bz2 18963104 RMD160 7feacff6808574143590a0a421ee60f3692eb783 SHA1 e55a3a8cfbd1aff394be15297ae205a8c597bed8 SHA256 fd2c4338beac644ebc509766f1e33892fc34d19280c5cbd66746625f96a55acb
-EBUILD wxpython-2.6.1.0.ebuild 3665 RMD160 81804b4cd19509c2106389f06fb298506fdf3e49 SHA1 059c59e09de40da130f4af65097864586997b304 SHA256 a3cdf970912d42187441825705edaaf7678ae0eafff069efdc3024508f2e45dd
-MD5 97d74923d83b505ea00adb6e0fe27e36 wxpython-2.6.1.0.ebuild 3665
-RMD160 81804b4cd19509c2106389f06fb298506fdf3e49 wxpython-2.6.1.0.ebuild 3665
-SHA256 a3cdf970912d42187441825705edaaf7678ae0eafff069efdc3024508f2e45dd wxpython-2.6.1.0.ebuild 3665
EBUILD wxpython-2.6.3.3.ebuild 3174 RMD160 f33a17316cd155dac6470e7a30a06ccf3c17ed47 SHA1 cf1faae26dc22a011d29c7d15f1d1d67c86170a4 SHA256 3c2d8f36a6edc9c17dac317bf24213380f799da05e33a8c3621a5ca0c6f014dd
MD5 dfe1a3961e3e631f3a76faebbc180c7c wxpython-2.6.3.3.ebuild 3174
RMD160 f33a17316cd155dac6470e7a30a06ccf3c17ed47 wxpython-2.6.3.3.ebuild 3174
SHA256 3c2d8f36a6edc9c17dac317bf24213380f799da05e33a8c3621a5ca0c6f014dd wxpython-2.6.3.3.ebuild 3174
-MISC ChangeLog 13889 RMD160 e1d4923568794ccf11cce11bf8658763a47f5360 SHA1 e01979fe9e09d19ae45c89d58cb8c3068e66f14e SHA256 279b81a288b6c6ea91d277a31321d29d82b55fbfbdbed4b7775d3909b1e849bc
-MD5 7453623ea29fcd5525d1c240fb9966e3 ChangeLog 13889
-RMD160 e1d4923568794ccf11cce11bf8658763a47f5360 ChangeLog 13889
-SHA256 279b81a288b6c6ea91d277a31321d29d82b55fbfbdbed4b7775d3909b1e849bc ChangeLog 13889
+MISC ChangeLog 14065 RMD160 f15b6e7cb4304ef22e810395f9d3b7d185e6d28b SHA1 257f87ba6b69ae86d20562b20ad693f6f164a7c1 SHA256 ed8b455d981a458531d2500de35f824d829b2aea848c937b88d2c4fbeb21bc36
+MD5 d97e197cac8eb31899b4da793792c7be ChangeLog 14065
+RMD160 f15b6e7cb4304ef22e810395f9d3b7d185e6d28b ChangeLog 14065
+SHA256 ed8b455d981a458531d2500de35f824d829b2aea848c937b88d2c4fbeb21bc36 ChangeLog 14065
MISC metadata.xml 182 RMD160 ea41002477d2dd03185feb91318022c593ab267f SHA1 104f632f29e5a0bafbe01ab77d3565326054ab3b SHA256 1d83e81ebf161f14a972d059a5af2cac192b64c4e3ca059347204d14b5f270e5
MD5 f3c5a27935083d6431dbc3401b897b92 metadata.xml 182
RMD160 ea41002477d2dd03185feb91318022c593ab267f metadata.xml 182
SHA256 1d83e81ebf161f14a972d059a5af2cac192b64c4e3ca059347204d14b5f270e5 metadata.xml 182
-MD5 fbbd2475bb624660159cd7d059b5114d files/digest-wxpython-2.6.1.0 268
-RMD160 bae16c6faa209219e21bce08c74d509650f31f18 files/digest-wxpython-2.6.1.0 268
-SHA256 9c471738678619dddb0569143f1f46d3d0ab92c4b1b8f5d76b69f3c5e9697b12 files/digest-wxpython-2.6.1.0 268
MD5 4865b7c2ac0ec50eb4588b9c8782f5f9 files/digest-wxpython-2.6.3.3 271
RMD160 bc71a86558bf3216ddd97ea35e83fd50fd934587 files/digest-wxpython-2.6.3.3 271
SHA256 fd33053a2b85e0e330fff5bb181c0cd89d25c524f5ea2a6987e791480a83b814 files/digest-wxpython-2.6.3.3 271
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.3 (GNU/Linux)
-iD8DBQFGNww5V3J2n04EauwRAuCeAJ9mEjZZ5DlPfrppZn52dQrCfeu+qQCfeC3g
-qDYbsjQOE5kbKVvRXtZWJzY=
-=+R5m
+iD8DBQFGNzEvkeYb6olFHJcRAmtDAKCY3ICJHp5lRyL5rEPNrE3xSltCkQCgphF4
+W5O2dmO49cvJ7C/Yh+Pr310=
+=3F+Z
-----END PGP SIGNATURE-----
+++ /dev/null
-diff -cr scripts/helpviewer scripts.mine/helpviewer
-*** scripts/helpviewer Wed Nov 12 21:03:49 2003
---- scripts.mine/helpviewer Wed Apr 27 04:07:31 2005
-***************
-*** 1,4 ****
---- 1,7 ----
- #!/usr/bin/env python
-
-+ import wxversion
-+ wxversion.select("2.6")
-+
- from wx.tools.helpviewer import main
- main()
-diff -cr scripts/img2png scripts.mine/img2png
-*** scripts/img2png Wed Nov 12 21:03:49 2003
---- scripts.mine/img2png Wed Apr 27 04:07:04 2005
-***************
-*** 1,5 ****
---- 1,8 ----
- #!/usr/bin/env python
-
-+ import wxversion
-+ wxversion.select("2.6")
-+
- from wx.tools.img2png import main
- main()
-
-diff -cr scripts/img2py scripts.mine/img2py
-*** scripts/img2py Wed Nov 12 21:03:49 2003
---- scripts.mine/img2py Wed Apr 27 04:07:36 2005
-***************
-*** 1,5 ****
---- 1,8 ----
- #!/usr/bin/env python
-
-+ import wxversion
-+ wxversion.select("2.6")
-+
- import sys
- from wx.tools.img2py import main
- main(sys.argv[1:])
-diff -cr scripts/img2xpm scripts.mine/img2xpm
-*** scripts/img2xpm Wed Nov 12 21:03:49 2003
---- scripts.mine/img2xpm Wed Apr 27 04:07:14 2005
-***************
-*** 1,5 ****
---- 1,8 ----
- #!/usr/bin/env python
-
-+ import wxversion
-+ wxversion.select("2.6")
-+
- from wx.tools.img2xpm import main
- main()
-
-diff -cr scripts/pyalacarte scripts.mine/pyalacarte
-*** scripts/pyalacarte Wed Jul 2 23:12:38 2003
---- scripts.mine/pyalacarte Wed Apr 27 04:07:40 2005
-***************
-*** 1,4 ****
---- 1,7 ----
- #!/usr/bin/env python
-
-+ import wxversion
-+ wxversion.select("2.6")
-+
- from wx.py.PyAlaCarte import main
- main()
-diff -cr scripts/pyalamode scripts.mine/pyalamode
-*** scripts/pyalamode Wed Jul 2 23:12:37 2003
---- scripts.mine/pyalamode Wed Apr 27 04:07:21 2005
-***************
-*** 1,4 ****
---- 1,7 ----
- #!/usr/bin/env python
-
-+ import wxversion
-+ wxversion.select("2.6")
-+
- from wx.py.PyAlaMode import main
- main()
-diff -cr scripts/pycrust scripts.mine/pycrust
-*** scripts/pycrust Wed Jul 2 23:12:37 2003
---- scripts.mine/pycrust Wed Apr 27 04:07:43 2005
-***************
-*** 1,4 ****
---- 1,7 ----
- #!/usr/bin/env python
-
-+ import wxversion
-+ wxversion.select("2.6")
-+
- from wx.py.PyCrust import main
- main()
-diff -cr scripts/pyshell scripts.mine/pyshell
-*** scripts/pyshell Wed Jul 2 23:12:37 2003
---- scripts.mine/pyshell Wed Apr 27 04:07:25 2005
-***************
-*** 1,4 ****
---- 1,7 ----
- #!/usr/bin/env python
-
-+ import wxversion
-+ wxversion.select("2.6")
-+
- from wx.py.PyShell import main
- main()
-diff -cr scripts/pywrap scripts.mine/pywrap
-*** scripts/pywrap Wed Jul 2 23:12:37 2003
---- scripts.mine/pywrap Wed Apr 27 04:07:46 2005
-***************
-*** 1,4 ****
---- 1,7 ----
- #!/usr/bin/env python
-
-+ import wxversion
-+ wxversion.select("2.6")
-+
- from wx.py.PyWrap import main
- main()
-diff -cr scripts/pywxrc scripts.mine/pywxrc
-*** scripts/pywxrc Mon Oct 4 20:03:33 2004
---- scripts.mine/pywxrc Wed Apr 27 04:07:28 2005
-***************
-*** 1,5 ****
---- 1,8 ----
- #!/usr/bin/env python
-
-+ import wxversion
-+ wxversion.select("2.6")
-+
- from wx.tools.pywxrc import main
- main()
-
-diff -cr scripts/xrced scripts.mine/xrced
-*** scripts/xrced Wed Nov 12 21:03:49 2003
---- scripts.mine/xrced Wed Apr 27 04:07:49 2005
-***************
-*** 1,4 ****
---- 1,7 ----
- #!/usr/bin/env python
-
-+ import wxversion
-+ wxversion.select("2.6")
-+
- from wx.tools.XRCed.xrced import main
- main()
+++ /dev/null
-#----------------------------------------------------------------------
-# Name: wxversion
-# Purpose: Allows a wxPython program to search for alternate
-# installations of the wxPython packages and modify sys.path
-# so they will be found when "import wx" is done.
-#
-# Author: Robin Dunn
-#
-# Created: 24-Sept-2004
-# RCS-ID: $Id: wxversion.py,v 1.1 2004/11/13 04:08:20 pythonhead Exp $
-# Copyright: (c) 2004 by Total Control Software
-# Licence: wxWindows license
-#----------------------------------------------------------------------
-
-"""
-If you have more than one version of wxPython installed this module
-allows your application to choose which version of wxPython will be
-imported when it does 'import wx'. You use it like this::
-
- import wxversion
- wxversion.select('2.4')
- import wx
-
-Or additional build options can also be selected, like this::
-
- import wxversion
- wxversion.select('2.5.3-unicode')
- import wx
-
-Of course the default wxPython version can also be controlled by
-setting PYTHONPATH or by editing the wx.pth path configuration file,
-but using wxversion will allow an application to manage the version
-selection itself rather than depend on the user to setup the
-environment correctly.
-
-It works by searching the sys.path for directories matching wx-* and
-then comparing them to what was passed to the select function. If a
-match is found then that path is inserted into sys.path.
-
-NOTE: If you are making a 'bundle' of your application with a tool
-like py2exe then you should *not* use the wxversion module since it
-looks at the filesystem for the directories on sys.path, it will fail
-in a bundled environment. Instead you should simply ensure that the
-version of wxPython that you want is found by default on the sys.path
-when making the bundled version by setting PYTHONPATH. Then that
-version will be included in your bundle and your app will work as
-expected. Py2exe and the others usually have a way to tell at runtime
-if they are running from a bundle or running raw, so you can check
-that and only use wxversion if needed. For example, for py2exe::
-
- if not hasattr(sys, 'frozen'):
- import wxversion
- wxversion.select('2.5')
- import wx
-
-More documentation on wxversion and multi-version installs can be
-found at: http://wiki.wxpython.org/index.cgi/MultiVersionInstalls
-
-"""
-
-import sys, os, glob, fnmatch
-
-
-_selected = None
-class VersionError(Exception):
- pass
-
-#----------------------------------------------------------------------
-
-def select(versions):
- """
- Search for a wxPython installation that matches version. If one
- is found then sys.path is modified so that version will be
- imported with a 'import wx', otherwise a VersionError exception is
- raised. This funciton should only be caled once at the begining
- of the application before wxPython is imported.
-
- :param version: Specifies the version to look for, it can
- either be a string or a list of strings. Each
- string is compared to the installed wxPythons
- and the best match is inserted into the
- sys.path, allowing an 'import wx' to find that
- version.
-
- The version string is composed of the dotted
- version number (at least 2 of the 4 components)
- optionally followed by hyphen ('-') separated
- options (wx port, unicode/ansi, flavour, etc.) A
- match is determined by how much of the installed
- version matches what is given in the version
- parameter. If the version number components don't
- match then the score is zero, otherwise the score
- is increased for every specified optional component
- that is specified and that matches.
- """
- if type(versions) == str:
- versions = [versions]
-
- global _selected
- if _selected is not None:
- # A version was previously selected, ensure that it matches
- # this new request
- for ver in versions:
- if _selected.Score(_wxPackageInfo(ver)) > 0:
- return
- # otherwise, raise an exception
- raise VersionError("A previously selected wx version does not match the new request.")
-
- # If we get here then this is the first time wxversion is used,
- # ensure that wxPython hasn't been imported yet.
- if sys.modules.has_key('wx') or sys.modules.has_key('wxPython'):
- raise VersionError("wxversion.select() must be called before wxPython is imported")
-
- # Look for a matching version and manipulate the sys.path as
- # needed to allow it to be imported.
- installed = _find_installed(True)
- bestMatch = _get_best_match(installed, versions)
-
- if bestMatch is None:
- raise VersionError("Requested version of wxPython not found")
-
- sys.path.insert(0, bestMatch.pathname)
- _selected = bestMatch
-
-#----------------------------------------------------------------------
-
-UPDATE_URL = "http://wxPython.org/"
-#UPDATE_URL = "http://sourceforge.net/project/showfiles.php?group_id=10718"
-
-
-def ensureMinimal(minVersion):
- """
- Checks to see if the default version of wxPython is greater-than
- or equal to `minVersion`. If not then it will try to find an
- installed version that is >= minVersion. If none are available
- then a message is displayed that will inform the user and will
- offer to open their web browser to the wxPython downloads page,
- and will then exit the application.
- """
- assert type(minVersion) == str
-
- # ensure that wxPython hasn't been imported yet.
- if sys.modules.has_key('wx') or sys.modules.has_key('wxPython'):
- raise VersionError("wxversion.ensureMinimal() must be called before wxPython is imported")
-
- bestMatch = None
- minv = _wxPackageInfo(minVersion)
- defaultPath = _find_default()
- if defaultPath:
- defv = _wxPackageInfo(defaultPath, True)
- if defv >= minv:
- bestMatch = defv
-
- if bestMatch is None:
- installed = _find_installed()
- if installed:
- # The list is in reverse sorted order, so if the first one is
- # big enough then choose it
- if installed[0] >= minv:
- bestMatch = installed[0]
-
- if bestMatch is None:
- import wx, webbrowser
- versions = "\n".join([" "+ver for ver in getInstalled()])
- app = wx.PySimpleApp()
- result = wx.MessageBox("This application requires a version of wxPython "
- "greater than or equal to %s, but a matching version "
- "was not found.\n\n"
- "You currently have these version(s) installed:\n%s\n\n"
- "Would you like to download a new version of wxPython?\n"
- % (minVersion, versions),
- "wxPython Upgrade Needed", style=wx.YES_NO)
- if result == wx.YES:
- webbrowser.open(UPDATE_URL)
- app.MainLoop()
- sys.exit()
-
- sys.path.insert(0, bestMatch.pathname)
- _selected = bestMatch
-
-
-#----------------------------------------------------------------------
-
-def checkInstalled(versions):
- """
- Check if there is a version of wxPython installed that matches one
- of the versions given. Returns True if so, False if not. This
- can be used to determine if calling `select` will succeed or not.
-
- :param version: Same as in `select`, either a string or a list
- of strings specifying the version(s) to check
- for.
- """
-
- if type(versions) == str:
- versions = [versions]
- installed = _find_installed()
- bestMatch = _get_best_match(installed, versions)
- return bestMatch is not None
-
-#----------------------------------------------------------------------
-
-def getInstalled():
- """
- Returns a list of strings representing the installed wxPython
- versions that are found on the system.
- """
- installed = _find_installed()
- return [os.path.basename(p.pathname)[3:] for p in installed]
-
-
-
-#----------------------------------------------------------------------
-# private helpers...
-
-def _get_best_match(installed, versions):
- bestMatch = None
- bestScore = 0
- for pkg in installed:
- for ver in versions:
- score = pkg.Score(_wxPackageInfo(ver))
- if score > bestScore:
- bestMatch = pkg
- bestScore = score
- return bestMatch
-
-
-_pattern = "wx-[0-9].*"
-def _find_installed(removeExisting=False):
- installed = []
- toRemove = []
- for pth in sys.path:
-
- # empty means to look in the current dir
- if not pth:
- pth = '.'
-
- # skip it if it's not a package dir
- if not os.path.isdir(pth):
- continue
-
- base = os.path.basename(pth)
-
- # if it's a wx path that's already in the sys.path then mark
- # it for removal and then skip it
- if fnmatch.fnmatchcase(base, _pattern):
- toRemove.append(pth)
- continue
-
- # now look in the dir for matching subdirs
- for name in glob.glob(os.path.join(pth, _pattern)):
- # make sure it's a directory
- if not os.path.isdir(name):
- continue
- # and has a wx subdir
- if not os.path.exists(os.path.join(name, 'wx')):
- continue
- installed.append(_wxPackageInfo(name, True))
-
- if removeExisting:
- for rem in toRemove:
- del sys.path[sys.path.index(rem)]
-
- installed.sort()
- installed.reverse()
- return installed
-
-
-# Scan the sys.path looking for either a directory matching _pattern,
-# or a wx.pth file
-def _find_default():
- for pth in sys.path:
- # empty means to look in the current dir
- if not pth:
- pth = '.'
-
- # skip it if it's not a package dir
- if not os.path.isdir(pth):
- continue
-
- # does it match the pattern?
- base = os.path.basename(pth)
- if fnmatch.fnmatchcase(base, _pattern):
- return pth
-
- for pth in sys.path:
- if not pth:
- pth = '.'
- if not os.path.isdir(pth):
- continue
- if os.path.exists(os.path.join(pth, 'wx.pth')):
- base = open(os.path.join(pth, 'wx.pth')).read()
- return os.path.join(pth, base)
-
- return None
-
-
-class _wxPackageInfo(object):
- def __init__(self, pathname, stripFirst=False):
- self.pathname = pathname
- base = os.path.basename(pathname)
- segments = base.split('-')
- if stripFirst:
- segments = segments[1:]
- self.version = tuple([int(x) for x in segments[0].split('.')])
- self.options = segments[1:]
-
-
- def Score(self, other):
- score = 0
-
- # whatever number of version components given in other must
- # match exactly
- minlen = min(len(self.version), len(other.version))
- if self.version[:minlen] != other.version[:minlen]:
- return 0
- score += 1
-
- for opt in other.options:
- if opt in self.options:
- score += 1
- return score
-
-
-
- def __lt__(self, other):
- return self.version < other.version or \
- (self.version == other.version and self.options < other.options)
- def __le__(self, other):
- return self.version <= other.version or \
- (self.version == other.version and self.options <= other.options)
-
- def __gt__(self, other):
- return self.version > other.version or \
- (self.version == other.version and self.options > other.options)
- def __ge__(self, other):
- return self.version >= other.version or \
- (self.version == other.version and self.options >= other.options)
-
- def __eq__(self, other):
- return self.version == other.version and self.options == other.options
-
-
-
-#----------------------------------------------------------------------
-
-if __name__ == '__main__':
- import pprint
-
- #ensureMinimal('2.5')
- #pprint.pprint(sys.path)
- #sys.exit()
-
-
- def test(version):
- # setup
- savepath = sys.path[:]
-
- #test
- select(version)
- print "Asked for %s:\t got: %s" % (version, sys.path[0])
- pprint.pprint(sys.path)
- print
-
- # reset
- sys.path = savepath[:]
- global _selected
- _selected = None
-
-
- # make some test dirs
- names = ['wx-2.4',
- 'wx-2.5.2',
- 'wx-2.5.2.9-gtk2-unicode',
- 'wx-2.5.2.9-gtk-ansi',
- 'wx-2.5.1',
- 'wx-2.5.2.8-gtk2-unicode',
- 'wx-2.5.3']
- for name in names:
- d = os.path.join('/tmp', name)
- os.mkdir(d)
- os.mkdir(os.path.join(d, 'wx'))
-
- # setup sys.path to see those dirs
- sys.path.append('/tmp')
-
-
- # now run some tests
- pprint.pprint( getInstalled())
- print checkInstalled("2.4")
- print checkInstalled("2.5-unicode")
- print checkInstalled("2.99-bogus")
- print "Current sys.path:"
- pprint.pprint(sys.path)
- print
-
- test("2.4")
- test("2.5")
- test("2.5-gtk2")
- test("2.5.2")
- test("2.5-ansi")
- test("2.5-unicode")
-
- # There isn't a unicode match for this one, but it will give the best
- # available 2.4. Should it give an error instead? I don't think so...
- test("2.4-unicode")
-
- # Try asking for multiple versions
- test(["2.6", "2.5.3", "2.5.2-gtk2"])
-
- try:
- # expecting an error on this one
- test("2.6")
- except VersionError, e:
- print "Asked for 2.6:\t got Exception:", e
-
- # check for exception when incompatible versions are requested
- try:
- select("2.4")
- select("2.5")
- except VersionError, e:
- print "Asked for incompatible versions, got Exception:", e
-
- # cleanup
- for name in names:
- d = os.path.join('/tmp', name)
- os.rmdir(os.path.join(d, 'wx'))
- os.rmdir(d)
-
-
+++ /dev/null
-# Copyright 1999-2007 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/wxpython/wxpython-2.6.1.0.ebuild,v 1.11 2007/01/05 22:12:48 dirtyepic Exp $
-
-inherit python wxwidgets eutils multilib
-
-MY_P="${P/wxpython-/wxPython-src-}"
-DESCRIPTION="A blending of the wxWindows C++ class library with Python"
-HOMEPAGE="http://www.wxpython.org/"
-SRC_URI="mirror://sourceforge/wxpython/${MY_P}.tar.gz"
-
-LICENSE="wxWinLL-3"
-SLOT="2.6"
-KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86"
-IUSE="gtk gtk2 unicode opengl"
-
-RDEPEND=">=dev-lang/python-2.1
- =x11-libs/wxGTK-2.6*
- !<dev-python/wxpython-2.4.2.4-r1
- gtk2? ( >=x11-libs/gtk+-2.0
- >=x11-libs/pango-1.2
- >=dev-libs/glib-2.0 )
- unicode? ( >=x11-libs/gtk+-2.0
- >=x11-libs/pango-1.2
- >=dev-libs/glib-2.0 )
- !gtk2? ( =x11-libs/gtk+-1.2*
- =dev-libs/glib-1.2* )
- media-libs/libpng
- media-libs/jpeg
- media-libs/tiff
- >=sys-libs/zlib-1.1.4
- opengl? ( >=dev-python/pyopengl-2.0.0.44 )
- !<dev-python/wxpython-2.4.2.4-r1"
-
-DEPEND="${RDEPEND}
- gtk2? ( dev-util/pkgconfig )
- sys-apps/sed"
-
-S="${WORKDIR}/${MY_P}/wxPython/"
-
-pkg_setup() {
- if use unicode; then
- ! use gtk2 && die "You must put gtk2 in your USE if you need unicode support"
- fi
-}
-
-src_unpack() {
- unpack ${A}
- cd ${S} || die "failed to cd to ${S}"
- sed -i "s:cflags.append('-O3'):pass:" config.py || die "sed failed"
- epatch ${FILESDIR}/scripts-multiver-${PV}.diff
-}
-
-src_compile() {
- local mypyconf
- export WX_GTK_VER="2.6"
- if ! use gtk2; then
- need-wxwidgets gtk
- elif use unicode; then
- need-wxwidgets unicode
- else
- need-wxwidgets gtk2
- fi
-
- mypyconf="${mypyconf} WX_CONFIG=${WX_CONFIG}"
- use opengl \
- && mypyconf="${mypyconf} BUILD_GLCANVAS=1" \
- || mypyconf="${mypyconf} BUILD_GLCANVAS=0"
-
- use gtk2 \
- && mypyconf="${mypyconf} WXPORT=gtk2" \
- || mypyconf="${mypyconf} WXPORT=gtk"
-
- use unicode && mypyconf="${mypyconf} UNICODE=1"
-
- python setup.py ${mypyconf} build || die "build failed"
-}
-
-src_install() {
- python_version
- local mypyconf
- local site_pkgs=/usr/$(get_libdir)/python${PYVER}/site-packages
- dodir ${site_pkgs}
-
- if ! use gtk2; then
- need-wxwidgets gtk || die "Emerge wxGTK with wxgtk1 in USE"
- elif use unicode; then
- need-wxwidgets unicode || die "Emerge wxGTK with unicode in USE"
- else
- need-wxwidgets gtk2 || die "Emerge wxGTK with gtk2 in USE"
- fi
-
- mypyconf="${mypyconf} WX_CONFIG=${WX_CONFIG}"
- use opengl \
- && mypyconf="${mypyconf} BUILD_GLCANVAS=1" \
- || mypyconf="${mypyconf} BUILD_GLCANVAS=0"
-
- use gtk2 \
- && mypyconf="${mypyconf} WXPORT=gtk2" \
- || mypyconf="${mypyconf} WXPORT=gtk"
-
- use unicode && mypyconf="${mypyconf} UNICODE=1"
-
- python setup.py ${mypyconf} install --prefix=/usr --root=${D} || die
-
- if [ -e "${site_pkgs}/wx.pth" ] && [ "`grep -o 2.4 ${site_pkgs}/wx.pth`" = "2.4" ]; then
- rm ${D}/${site_pkgs}/wx.pth
- elog "Keeping 2.4 as system default wxPython"
- else
- if use unicode; then
- wx_name=wx-${PV:0:3}-gtk2-unicode
- elif use gtk2; then
- wx_name=wx-${PV:0:3}-gtk2-ansi
- else
- wx_name=wx-${PV:0:3}-gtk-ansi
- fi
-
- elog "Setting ${wx_name} as system default wxPython"
- echo ${wx_name} > ${D}/${site_pkgs}/wx.pth || \
- die "Couldn't create wx.pth"
-
- fi
-
- cp ${FILESDIR}/wxpy-config.py ${D}/${site_pkgs}/
-
- #Add ${PV} suffix to all /usr/bin/* programs to avoid clobbering SLOT'd
- for filename in ${D}/usr/bin/* ; do
- mv ${filename} ${filename}-2.6
- done
-}
-
-pkg_postinst() {
-
- elog "Gentoo now uses the Multi-version method for SLOT'ing"
- elog "Developers see this site for instructions on using 2.4 or 2.6"
- elog "with your apps:"
- elog "http://wiki.wxpython.org/index.cgi/MultiVersionInstalls"
-}