On Sat, 1 Jan 2011, Jonathan Dieter wrote:
On Sat, 2011-01-01 at 12:22 -0800, Toshio Kuratomi wrote:
> On Fri, Dec 31, 2010 at 05:38:30PM +0200, Jonathan Dieter wrote:
>> I now seem to be running into some problems building deltarpm for
>> Rawhide and it seems to be tied into this. See
>>
http://koji.fedoraproject.org/koji/buildinfo?buildID=212117 for more
>> details.
>
> Which is happening because the module is being installed to
> %{_libdir}/python3.2mu/site-packages
>
> So, yes, the Makefiles need to be changed. The way they're detecting which
> versions of python to build for are a bit hacky and definitely broken in
> this instance.
>
> I would instead code something that uses the python interpreter or config
> scripts to tell what needs to be done.
>
> You can adapt code like this to your needs:
>
> for PY in python python3 ; do
> PYLIB=`$PY -c 'from distutils import sysconfig ;
print(sysconfig.get_python_lib(1))'`
> PYVER=`$PY -c 'from distutils import sysconfig ;
print(sysconfig.get_python_version)'`
> PYCFLAGS=`$PY-config --cflags`
> PYLDFLAGS=`$PY-config --ldflags`
> done
Thanks much. I had missed the fact that the file was being installed in
a different directory. This is a great help.
The deltarpm python3 module has much bigger issues than paths changing:
deltarpmmodule.c: In function 'createDict':
deltarpmmodule.c:25:5: warning: implicit declaration of function
'PyString_FromString'
deltarpmmodule.c:25:7: warning: assignment makes pointer from integer
without a cast
deltarpmmodule.c:34:7: warning: assignment makes pointer from integer
without a cast
deltarpmmodule.c:51:7: warning: assignment makes pointer from integer
without a cast
deltarpmmodule.c: In function 'init_deltarpm':
deltarpmmodule.c:113:3: warning: implicit declaration of function
'Py_InitModule'
deltarpmmodule.c:113:5: warning: assignment makes pointer from integer
without a cast
Python 3 doesn't have PyString_FromString() or Py_InitModule() at all, so
all the module does now is fail with import error:
[pmatilai@localhost deltarpm]$ python3
Python 3.1.2 (r312:79147, Sep 8 2010, 23:02:57)
[GCC 4.5.1 20100812 (Red Hat 4.5.1-1)] on linux2
Type "help", "copyright", "credits" or "license"
for more information.
>> import deltarpm
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python3.1/site-packages/deltarpm.py", line 6, in
<module>
import _deltarpm
ImportError: /usr/lib64/python3.1/site-packages/_deltarpmmodule.so:
undefined symbol: Py_InitModule
I'd suggest simply disabling the broken python3 module for the time being
to allow deltarpm to be built against the new rpm version. I can help
fixing the Python version issue once the dust from new rpm landing
settles.
- Panu -