[Twisted-Python] twisted-2 won't work with Fedora
There is a big problem with twisted on Fedora/Redhat multiarch. For example, x86_64. The problem is that Fedora puts arch-independent (.py) code into a different directory than arch-dependent code. Unfortunately, this doesn't quite work correctly with python's module search algorithm. The problem shows up when twisted-sumo is installed. Then we have: /usr/lib/python2.4/site-packages/twisted/... and /usr/lib64/python2.4/site-packages/twisted/... This won't work. I realize the problem is with python module search, but it looks like a big effort fix the code. A simpler solution would be for twisted to just avoid the problem. If twisted put core c-code into a different place, we could have: /usr/lib64/python2.4/site-packages/twisted-core That would solve the problem.
On Wed, 2006-03-29 at 09:02 -0500, Neal Becker wrote:
There is a big problem with twisted on Fedora/Redhat multiarch. For example, x86_64.
The problem is that Fedora puts arch-independent (.py) code into a different directory than arch-dependent code.
Unfortunately, this doesn't quite work correctly with python's module search algorithm.
This sounds like a problem in Fedora, not Twisted. As a workaround, you could install Twisted twice, once w/32bit and once with 64bit python?
On Wed, 29 Mar 2006 09:02:12 -0500, Neal Becker <ndbecker2@gmail.com> wrote:
There is a big problem with twisted on Fedora/Redhat multiarch. For example, x86_64.
The problem is that Fedora puts arch-independent (.py) code into a different directory than arch-dependent code.
Unfortunately, this doesn't quite work correctly with python's module search algorithm.
The problem shows up when twisted-sumo is installed. Then we have:
/usr/lib/python2.4/site-packages/twisted/... and /usr/lib64/python2.4/site-packages/twisted/...
This won't work.
I realize the problem is with python module search, but it looks like a big effort fix the code. A simpler solution would be for twisted to just avoid the problem. If twisted put core c-code into a different place, we could have:
/usr/lib64/python2.4/site-packages/twisted-core
That would solve the problem.
You could just delete the /usr/lib64 twisted package, which I am guessing is almost entirely empty. Unless you're interested in twisted.runner, none of the extension modules are actually required. Jean-Paul
I found that this will workaround: sudo python setup.py all install --install-lib=/usr/lib64/python2.4/site-packages
On Mar 29, 2006, at 9:02 AM, Neal Becker wrote:
There is a big problem with twisted on Fedora/Redhat multiarch. For example, x86_64.
The problem is that Fedora puts arch-independent (.py) code into a different directory than arch-dependent code.
Unfortunately, this doesn't quite work correctly with python's module search algorithm. [...] I realize the problem is with python module search, but it looks like a big effort fix the code.
In the thread on python-dev, I thought I saw a simple enough solution: On Mar 17, 2006, at 4:03 PM, Martin v. Löwis wrote:
Neal Becker wrote:
Sorry, maybe I used confusing terminology.
A reference is here: http://fedoraproject.org/wiki/Packaging/Python This is the current setup. For example, this is a standard macro used by Redhat in RPM SPEC files for python:
%define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
Clearly this practice is widespread. It would seem that module search needs some modification to fully support it.
Ah. That isn't supported at all, at the moment. Redhat should not be using it. Instead, there shouldn't be a difference between sitearch and sitelib.
In any case, I don't see why twisted should do anything to fix this problem, it's for either Fedora or Python to fix. James
participants (4)
-
Itamar Shtull-Trauring
-
James Y Knight
-
Jean-Paul Calderone
-
Neal Becker