Re: [1.7] ctypes / geos / python / django

2009-12-24 Thread kiorky
I have this bug fixed.
See details on my bugreport, django side.

See [1]

[1] - http://code.djangoproject.com/ticket/12438

kiorky a écrit :
 
 Yaakov (Cygwin/X) a écrit :
 On 10/12/2009 14:57, kiorky wrote:
 Yep as i said, i already have that patch applied, its not that.
 Oh, I see what you mean now.  There was a bug in the libc.a in previous
 releases that should have been fixed in cygwin 1.7.0-68.  What does
 dlltool -I /usr/lib/libc.a return?


 No new idea ?
 Yaakov

 -- 
 Problem reports:   http://cygwin.com/problems.html
 FAQ:   http://cygwin.com/faq/
 Documentation: http://cygwin.com/docs.html
 Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple

 

-- 
Cordialement,
KiOrKY
GPG Key FingerPrint: 0x1A1194B7681112AF



signature.asc
Description: OpenPGP digital signature


Re: [1.7] ctypes / geos / python / django

2009-12-13 Thread kiorky


Yaakov (Cygwin/X) a écrit :
 On 10/12/2009 14:57, kiorky wrote:
 Yep as i said, i already have that patch applied, its not that.
 
 Oh, I see what you mean now.  There was a bug in the libc.a in previous
 releases that should have been fixed in cygwin 1.7.0-68.  What does
 dlltool -I /usr/lib/libc.a return?
 
 
No new idea ?
 Yaakov
 
 -- 
 Problem reports:   http://cygwin.com/problems.html
 FAQ:   http://cygwin.com/faq/
 Documentation: http://cygwin.com/docs.html
 Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
 

-- 
Cordialement,
KiOrKY
GPG Key FingerPrint: 0x1A1194B7681112AF



signature.asc
Description: OpenPGP digital signature


Re: [1.7] ctypes / geos / python / django

2009-12-11 Thread kiorky


Yaakov (Cygwin/X) a écrit :
 On 10/12/2009 14:57, kiorky wrote:

 Oh, I see what you mean now.  There was a bug in the libc.a in previous
 releases that should have been fixed in cygwin 1.7.0-68.  What does
 dlltool -I /usr/lib/libc.a return?
 

$ dlltool -I /usr/lib/libc.a
cygwin1.dll



-- 
Cordialement,
KiOrKY
GPG Key FingerPrint: 0x1A1194B7681112AF





signature.asc
Description: OpenPGP digital signature


[1.7] ctypes / geos / python / django

2009-12-10 Thread kiorky
I asked a similar post on the python mailing list as i don't know where people
can help me on that subjet.

So, for my fellows readers, now that i have geos compiled and fully functionnal,
my next step is to validate the Django ctypes bindings, and we have there some
tests to do that.

Here come problems.


With my python-2.6.4 hand made with some patches stolen from cygwin port
(specially the ctypes one, and some arrangements (load cygpython26.Dll instdead
of libpython26.dll for example), i can compile and use a c or a c++ helloworld
library without problems and unittest for ctypes do not fail.


However, using it in my real world UseCase (django + geos), make me think that
there is a problem with ctypes.
$ cat geos.py
from django.contrib.gis.tests import test_geos
test_geos.run()
$ /minitage/dependencies/python-2.6/parts/part/bin/python bin/djangopy geos.py

Testing WKT output. ... ERROR
Testing HEX output. ... ERROR
Testing KML output. ... ERROR
Testing the Error handlers. ...
BEGIN - expecting GEOS_ERROR; safe to ignore.
GEOS_ERROR: ParseException: Expected number but encountered ','
GEOS_ERROR: ParseException: Unknown WKB type 255
END - expecting GEOS_ERROR; safe to ignore.
GEOS_ERROR: ParseException: Unexpected EOF parsing WKB
ok
Testing WKB output. ... ERROR
Testing creation from HEX. ... ERROR
Testing creation from WKB. ... ERROR
Testing EWKT. ... ERROR
Testing GeoJSON input/output (via GDAL). ... ok
Testing equivalence. ... ERROR
Testing Point objects. ... ERROR
Testing MultiPoint objects. ... ERROR
Testing LineString objects. ... ERROR
Testing MultiLineString objects. ... ERROR
Testing LinearRing objects. ... ERROR
Testing Polygon objects. ... ERROR
Testing MultiPolygon objects. ...
BEGIN - expecting GEOS_NOTICE; safe to ignore.

ERROR
Testing Geometry __del__() on rings and polygons. ... ERROR
Testing Coordinate Sequence objects. ... ok
Testing relate() and relate_pattern(). ... ERROR
Testing intersects() and intersection(). ... ok
Testing union(). ... ok
Testing difference(). ... ok
Testing sym_difference(). ... ok
Testing buffer(). ... ok
Testing the SRID property and keyword. ... ERROR
Testing the mutability of Polygons and Geometry Collections. ... ERROR
Testing three-dimensional geometries. ... ok
Testing the distance() function. ... ok
Testing the length property. ... ok
Testing empty geometries and collections. ... ERROR
Testing `ogr` and `srs` properties. ... ok
Testing use with the Python `copy` module. ... ok
Testing `transform` method. ... ok
Testing `extent` method. ... ok
Testing pickling and unpickling support. ... ERROR
==
ERROR: Testing WKT output.
--
Traceback (most recent call last):
  File
/cygdrive/e/minitage2/eggs/cache/Django-1.0.2_final_ZMinitagePatched_DjangoCchb-py2.6.egg/django/contrib/gis/tests/test_geos.py,
line 28, in test01a_wkt
self.assertEqual(g.ewkt, geom.wkt)
  File
/cygdrive/e/minitage2/eggs/cache/Django-1.0.2_final_ZMinitagePatched_DjangoCchb-py2.6.egg/django/contrib/gis/geos/base.py,
line 378, in wkt
return to_wkt(self.ptr)
  File
/cygdrive/e/minitage2/eggs/cache/Django-1.0.2_final_ZMinitagePatched_DjangoCchb-py2.6.egg/django/contrib/gis/geos/prototypes/errcheck.py,
line 67, in check_string
libc.free(result)
  File
/minitage/dependencies/python-2.6/parts/part/lib/python2.6/ctypes/__init__.py,
line 366, in __getattr__
func = self.__getitem__(name)

  File
/minitage/dependencies/python-2.6/parts/part/lib/python2.6/ctypes/__init__.py,
line 371, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'free' not found (*�)

For information, the Django/gis code can be read here [1] .

[1] -
http://code.djangoproject.com/browser/django/tags/releases/1.0.2/django/contrib/gis/tests/test_geos.py


Any thought on why ctypes can't find that 'free' function ?

-- 
Cordialement,
KiOrKY
GPG Key FingerPrint: 0x1A1194B7681112AF



signature.asc
Description: OpenPGP digital signature


Re: [1.7] ctypes / geos / python / django

2009-12-10 Thread Yaakov (Cygwin/X)

On 10/12/2009 09:48, kiorky wrote:

Any thought on why ctypes can't find that 'free' function ?


Probably because it can't find the library ('c') containing that 
function.  ctypes needs a patch to find most libraries just by name on 
Cygwin.  Here are patches for 2.5, 2.6, and 3.1:


http://cygwin-ports.svn.sourceforge.net/viewvc/cygwin-ports/ports/trunk/lang/python/2.5.2-ctypes-util-find_library.patch
http://cygwin-ports.svn.sourceforge.net/viewvc/cygwin-ports/ports/trunk/lang/python2.6/2.5.2-ctypes-util-find_library.patch
http://cygwin-ports.svn.sourceforge.net/viewvc/cygwin-ports/ports/trunk/lang/python3/3.0rc3-ctypes-util-find_library.patch

Perhaps our python maintainer will consider including this when he has a 
chance to update our python package.



Yaakov

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: [1.7] ctypes / geos / python / django

2009-12-10 Thread kiorky
Yep as i said, i already have that patch applied, its not that.

Yaakov (Cygwin/X) a écrit :
 On 10/12/2009 09:48, kiorky wrote:
 Any thought on why ctypes can't find that 'free' function ?
 
 Probably because it can't find the library ('c') containing that
 function.  ctypes needs a patch to find most libraries just by name on
 Cygwin.  Here are patches for 2.5, 2.6, and 3.1:
 
 http://cygwin-ports.svn.sourceforge.net/viewvc/cygwin-ports/ports/trunk/lang/python/2.5.2-ctypes-util-find_library.patch
 
 http://cygwin-ports.svn.sourceforge.net/viewvc/cygwin-ports/ports/trunk/lang/python2.6/2.5.2-ctypes-util-find_library.patch
 
 http://cygwin-ports.svn.sourceforge.net/viewvc/cygwin-ports/ports/trunk/lang/python3/3.0rc3-ctypes-util-find_library.patch
 
 
 Perhaps our python maintainer will consider including this when he has a
 chance to update our python package.
 
 
 Yaakov
 
 -- 
 Problem reports:   http://cygwin.com/problems.html
 FAQ:   http://cygwin.com/faq/
 Documentation: http://cygwin.com/docs.html
 Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
 

-- 
Cordialement,
KiOrKY
GPG Key FingerPrint: 0x1A1194B7681112AF



signature.asc
Description: OpenPGP digital signature


Re: [1.7] ctypes / geos / python / django

2009-12-10 Thread Yaakov (Cygwin/X)

On 10/12/2009 14:57, kiorky wrote:

Yep as i said, i already have that patch applied, its not that.


Oh, I see what you mean now.  There was a bug in the libc.a in previous 
releases that should have been fixed in cygwin 1.7.0-68.  What does 
dlltool -I /usr/lib/libc.a return?



Yaakov

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple