Opened 13 years ago

Closed 13 years ago

#29928 closed defect (fixed)

Python 2.6 goocanvas library doesn't work?

Reported by: dgonyier (Dwaine Gonyier) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: Cc: guillaume-jean@…, cawka (Alex Afanasyev)
Port: py-goocanvas

Description

I am trying to build ocrfeeder from a tarball using my macports installation. It requires the python 2.6 goocanvas package. The configure fails for ocrfeeder due to missing py26 goocanvas port. I verified that py26-goocanvas isn't importable by the macports Python 2.6 shell:

$ sudo port installed python26 py26-goocanvas
The following ports are currently installed:
  py26-goocanvas @0.14.1_0
  py26-goocanvas @0.14.1_0+universal (active)
  python26 @2.6.6_3+universal (active)
$ /opt/local/bin/python2.6
Python 2.6.6 (r266:84292, May 13 2011, 17:22:31)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import goocanvas
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named goocanvas
>>>
$

I am not a python expert, but I have an Ubuntu installation with python 3.6 and the corresponding Python goocanvas packages installed and the above python import works on Ubuntu.

I think this issue also affects the python2.5 and py25-goocanvas macports as well.

Change History (6)

comment:1 Changed 13 years ago by dgonyier (Dwaine Gonyier)

I have Python2.6 on Ubunut, not 3.6 :)

comment:2 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: guillaume-jean@… added

comment:3 Changed 13 years ago by afb@…

py26-goocanvas installs to the naive location:

/opt/local/lib/python2.6/site-packages

But python26 only looks in the framework location:

/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages

The failing auto-fu is:

     am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0$py_exec_prefix_arg)" -n -q install $py_exec_prefix_arg 2>/dev/null ||
     echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"`])

Since distutils doesn't work with "prefix":

$ py_exec_prefix_arg=""
$ /opt/local/bin/python2.6 -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0$py_exec_prefix_arg)" -n -q install $py_exec_prefix_arg
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages
$ py_exec_prefix_arg=",prefix='/opt/local'"
$ python -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0$py_exec_prefix_arg)" -n -q install $py_exec_prefix_arg
/opt/local/lib/python2.6/site-packages

comment:4 Changed 13 years ago by dgonyier (Dwaine Gonyier)

Looks like the other py26-* macports install to the framework site-packages location so py26-goocanvas is definitely doing something different as discussed above.

comment:5 Changed 13 years ago by david.osguthorpe@…

Not sure if this has been fixed or not (not according to subversion repository)

Im also hitting this issue

I found the following lines in py26-cairo

configure.pre_args-delete --prefix=${prefix} configure.pre_args-append --prefix=${python_prefix}

adding these lines seem to solve this problem - it is installed in the Frameworks site-packages

comment:6 Changed 13 years ago by drkp (Dan Ports)

Cc: alexander.afanasyev@… added
Port: py-goocanvas added; py26-goocanvas removed
Resolution: fixed
Status: newclosed

It looks to me like this is fixed in the latest update (r91185)

Note: See TracTickets for help on using tickets.