Opened 17 years ago
Closed 15 years ago
#12623 closed enhancement (duplicate)
wx cannot be imported directly in python2.5
Reported by: | mdickens@… | Owned by: | mww@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.5.0 |
Keywords: | Cc: | jyrkiwahlstedt | |
Port: | py25-wxpython |
Description
One can "import wx" (for py25-wxpython, which is version 2.8.X) indirectly in python2.5 via:
import wxversion wxversion.select("2.8") import wx
But issuing "import wx" directly (without the wxversion stuff) doesn't work. Apparently python2.5 has changed the import functionality so that "pth" files are not honored in the same way they were in python2.4 ... or some such change.
Either way, the way to guarantee that "import wx" will work correctly is to link the subdirectories of wx-2.8-mac-unicode into site-packages. Since there will never be more than 1 version of py25-wxpython installed at a time, this is OK. I will attach a patch for the Portfile that does this ... there is likely a more generic way to define the exact subdirectory name, but this works.
Attachments (1)
Change History (5)
Changed 17 years ago by mdickens@…
Attachment: | py25-wxpython_Portfile.patch added |
---|
comment:1 Changed 17 years ago by mdickens@…
The reason for this issue is that ${prefix}/lib/python25/site-packages
was not included in the default sys.path for Python25 (any version). While the correction provided by this ticket's patch will do no harm, a better solution is to correct the default sys.path. This ticket and patch are now superseded by the tarball provided in ticket #11267.
comment:2 Changed 17 years ago by jmroot (Joshua Root)
Cc: | jwa@… added; mdickens@… removed |
---|---|
Owner: | changed from macports-tickets@… to mww@… |
Assigning to maintainer.
comment:3 Changed 16 years ago by (none)
Milestone: | Port Enhancements |
---|
Milestone Port Enhancements deleted
comment:4 Changed 15 years ago by blb@…
Keywords: | py25-wxpython removed |
---|---|
Port: | py25-wxpython added |
Resolution: | → duplicate |
Status: | new → closed |
patch for py25-wxpython Portfile to allow for direct "import wx"