Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: Freezing python files into executables

Reply
Thread Tools

Re: Freezing python files into executables

 
 
Rami Chowdhury
Guest
Posts: n/a
 
      11-03-2009
On Tue, 03 Nov 2009 11:57:17 -0800, Girish Venkatasubramanian
<> wrote:

> I checked and ls /usr/lib64/python2.4/config/ returns
> config.c config.c.in install-sh libpython2.4.a Makefile makesetup
> python.o Setup Setup.config Setup.local
>
> so I am guessing the python-devel installation went off OK, from what
> you say.
>
> I looked at the freeze.py code and I see your point. But for tweaking,
> I would need to know what modules should get included from lib64
> instead of lib and hardcode them ....
> Maybe tinkering around with the makefile which is produced by freeze
> is a better way to go?
>
> But since I need to freeze this python code by today, can you suggest
> any other tool to do this?
>


I believe /usr/lib64 on a 64-bit RHEL will contain everything you need ;
can you try just changing the directory freeze.py looks at to 'lib64', and
see if the freeze works?

>
> On Tue, Nov 3, 2009 at 11:47 AM, M.-A. Lemburg <> wrote:
>> Girish Venkatasubramanian wrote:
>>> Hey Marc-Andre,
>>> Ummm - I have installed python-devel.x86_64 and checked that the
>>> /usr/lib64/python2.4/ is populated - anything else I can/shuld do to
>>> check/ensure the the devel rpm is installed?

>>
>> If you have the config/ sub-dir in there, things should be
>> fine.
>>
>> However, it's possible that you need to tweek the freeze.py
>> script a little, since RedHat chose to split the Python
>> installation on x64 in two parts and they may have missed
>> patching freeze.py as well:
>>
>> The platform independent parts are in /usr/lib, whereas the
>> platform dependent parts are in /usr/lib64.
>>
>> Python normally doesn't support this. It only has a
>> prefix and an exec_prefix, but those only allow to do
>> things like prefix=/usr and exec_prefix=/usr64, not
>> changing the lib/ part in /usr/lib/.
>>
>>> Thanks.
>>>
>>> On Tue, Nov 3, 2009 at 11:32 AM, M.-A. Lemburg <> wrote:
>>>> Rami Chowdhury wrote:
>>>>> On Tue, 03 Nov 2009 11:15:39 -0800, Girish Venkatasubramanian
>>>>> <> wrote:
>>>>>
>>>>>> Hello,
>>>>>> I have been using freeze.py on 32 bit linux distributions without a
>>>>>> problem. But recently I tried to do the same on RHEL5 x86_64 and ran
>>>>>> into some issues.
>>>>>>
>>>>>> 1) When I ran the script, I got
>>>>>> Error: needed directory /usr/lib/python2.4/config not found
>>>>>>
>>>>>
>>>>> I don't know anything about freeze.py but on 64-bit Red Hat distros
>>>>> (RHEL, Fedora, etc) it should be /usr/lib64/python2.4/config
>>>>
>>>> This sounds a lot like a missing Python devel RPM.
>>>>
>>>> --
>>>> Marc-Andre Lemburg
>>>> eGenix.com
>>>>
>>>> Professional Python Services directly from the Source Â*(#1, Nov 03
>>>> 2009)
>>>>>>> Python/Zope Consulting and Support ... Â* Â* Â*
>>>>>>> Â*http://www.egenix.com/
>>>>>>> mxODBC.Zope.Database.Adapter ... Â* Â* Â* Â* Â* Â*
>>>>>>> http://zope.egenix.com/
>>>>>>> mxODBC, mxDateTime, mxTextTools ... Â* Â* Â*
>>>>>>> Â*http://python.egenix.com/
>>>> __________________________________________________ ______________________
>>>>
>>>> ::: Try our new mxODBC.Connect Python Database Interface for free !
>>>> ::::
>>>>
>>>>
>>>> Â* eGenix.com Software, Skills and Services GmbH Â*Pastor-Loeh-Str.48
>>>> Â* Â*D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
>>>> Â* Â* Â* Â* Â* Registered at Amtsgericht Duesseldorf: HRB 46611
>>>> Â* Â* Â* Â* Â* Â* Â* http://www.egenix.com/company/contact/
>>>>

>>
>> --
>> Marc-Andre Lemburg
>> eGenix.com
>>
>> Professional Python Services directly from the Source Â*(#1, Nov 03 2009)
>>>>> Python/Zope Consulting and Support ... Â* Â* Â* Â*http://www.egenix.com/
>>>>> mxODBC.Zope.Database.Adapter ... Â* Â* Â* Â* Â* Â* http://zope.egenix.com/
>>>>> mxODBC, mxDateTime, mxTextTools ... Â* Â* Â* Â*http://python.egenix.com/

>> __________________________________________________ ______________________
>>
>> ::: Try our new mxODBC.Connect Python Database Interface for free ! ::::
>>
>>
>> Â* eGenix.com Software, Skills and Services GmbH Â*Pastor-Loeh-Str.48
>> Â* Â*D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
>> Â* Â* Â* Â* Â* Registered at Amtsgericht Duesseldorf: HRB 46611
>> Â* Â* Â* Â* Â* Â* Â* http://www.egenix.com/company/contact/
>>




--
Rami Chowdhury
"Never attribute to malice that which can be attributed to stupidity" --
Hanlon's Razor
408-597-7068 (US) / 07875-841-046 (UK) / 0189-245544 (BD)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Freezing python files into executables Girish Venkatasubramanian Python 2 11-06-2009 01:54 AM
Freezing python files into executables Girish Venkatasubramanian Python 0 11-03-2009 07:15 PM
Converting IFMapper into Win32 executables Arnel Ruby 1 10-28-2006 04:03 AM
Re: Python executables David Scott Williams Python 1 07-05-2003 07:51 AM
Python executables? Catalin Python 6 07-03-2003 06:41 AM



Advertisments