[pycrypto] FW: python crypto with python 3.0 or 3.1

Grail Dane grail69 at hotmail.com
Fri Jan 15 03:58:44 CST 2010


 Hi All
So I am going to go on a limb a little and say I have successfully compiled pycrypto with python 3.1.1
The attached patch makes the necessary changes to remove any errors during install.If someone would like to give me a small test script, I am happy to see if my tinkering actually worksor is just allowing it to install??
I am also aware that some of the changes are probably not the best way to do it, but I am happy to investigatefurther once I have it working :)
CheersGrail

From: grail69 at hotmail.com
To: pycrypto at lists.dlitz.net
Date: Fri, 15 Jan 2010 00:32:04 +0000
Subject: Re: [pycrypto] python crypto with python 3.0 or 3.1








Hi
Thanks for the speedy reply :)
I am a little confused though as the doco for 3.1 says:
PyVarObjectThis is an extension of PyObject that adds the ob_size field. This is only used for objects that have some notion of length. This type does not often appear in the Python/C API. It corresponds to the fields defined by the expansion of the PyObject_VAR_HEAD macro.This appears to be the same as what is written in the doco for 2.6.4 as well, which pycrypto seems to work with.
Well i will keep looking to see what i can find out.
CheersGrail
> Date: Thu, 14 Jan 2010 10:07:36 +0100
> From: don at amberfisharts.com
> To: pycrypto at lists.dlitz.net
> Subject: Re: [pycrypto] python crypto with python 3.0 or 3.1
> 
> Hi,
> 
> as far as I know there hasn't been a move to port pyCrypto to python 3.x
> so simply compiling against python 3.x is bound to fail!
> If you try to port yourself and during that effort ran into this compiler 
> error then if you look at the documentation [1] or this blog post [2]
> (it's
> a bit outdated since the docs have been fixed in the meantime) you will
> see
> that the first few lines (besides other things) of a python extension type
> have
> changed from 
>  
>   PyObject_HEAD_INIT(NULL)
>   0,                   /* ob_size */
>   "myTypeName",        /* tp_name */
> 
> to
> 
>   PyVarObject_HEAD_INIT(NULL, 0)
>   "myTypeName",        /* tp_name */
> 
> If I recall correctly, the ob_size has be moved to a different structure
> and no longer
> is a member of PyTypeObject.
> So to sum it up:
>  * no porting effort exist so far, AFAIK
>  * no, the error is not bogus
> 
> sincerely yours
> //Lorenz
> 
> [1] http://docs.python.org/dev/py3k/extending/newtypes.html
> [2]
> http://rhodesmill.org/brandon/2008/porting-a-c-extension-module-to-python-30/
> 
> 
> 
> On Thu, 14 Jan 2010 07:52:59 +0000, Grail Dane <grail69 at hotmail.com>
> wrote:
> > Hi GuysI am new to the list but have recently run into this issue.Has
> > there been any movement?Personally I am stuck when gcc tries to compile
> > src/_fastmath.cwhich seems to die with an error about 'ob_size' member
> not
> > existing :(This seems to be bogus as I traced back the struct's to
> include
> > PyObject_VAR_HEADwhich does have this as member.Any further help on this
> > would be appreciated ;)Cheers Grail>On Fri, Dec 04, 2009 at 11:44:00AM
> > +0100, Tobias Koeck wrote:>>Is it possible to run python crypto with
> python
> > 3.0 or 3.1. If not is 
> >>>it planed to adjust?
> > 
> >>Sure, and it'll happen sooner if somebody volunteers to do it. :-)
> > 
> >>There will need to be be some strategy for Python 2.x compatibility, and
> 
> >>the contributor(s) need to to meet the PyCrypto Code Submission 
> >>Requirements:
> > 
> >>http://www.dlitz.net/software/pycrypto/submission-requirements/
> > 
> >>-- 
> >>Dwayne C. Litzenberger <dlitz at dlitz.net>
> >>  Key-signing key   - 19E1 1FE8 B3CF F273 ED17  4A24 928C EC13 39C2 5CF7
> >>  Annual key (2009) - C805 1746 397B 0202 2758  2821 58E0 894B 81D2 582E
> >>
> > _________________________________________________________________
> > View photos of singles in your area! Browse profiles for FREE
> > http://clk.atdmt.com/NMN/go/150855801/direct/01/
> _______________________________________________
> pycrypto mailing list
> pycrypto at lists.dlitz.net
> http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto
 		 	   		  
If It Exists, You'll Find it on SEEK Shopping Trolley Mechanic 		 	   		  
Sell your old one fast! Time for a new car? 		 	   		  
_________________________________________________________________
Shopping Trolley Mechanic If It Exists, You'll Find it on SEEK
http://clk.atdmt.com/NMN/go/157639755/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.dlitz.net/pipermail/pycrypto/attachments/20100115/0432fbaf/attachment-0001.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pycrypto-2.1.0-python3-1.patch.bz2
Type: application/x-bzip
Size: 8119 bytes
Desc: not available
Url : http://lists.dlitz.net/pipermail/pycrypto/attachments/20100115/0432fbaf/attachment-0001.bin 


More information about the pycrypto mailing list