[Python-checkins] r77756 - in python/trunk/Lib/distutils: command/bdist_msi.py tests/test_bdist_msi.py

M.-A. Lemburg mal at egenix.com
Tue Jan 26 22:35:56 CET 2010


Tarek Ziadé wrote:
> On Tue, Jan 26, 2010 at 8:24 PM, M.-A. Lemburg <mal at egenix.com> wrote:
> [..]
>>
>>> And for the APIs that are being deprecated, I am just throwing a
>>> DeprecationWarning.
>>> For the patch problem, I am not sure what's the best way. I think
>>> that's not a huge change for people patching code. What do you suggest
>>> ?
>>
>> I'm not sure what you mean with "patch problem". Perhaps the monkey-
>> patching that's often applied to get_platform() ?
> 
> Yes,
> 
>>
>> For that I think we need a better way to tell distutils to use
>> a different platform string than by monkey-patching the function.
>>
>> In mxSetup we currently have to do the monkey-patching in order
>> to support our prebuilt archives. I suppose the situation is similar
>> for eggs.
>>
> yes, it has a custom get_build_platform but it doesn't monkey patch
> distutils for that/
> 
> 
>> The reason for the change of the platform string is that this
>> is used in many build paths, so we need to make sure that the
>> platform string used on the build machine is also used on the
>> target machine. This often happens on a few platforms such as
>> Mac OS X that have a number of different possible platform
>> strings (e.g. various fat builds vs. single architecture builds).
>>
>> Ideally, there should be a global in distutils that you can
>> change using a public API to avoid the monkey-patching, e.g.
>>
>> distutils.sysconfig.get_platform()
>>
>>  Initializes the global using sysconfig.get_platform() if not
>>  set and returns its current value.
>>
>> distutils.sysconfig.set_platform(platform_id)
>>
>>  Sets the global to a new value.
> 
> Sounds like a plan, I'll add this.

Great !

You will then also have to undo a few import changes that
you have just applied to get the get_platform API from
distutils.sysconfig (instead of sysconfig, or the old
distutils.utils).

> FYI
> 
> I have the sysconfig module pending for the py3k branch, but I was waiting
> a few days to see if everything was OK with the change in 2.x. I guess
> I'll merge it after that, then work on the shutil part.

I'll run a few more tests of our stuff tomorrow. For now,
I've fixed all issues I found, except one, but I'm not sure
whether that's distutil's fault, RPM's, mxSetup's or a mix
of all of them... the bdist_rpm command no longer works.
We haven't used that command in years, so it's not all that
surprising.

> The next big step is the documentation for sysconfig.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Jan 26 2010)
>>> 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/


More information about the Python-checkins mailing list