[Distutils] [ANN] EggFreezer

Ian Bicking ianb at colorstudy.com
Tue Aug 5 18:07:46 CEST 2008


Alberto Valverde wrote:
> Ian Bicking wrote:
>> Alberto Valverde wrote:
>>   
>>> The usage is pretty straightforward:
>>>
>>> eggfreezer -o AllTurbogears2 -f
>>> http://turbogears.org/2.0/downloads/current TurboGears2 tg.devtools
>>>
>>> That command will try to satisfy all dependencies for TurboGears2 and
>>> tg.devtools (fetching them from local packages if available), using that
>>> url to find links, and bundle them into a file called
>>> AllTurboGears2-${py_version}-${platform}.py.
>>>     
>> As long as you are doing platforms, it might be nice to get them right. 
>>   Specifically the UCS2/UCS4 distinction, though there might be more 
>> that I'm forgetting.  (If there's actually platform-dependent files in 
>> there, if not it'd be nice to leave out the platform entirely.)
>>   
> I'm using pkg_resources.Distribution's 'platform' attribute to get this,
> the algorithm basically iterates over all dependencies and as soon as
> one has it set to not None it'll use that. If all are set to None then
> no ${platform} is added to the filename. I'm assuming of course that all
> distributions have the same string as platform, which I guess it isn't
> not too far-fetched, but haven't really checked so I'm sure there's
> something I might have overlooked.
> 
> BTW, does pkg_resources populate it properly with he UCS2/UCS4
> distinction you mention?

No... which makes binary eggs unusable on Linux.  I feel like there was 
something else that made binary packages on a Mac unreliable, but I 
can't remember.  Windows binary eggs generally work fine.  This is 
discussed some here: 
http://philikon.wordpress.com/2008/06/26/is-there-a-point-to-distributing-egg-files/

One nuisance is that people don't generally know how their Python was 
built (UCS2 or UCS4).  I was thinking about making something very 
similar to eggfreezer (which I'm unlikely to do now that eggfreezer 
exists ;), and generating an "install" .py file that determines the 
platform and downloads the appropriate platform bundle.

-- 
Ian Bicking : ianb at colorstudy.com : http://blog.ianbicking.org


More information about the Distutils-SIG mailing list