[Distutils] Alternate static metadata PEP submission...
david.lyon at preisshare.net
Thu Oct 15 07:38:46 CEST 2009
On Thu, 15 Oct 2009 13:39:32 +0900, David Cournapeau
<david at ar.media.kyoto-u.ac.jp> wrote:
> I understand this, but when you a lot of conditioning, "flattening" the
> conditions is not really readable. If you have say 10 variables instead
> of 2 to condition on, the sections would be several lines.
I'm only allowing up to four. These are:
- specifier ['dependencies','preinstall','postinstall','scripts',
'application', 'package', 'documentation', 'uninstall',
- operating system ['windows','mac','linux' etc...] plus some
twiddle-bits like 32, 64, gnome, kde and os-version.
- python version
- operation ['test','build' ..].
So never above 4. Typically two or three.
> More significantly though, how can you define new conditions variables
> with .ini files ? Would you have a special section for this ?
I don't have a way of doing that right now - and am not aware of
practical examples that might require it.
Anything that can't be handled with the above will have to go into
a pre-install or post-install script and be coded with traditional
If you can find any common use cases that aren't handled, please
In the real world, there is a point where things might need to
go to code. This capability is provided for.
script = checksystem.py
script = checkmylinux.sh
[postinstall windows-64-xp python-2.4]
script = regedit.exe /s fixpy24win.txt
[postinstall windows-64-xp python-2.5]
script = regedit.exe /s fixpy25win.txt
What that would do would be to make a system
registry correction after loading on 64 bit
windows only for python versions 2.4 or 2.5.
[postinstall linux-debian-64 python-2.5]
script = fixpy25deb.py
[postinstall linux-suse-kde python-2.5]
script = fixpy25susekde.py
script = popupkoolmachinechoice.py
I'm really not trying to handle every possible
case, just the most common ones. That is, trying
to provide a hook for specific unique situations
that exist on different platforms and operating
More information about the Distutils-SIG