cross platform distribution

ianaré ianare at gmail.com
Fri Sep 4 16:21:07 EDT 2009


These are all good suggestions. I just wanted to add that you can
distribute pre-built Linux packages for the most popular distros like
one for RHEL/Centos/Fedora as RPM and one for Debian/Ubuntu as DEB.
Any C code in them would be compiled.

On Sep 4, 9:33 am, Philip Semanchuk <phi... at semanchuk.com> wrote:
> On Sep 4, 2009, at 9:24 AM, vpr wrote:
>
>
>
> > On Sep 4, 3:19 pm, Philip Semanchuk <phi... at semanchuk.com> wrote:
> >> On Sep 4, 2009, at 4:44 AM, vpr wrote:
>
> >>> Hi All
>
> >>> After a couple of experiments, searching around and reading Steve
> >>> Holden's lament about bundling and ship python code, I thought I'd
> >>> direct this to to the group. I'm using Python 2.6 btw.
>
> >>> I've build a commercial application that I'd like to bundle and  
> >>> ship.
> >>> I'd like to protect some of my IP and the py2exe and cx_freeze  
> >>> builds
> >>> provide good enough protection for me.
>
> >>> I'd like to provide a build for windows and a build for linux.  
> >>> Windows
> >>> ironically has been easier to target and py2exe has given me a nice
> >>> build that I can ship between XP, Vista & Server on both 32 and 64
> >>> bit.
>
> >>> On linux I've build a build using cx_freeze which works well except
> >>> it's not really portable betweem distributions.
>
> >>> I've also been thinking about distributing bytcode versions but  
> >>> things
> >>> get tricky quickly.
>
> >>> Can anywone give me some pointers?
>
> >> I don't know how much "critical" code you have, but you might want to
> >> look at Cython which will translate your Python into C with little
> >> change to your Python source. Of course, compiled C code can still be
> >> disassembled, but it's harder than Python bytecode.
>
> >> HTH
> >> P
>
> > Hi Peter
>
> It's Philip, actually. =)
>
> > Sounds like a plan, how portable will that be between Linux systems?
>
> Very portable, but I should have mentioned that it requires you to  
> distribute a C file that's compiled on the user's machine. That's easy  
> to do via distutils but it adds a requirement to your app.
>
> > Won't I run into some GLIBC problems?
> > Can you force it to statically link the binary?
>
> I don't know the answer to those questions, but it's just a regular C  
> file, albeit one that's autogenerated. It comes with all of the pros  
> and cons of a C file you'd written yourself.
>
> Good luck
> Philip




More information about the Python-list mailing list